target-tricore: Fix wrong precedences on psw_write
authorBastian Koppelmann <kbastian@mail.uni-paderborn.de>
Tue, 16 Feb 2016 21:27:32 +0000 (22:27 +0100)
committerBastian Koppelmann <kbastian@mail.uni-paderborn.de>
Thu, 25 Feb 2016 11:51:31 +0000 (12:51 +0100)
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

index a8fd418b4296bcb4e9c9f884feec0227f18c59a6..7d96daddb120268fa392537a2fd4a44a161b8efe 100644 (file)
@@ -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;
 }