From a39658bf83c03c734fef210131d649540940258a Mon Sep 17 00:00:00 2001 From: Quan Nguyen Date: Wed, 31 Jul 2013 21:33:25 -0700 Subject: [PATCH] Fix eret (again) * Set SR_S if SR_PS is set, not the other way around (that is, set SR_S if SR_PS is not set). --- riscv/insns/eret.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscv/insns/eret.h b/riscv/insns/eret.h index deed103..9ea8baf 100644 --- a/riscv/insns/eret.h +++ b/riscv/insns/eret.h @@ -1,5 +1,5 @@ require_supervisor; set_pcr(PCR_SR, ((sr & ~(SR_S | SR_EI)) | - ((sr & SR_PS) ? 0 : SR_S)) | + ((sr & SR_PS) ? SR_S : 0)) | ((sr & SR_PEI) ? SR_EI : 0)); set_pc(epc); -- 2.30.2