qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for vari


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 03/14] target-ppc: use separate indices for various translation modes
Date: Tue, 16 Sep 2014 11:49:15 -0700

On 16 September 2014 10:20, Tom Musta <address@hidden> wrote:
>
>   1389      /* Compensate for very large offsets.  */
>   1390      if (add_off >= 0x8000) {
>   1391          /* Most target env are smaller than 32k; none are larger than 
> 64k.
>   1392             Simplify the logic here merely to offset by 0x7ff0, giving 
> us a
>   1393             range just shy of 64k.  Check this assumption.  */
>   1394          QEMU_BUILD_BUG_ON(offsetof(CPUArchState,
>   1395                                     tlb_table[NB_MMU_MODES - 1][1])
>   1396                            > 0x7ff0 + 0x7fff);
>   1397          tcg_out32(s, ADDI | TAI(TCG_REG_TMP1, base, 0x7ff0));
>   1398          base = TCG_REG_TMP1;
>   1399          cmp_off -= 0x7ff0;
>   1400          add_off -= 0x7ff0;
>   1401      }

Is it possible to promote this BUILD_BUG_ON from "only on
PPC hosts" to "on all builds" ? It's really checking a
property of the target CPU's code, not a property of
the TCG backend, and I bet a lot of our backends don't
get built very often so we could easily miss breakage.
I guess you'd need to define and check a worst-case value
in a common header somewhere.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]