diff options
-rw-r--r-- | target/tricore/op_helper.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index 9a7a26b171..821a4b67cb 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -2584,12 +2584,12 @@ void helper_ret(CPUTriCoreState *env) /* PCXI = new_PCXI; */ env->PCXI = new_PCXI; - if (tricore_feature(env, TRICORE_FEATURE_13)) { - /* PSW = new_PSW */ - psw_write(env, new_PSW); - } else { + if (tricore_feature(env, TRICORE_FEATURE_131)) { /* PSW = {new_PSW[31:26], PSW[25:24], new_PSW[23:0]}; */ psw_write(env, (new_PSW & ~(0x3000000)) + (psw & (0x3000000))); + } else { /* TRICORE_FEATURE_13 only */ + /* PSW = new_PSW */ + psw_write(env, new_PSW); } } |