21.03.2015 16:44, Stefan Weil wrote: > 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 > Signed-off-by: Stefan Weil <[email protected]> > --- > 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}; */ >
