On 09/09/2013 05:28 PM, Richard Henderson wrote:
> + if (add_off >= 0x8000) {
> + /* Most target env are smaller than 32k; none are larger than 64k.
> + Simplify the logic here merely to offset by 0x8000, giving us a
> + range just shy of 64k. Check this assumption. */
> + QEMU_BUILD_BUG_ON(offsetof(CPUArchState,
> + tlb_table[NB_MMU_MODES - 1][1])
> + > 0x8000 + 0x7fff);
> + tcg_out32(s, ADDI | RT(r1) | RA(base) | 0x8000);
> + base = r1;
> + cmp_off -= 0x8000;
> + add_off -= 0x8000;
And of course this is wrong, because 0x8000 == -0x8000.
I've fixed this more than once on my branches. How do I keep
managing to lose that fix?