qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] target-tricore: fix depositing bits from PCXI i


From: Bastian Koppelmann
Subject: Re: [Qemu-devel] [PATCH] target-tricore: fix depositing bits from PCXI into ICR
Date: Thu, 25 Jun 2015 16:53:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

On 06/24/2015 02:01 PM, Paolo Bonzini wrote:
Spotted by Coverity, because (env->PCXI & MASK_PCXI_PCPN) >> 24
is always zero.  The immediately preceding assignment is also
wrong though.

Signed-off-by: Paolo Bonzini <address@hidden>
---
  target-tricore/op_helper.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c
index 10ed541..53edbda 100644
--- a/target-tricore/op_helper.c
+++ b/target-tricore/op_helper.c
@@ -2545,10 +2545,10 @@ void helper_rfm(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->PCXI & MASK_PCXI_PIE) >> 15);
      /* ICR.CCPN = PCXI.PCPN; */
      env->ICR = (env->ICR & ~MASK_ICR_CCPN) |
-               ((env->PCXI & ~MASK_PCXI_PCPN) >> 24);
+               ((env->PCXI & MASK_PCXI_PCPN) >> 24);
      /* {PCXI, PSW, A[10], A[11]} = M(DCX, 4 * word); */
      env->PCXI = cpu_ldl_data(env, env->DCX);
      psw_write(env, cpu_ldl_data(env, env->DCX+4));
Thanks, applied it to my tricore-next branch.

Cheers,
Bastian



reply via email to

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