qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: qemu-devel@nongnu.org
Cc: kbastian@mail.uni-paderborn.de
Subject: [PULL 5/6] target/tricore: Fix wrong PSW for call insns
Date: Wed,  7 Jun 2023 18:24:39 +0200	[thread overview]
Message-ID: <20230607162440.7807-6-kbastian@mail.uni-paderborn.de> (raw)
In-Reply-To: <20230607162440.7807-1-kbastian@mail.uni-paderborn.de>

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>
---
 target/tricore/op_helper.c | 2 ++
 1 file changed, 2 insertions(+)

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}; */
-- 
2.40.1



  parent reply	other threads:[~2023-06-07 16:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 16:24 [PULL 0/6] tricore queue Bastian Koppelmann
2023-06-07 16:24 ` [PULL 1/6] tests/tcg/tricore: Move asm tests into 'asm' directory Bastian Koppelmann
2023-06-07 16:24 ` [PULL 2/6] tests/tcg/tricore: Uses label for memory addresses Bastian Koppelmann
2023-06-07 16:24 ` [PULL 3/6] tests/tcg/tricore: Add first C program Bastian Koppelmann
2023-06-07 16:24 ` [PULL 4/6] target/tricore: Refactor PCXI/ICR register fields Bastian Koppelmann
2023-06-07 16:24 ` Bastian Koppelmann [this message]
2023-06-07 16:24 ` [PULL 6/6] tests/tcg/tricore: Add recursion test for CSAs Bastian Koppelmann
2023-06-08 14:47 ` [PULL 0/6] tricore queue Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230607162440.7807-6-kbastian@mail.uni-paderborn.de \
    --to=kbastian@mail.uni-paderborn.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).