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
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
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
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