diff --git a/src/cpu/rv32cpu.c b/src/cpu/rv32cpu.c index 9d7feec..e547d4a 100644 --- a/src/cpu/rv32cpu.c +++ b/src/cpu/rv32cpu.c @@ -501,7 +501,7 @@ static void cpu_execute(rv32_cpu_t* cpu, instruction_t* instruction) case OPCODE_NOP: { // TODO : Implement PAUSE, FENCE, FENCE.TSO - fprintf(stderr, "Warning: Unsupported NOP instruction\n"); + // fprintf(stderr, "Warning: Unsupported NOP instruction\n"); break; } case OPCODE_SYSTEM: @@ -602,14 +602,14 @@ static void cpu_execute(rv32_cpu_t* cpu, instruction_t* instruction) // Load-Reserved Word cpu->regs.x[instruction->rd] = mem_read32(address); // TODO register reservation set that subsumes the bytes in word - fprintf(stderr, "LR.W\n"); + // fprintf(stderr, "LR.W\n"); break; case FUNC75_SCW: // Store-Conditional Word // TODO succeed only if the reservation is still valid and the reservation set contains the bytes written mem_write32(address, cpu->regs.x[instruction->rs2]); cpu->regs.x[instruction->rd] = 0; // TODO write 1 in rd on failure - fprintf(stderr, "SC.W\n"); + // fprintf(stderr, "SC.W\n"); break; case FUNC75_AMOSWAPW: // Atomic Memory Operation SWAP Word @@ -681,7 +681,7 @@ static void cpu_execute(rv32_cpu_t* cpu, instruction_t* instruction) } } -void cpu_loop(rv32_cpu_t* cpu) +__attribute__((noreturn)) void cpu_loop(rv32_cpu_t* cpu) { while(1) { diff --git a/src/cpu/rv32cpu.h b/src/cpu/rv32cpu.h index 06f2a0f..b648843 100644 --- a/src/cpu/rv32cpu.h +++ b/src/cpu/rv32cpu.h @@ -201,6 +201,6 @@ typedef struct RV32_CPU extern rv32_cpu_t* cpu0; extern pthread_mutex_t cpu0_mutex; void cpu_init(); -void cpu_loop(rv32_cpu_t* cpu); +__attribute__((noreturn)) void cpu_loop(rv32_cpu_t* cpu); #endif