MRET jump support
This commit is contained in:
		@@ -522,7 +522,9 @@ static void cpu_execute(rv32_cpu_t* cpu, instruction_t* instruction)
 | 
			
		||||
							fprintf(stderr, "SRET: We don't support that.\n");
 | 
			
		||||
							break;
 | 
			
		||||
						case IMM_MRET:
 | 
			
		||||
							fprintf(stderr, "MRET: We don't support that.\n");
 | 
			
		||||
							// Act like a normal ret/jalr, with destination address being CSR_MEPC content
 | 
			
		||||
							fprintf(stderr, "Warning: MRET: We don't support privilege mode change\n");
 | 
			
		||||
							cpu->pc = cpu->csr[CSR_MEPC] - 4;
 | 
			
		||||
							break;
 | 
			
		||||
						default:
 | 
			
		||||
							switch(instruction->func7)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user