qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] target-tricore: Fix check which


From: Bastian Koppelmann
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] target-tricore: Fix check which was always false
Date: Wed, 25 Mar 2015 09:26:20 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Hi mjt,

On 03/21/2015 02:44 PM, Stefan Weil wrote:
With a mask value of 0x00400000, the result will never be 1.
This fixes a Coverity warning.

Signed-off-by: Stefan Weil <address@hidden>
---
  target-tricore/op_helper.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c
index 0e7b4e8..b7d18b2 100644
--- a/target-tricore/op_helper.c
+++ b/target-tricore/op_helper.c
@@ -2593,7 +2593,7 @@ void helper_rslcx(CPUTriCoreState *env)
          /* CSU trap */
      }
      /* if (PCXI.UL == 1) then trap(CTYP); */
-    if ((env->PCXI & MASK_PCXI_UL) == 1) {
+    if ((env->PCXI & MASK_PCXI_UL) != 0) {
          /* CTYP trap */
      }
      /* EA = {PCXI.PCXS, 6'b0, PCXI.PCXO, 6'b0}; */

are you picking this one up? It looks good to me.

Cheers,
Bastian



reply via email to

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