qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 5/5] tricore: fixed wrong shifting of PCXI PIE


From: David Brenken
Subject: [Qemu-devel] [PATCH 5/5] tricore: fixed wrong shifting of PCXI PIE
Date: Mon, 19 Feb 2018 07:18:27 +0100

From: David Brenken <address@hidden>

Signed-off-by: David Brenken <address@hidden>
Signed-off-by: Georg Hofstetter <address@hidden>
Signed-off-by: Florian Artmeier <address@hidden>
---
 target/tricore/op_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c
index 7af202c..491f97d 100644
--- a/target/tricore/op_helper.c
+++ b/target/tricore/op_helper.c
@@ -2605,7 +2605,8 @@ void helper_rfe(CPUTriCoreState *env)
     }
     env->PC = env->gpr_a[11] & ~0x1;
     /* ICR.IE = PCXI.PIE; */
-    env->ICR = (env->ICR & ~MASK_ICR_IE) + ((env->PCXI & MASK_PCXI_PIE) >> 15);
+    env->ICR = (env->ICR & ~MASK_ICR_IE)
+            | ((env->PCXI & MASK_PCXI_PIE) >> (21 - 15));
     /* ICR.CCPN = PCXI.PCPN; */
     env->ICR = (env->ICR & ~MASK_ICR_CCPN) +
                ((env->PCXI & MASK_PCXI_PCPN) >> 24);
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]