All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 2/6] target-tricore: Fix wrong precedences on psw_write
Date: Thu, 25 Feb 2016 13:06:09 +0100	[thread overview]
Message-ID: <1456401973-29673-3-git-send-email-kbastian@mail.uni-paderborn.de> (raw)
In-Reply-To: <1456401973-29673-1-git-send-email-kbastian@mail.uni-paderborn.de>

Wrong braces on the restore of the cached TCGv SV and V bit could lead to
a wrong PSW. While at this it removes unnecessary braces for the restore
of the cached TCGv AV and SAV bits.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
---
 target-tricore/helper.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target-tricore/helper.c b/target-tricore/helper.c
index a8fd418..7d96dad 100644
--- a/target-tricore/helper.c
+++ b/target-tricore/helper.c
@@ -127,9 +127,9 @@ uint32_t psw_read(CPUTriCoreState *env)
 void psw_write(CPUTriCoreState *env, uint32_t val)
 {
     env->PSW_USB_C = (val & MASK_USB_C);
-    env->PSW_USB_V = (val & MASK_USB_V << 1);
-    env->PSW_USB_SV = (val & MASK_USB_SV << 2);
-    env->PSW_USB_AV = ((val & MASK_USB_AV) << 3);
-    env->PSW_USB_SAV = ((val & MASK_USB_SAV) << 4);
+    env->PSW_USB_V = (val & MASK_USB_V) << 1;
+    env->PSW_USB_SV = (val & MASK_USB_SV) << 2;
+    env->PSW_USB_AV = (val & MASK_USB_AV) << 3;
+    env->PSW_USB_SAV = (val & MASK_USB_SAV) << 4;
     env->PSW = val;
 }
-- 
2.7.1

  parent reply	other threads:[~2016-02-25 12:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 12:06 [Qemu-devel] [PULL 0/6] tricore patches Bastian Koppelmann
2016-02-25 12:06 ` [Qemu-devel] [PULL 1/6] target-tricore: fix save_context_upper using env->PSW Bastian Koppelmann
2016-02-25 12:06 ` Bastian Koppelmann [this message]
2016-02-25 12:06 ` [Qemu-devel] [PULL 3/6] target-tricore: Add trap handling & SOVF/OVF traps Bastian Koppelmann
2016-02-25 12:06 ` [Qemu-devel] [PULL 4/6] target-tricore: add context managment trap generation Bastian Koppelmann
2016-02-25 12:06 ` [Qemu-devel] [PULL 5/6] target-tricore: add illegal opcode " Bastian Koppelmann
2016-02-25 12:06 ` [Qemu-devel] [PULL 6/6] target-tricore: add opd " Bastian Koppelmann
2016-02-25 14:56 ` [Qemu-devel] [PULL 0/6] tricore patches Peter Maydell

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=1456401973-29673-3-git-send-email-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.