Re: [Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons

2018-01-15 Thread Richard Henderson
On 01/15/2018 09:31 AM, Richard Henderson wrote: > But we can't *not* swap the arguments to the generated comparison. Otherwise > we're computing the wrong thing. Bah. I have of course forgotten about the RSC instruction, which takes an immediate. Will fix. r~

Re: [Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons

2018-01-15 Thread Richard Henderson
On 01/15/2018 06:27 AM, Peter Maydell wrote: > We could avoid the annoying "load LE/GE immediates to tempreg" > extra code by having tcg_out_cmp2() return a flag to tell > the caller which way round to put the conditions for its two > conditional ARITH_MOV insns (for setcond2) or which condition >

Re: [Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons

2018-01-15 Thread Richard Henderson
On 01/15/2018 06:27 AM, Peter Maydell wrote: > (may be worth mentioning > in particular how "rIM" differs from "rINK" -- I think the answer is that > we want to say "valid-immediate OR (valid-if-inverted AND valid-if-negated)", > whereas 'rINK' is "valid-immediate OR valid-if-inverted OR valid-if-n

Re: [Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons

2018-01-15 Thread Peter Maydell
On 15 January 2018 at 16:18, Richard Henderson wrote: > On 01/15/2018 06:27 AM, Peter Maydell wrote: >> The code looks OK to me. I'm guessing the sparc guest failure is >> just because we now generate more code for some of the comparison >> cases and that doesn't fit in the buffer... > > I don't r

Re: [Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons

2018-01-15 Thread Richard Henderson
On 01/15/2018 06:27 AM, Peter Maydell wrote: > On 10 January 2018 at 05:39, Richard Henderson 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

Re: [Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons

2018-01-15 Thread Peter Maydell
On 10 January 2018 at 05:39, Richard Henderson 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. > > Signed

Re: [Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons

2018-01-10 Thread Michael Roth
Quoting Richard Henderson (2018-01-09 23:39:08) > 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. > > Signed-off-

[Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons

2018-01-09 Thread Richard Henderson
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. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.inc.c | 112 +++