aboutsummaryrefslogtreecommitdiff
path: root/target/tricore
diff options
context:
space:
mode:
authorBastian Koppelmann <kbastian@mail.uni-paderborn.de>2023-05-26 08:19:45 +0200
committerBastian Koppelmann <kbastian@mail.uni-paderborn.de>2023-06-07 18:20:48 +0200
commit12b95dc432eb9a50569258ffa094a029f3cc13dc (patch)
treed96f249507a1455ddbd94f475488a33504946989 /target/tricore
parent343cdf2c9ad6aef2fbf66cf9c888d20c1de5e784 (diff)
target/tricore: Fix wrong PSW for call insns
we were copying PSW into a local variable, updated PSW.CDE in the local and never wrote it back. So when we called save_context_upper() we were using the non-local version of PSW which did not contain the updated PSW.CDE. Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Message-Id: <20230526061946.54514-6-kbastian@mail.uni-paderborn.de>
Diffstat (limited to 'target/tricore')
-rw-r--r--target/tricore/op_helper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c
index 6fd2cbe20f..54f54811d9 100644
--- a/target/tricore/op_helper.c
+++ b/target/tricore/op_helper.c
@@ -2447,6 +2447,8 @@ void helper_call(CPUTriCoreState *env, uint32_t next_pc)
}
/* PSW.CDE = 1;*/
psw |= MASK_PSW_CDE;
+ psw_write(env, psw);
+
/* tmp_FCX = FCX; */
tmp_FCX = env->FCX;
/* EA = {FCX.FCXS, 6'b0, FCX.FCXO, 6'b0}; */