Re: [Qemu-devel] [PATCH v3 10/11] tcg-mips: Adjust qemu_ld/st for mips64

2016-11-28 Thread Richard Henderson
On 11/27/2016 10:59 PM, Jin Guojie wrote: > In Richard's v2 patch (shown as below), the compilation on mips64 host is > disabled. > > -#define LO_OFF(MIPS_BE * 4) > -#define HI_OFF(4 - LO_OFF) > +#if TCG_TARGET_REG_BITS == 32 > +# define LO_OFF (MIPS_BE * 4) > +# define HI_OFF (4 - LO_O

Re: [Qemu-devel] [PATCH v3 10/11] tcg-mips: Adjust qemu_ld/st for mips64

2016-11-27 Thread Jin Guojie
In Richard's v2 patch (shown as below), the compilation on mips64 host is disabled. -#define LO_OFF(MIPS_BE * 4) -#define HI_OFF(4 - LO_OFF) +#if TCG_TARGET_REG_BITS == 32 +# define LO_OFF (MIPS_BE * 4) +# define HI_OFF (4 - LO_OFF) +#else +extern int link_error(void); +# define LO_OFF

Re: [Qemu-devel] [PATCH v3 10/11] tcg-mips: Adjust qemu_ld/st for mips64

2016-11-25 Thread Richard Henderson
On 11/25/2016 04:31 AM, Jin Guojie wrote: -#define LO_OFF(MIPS_BE * 4) -#define HI_OFF(4 - LO_OFF) +# define LO_OFF (MIPS_BE * sizeof(long)) +# define HI_OFF (sizeof(long) - LO_OFF) For n32, sizeof(long) == 4, and for n64, sizeof(long) == 8. So in the end this change must be wrong f

[Qemu-devel] [PATCH v3 10/11] tcg-mips: Adjust qemu_ld/st for mips64

2016-11-24 Thread Jin Guojie
Cc: Aurelien Jarno Cc: James Hogan Signed-off-by: Richard Henderson Signed-off-by: Jin Guojie --- tcg/mips/tcg-target.inc.c | 169 +++--- 1 file changed, 114 insertions(+), 55 deletions(-) diff --git a/tcg/mips/tcg-target.inc.c b/tcg/mips/tcg-target.inc