On 16 January 2018 at 03:45, Richard Henderson <richard.hender...@linaro.org> wrote: > The code sequence we were generating was only good for unsigned > comparisons. For signed comparisions, use the sequence from gcc. > > Fixes booting of ppc64 firmware, with a patch changing the code > sequence for ppc comparisons. > > Tested-by: Michael Roth <mdr...@linux.vnet.ibm.com> > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > tcg/arm/tcg-target.inc.c | 97 > ++++++++++++++++++++++++++++++++---------------- > 1 file changed, 65 insertions(+), 32 deletions(-) > > diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c > index 98a12535a5..0ff283d84f 100644 > --- a/tcg/arm/tcg-target.inc.c > +++ b/tcg/arm/tcg-target.inc.c > @@ -239,10 +239,10 @@ static void patch_reloc(tcg_insn_unit *code_ptr, int > type, > } > } > > -#define TCG_CT_CONST_ARM 0x100 > -#define TCG_CT_CONST_INV 0x200 > -#define TCG_CT_CONST_NEG 0x400 > -#define TCG_CT_CONST_ZERO 0x800 > +#define TCG_CT_CONST_ARM 0x0100 > +#define TCG_CT_CONST_INV 0x0200 > +#define TCG_CT_CONST_NEG 0x0400 > +#define TCG_CT_CONST_ZERO 0x1000
You might as well just drop this hunk now you're not adding a new entry. > /* parse target specific constraints */ > static const char *target_parse_constraint(TCGArgConstraint *ct, > @@ -351,8 +351,7 @@ static inline int check_fit_imm(uint32_t imm) > static inline int tcg_target_const_match(tcg_target_long val, TCGType type, > const TCGArgConstraint *arg_ct) > { > - int ct; > - ct = arg_ct->ct; > + int ct = arg_ct->ct; > if (ct & TCG_CT_CONST) { > return 1; > } else if ((ct & TCG_CT_CONST_ARM) && check_fit_imm(val)) { Ditto. Otherwise Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM