target-tricore: Fix check which was always false
PATCH 1/1 target-tricore: Fix check which was always false
With a mask value of 0x00400000, the result will never be 1. This fixes a Coverity warning.
--- target-tricore/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target-tricore/op_helper.c +1 -1
@@ -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}; */
Signature · 1 line
2.1.4
Hi mjt,
Quoted 13 lines · Stefan Weil
With a mask value of
0x00400000, the result will never be 1. This fixes a Coverity warning.Signed-off-by Stefan Weil <[email protected]>--- target-tricore/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target-tricore/op_helper.c +0
-0
target-tricore/op_helper.c void helper_rslcx(CPUTriCoreState *env) · line 2599
Quoted 8 lines
target-tricore/op_helper.c +1
-1@@ -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
Quoted 2 lines · Stefan Weil
With a mask value of
0x00400000, the result will never be 1. This fixes a Coverity warning.
Might be a bit risky if the whole thing wasn't a complete no-op. I wonder maybe the whole this if statement should be removed..
But anyway, applied to -trivial, thank you!
/mjt
Quoted 19 lines
Signed-off-by Stefan Weil <[email protected]>--- target-tricore/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target-tricore/op_helper.c +1
-1@@ -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}; */
Quoted 10 lines · Michael Tokarev
Quoted 2 lines · Stefan Weil
With a mask value of
0x00400000, the result will never be 1. This fixes a Coverity warning.Might be a bit risky if the whole thing wasn't a complete no-op. I wonder maybe the whole this if statement should be removed..
But anyway, applied to -trivial, thank you!
/mjt
Thanks. The statement is just an indicator for a trap which needs to happen there. I'm working on this right now, so it won't stay like this for long :).
Cheers,
Bastian