From 1fcbcf500b9d8e3e562b02f0fa0f2b4c459c4816 Mon Sep 17 00:00:00 2001 From: mariusmonton Date: Sun, 11 Nov 2018 11:12:12 +0100 Subject: [PATCH] typos 6 minor changes --- inc/Instruction.h | 4 +++- src/CPU.cpp | 2 +- tests/C/func3/Makefile | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/inc/Instruction.h b/inc/Instruction.h index 897b52e..aa1e386 100644 --- a/inc/Instruction.h +++ b/inc/Instruction.h @@ -168,7 +168,7 @@ typedef enum { /** * @brief Instruction decoding and fields access */ -class Instruction{ +class Instruction { public: /** @@ -329,6 +329,7 @@ public: m_instr.range(11,7) = aux.range(4,1); m_instr[6] = aux[11]; } + /** * @brief Access to immediate field for J-type * @return immediate_J field @@ -345,6 +346,7 @@ public: if (m_instr[31] == 1) { aux |= (0b111111111111) << 20; } + return aux; } diff --git a/src/CPU.cpp b/src/CPU.cpp index b564626..fd10f0f 100644 --- a/src/CPU.cpp +++ b/src/CPU.cpp @@ -310,7 +310,7 @@ void CPU::CPU_thread(void) { exec->NOP(inst); } // switch (inst.check_extension()) } - + perf->instructionsInc(); if (PC_not_affected == true) { diff --git a/tests/C/func3/Makefile b/tests/C/func3/Makefile index 0143e1f..d1ee44b 100644 --- a/tests/C/func3/Makefile +++ b/tests/C/func3/Makefile @@ -5,13 +5,13 @@ TARGET_ARCH=riscv32 CC = riscv32-unknown-linux-gnu-gcc # compiling flags here #CFLAGS = -Wall -I. -O0 -nostdlib -march=rv32i -mabi=ilp32 --entry main -#CFLAGS = -Wall -I. -O0 -CFLAGS = -Wall -I. -O0 -Xlinker --gc-sections -lgcc -lc -static +CFLAGS = -Wall -I. -O0 -static +#CFLAGS = -Wall -I. -O0 -Xlinker --gc-sections -lgcc -lc -static --specs=nano.specs LINKER = riscv32-unknown-linux-gnu-gcc # linking flags here -LFLAGS = -I. --entry main +LFLAGS = -I. --entry main -L/opt/riscv/riscv32-unknown-elf/lib/ LIBS = $(EXTRA_LIBS)