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");
 | 
												fprintf(stderr, "SRET: We don't support that.\n");
 | 
				
			||||||
							break;
 | 
												break;
 | 
				
			||||||
						case IMM_MRET:
 | 
											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;
 | 
												break;
 | 
				
			||||||
						default:
 | 
											default:
 | 
				
			||||||
							switch(instruction->func7)
 | 
												switch(instruction->func7)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user