+2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.in (clean): Also remove x32.c x32-linux.c
+ x32-avx.c x32-avx-linux.c.
+ (x32.o): New target.
+ (x32.c): Likewise.
+ (x32-linux.o): Likewise.
+ (x32-linux.c): Likewise.
+ (x32-avx.o): Likewise.
+ (x32-avx.c): Likewise.
+ (x32-avx-linux.o): Likewise.
+ (x32-avx-linux.c): Likewise.
+
+ * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
+ (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
+ (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
+ (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
+ (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
+ i386/x32-avx-linux.xml.
+
+ * linux-x86-low.c (init_registers_x32_linux): New prototype.
+ (init_registers_x32_avx_linux): Likwise.
+ (x86_linux_update_xmltarget): Call init_registers_x32_linux
+ or init_registers_x32_avx_linux if linux_is_elf64 is false.
+
2012-04-13 Pedro Alves <palves@redhat.com>
* Makefile.in (GNULIB_FLAGS_TO_PASS): New.
rm -f i386-avx.c i386-avx-linux.c
rm -f amd64-avx.c amd64-avx-linux.c
rm -f i386-mmx.c i386-mmx-linux.c
+ rm -f x32.c x32-linux.c
+ rm -f x32-avx.c x32-avx-linux.c
@cd gnulib; $(MAKE) $(FLAGS_TO_PASS) $(GNULIB_FLAGS_TO_PASS) clean
maintainer-clean realclean distclean: clean
amd64-avx-linux.o : amd64-avx-linux.c $(regdef_h)
amd64-avx-linux.c : $(srcdir)/../regformats/i386/amd64-avx-linux.dat $(regdat_sh)
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-linux.dat amd64-avx-linux.c
+x32.o : x32.c $(regdef_h)
+x32.c : $(srcdir)/../regformats/i386/x32.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32.dat x32.c
+x32-linux.o : x32-linux.c $(regdef_h)
+x32-linux.c : $(srcdir)/../regformats/i386/x32-linux.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-linux.dat x32-linux.c
+x32-avx.o : x32-avx.c $(regdef_h)
+x32-avx.c : $(srcdir)/../regformats/i386/x32-avx.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-avx.dat x32-avx.c
+x32-avx-linux.o : x32-avx-linux.c $(regdef_h)
+x32-avx-linux.c : $(srcdir)/../regformats/i386/x32-avx-linux.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-avx-linux.dat x32-avx-linux.c
reg-xtensa.o : reg-xtensa.c $(regdef_h)
reg-xtensa.c : $(srcdir)/../regformats/reg-xtensa.dat $(regdat_sh)
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-xtensa.dat reg-xtensa.c
srv_i386_regobj="i386.o i386-avx.o i386-mmx.o"
srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-mmx-linux.o"
-srv_amd64_regobj="amd64.o amd64-avx.o"
-srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o"
+srv_amd64_regobj="amd64.o amd64-avx.o x32.o x32-avx.o"
+srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o x32-linux.o x32-avx-linux.o"
ipa_i386_linux_regobj=i386-linux-ipa.o
ipa_amd64_linux_regobj=amd64-linux-ipa.o
srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml"
-srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml"
+srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml i386/x32-core.xml"
srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles"
-srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml $srv_i386_64bit_xmlfiles"
+srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/x32.xml i386/x32-avx.xml $srv_i386_64bit_xmlfiles"
srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml $srv_i386_32bit_xmlfiles"
-srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/64bit-linux.xml $srv_i386_64bit_xmlfiles"
+srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/64bit-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml $srv_i386_64bit_xmlfiles"
# Input is taken from the "${target}" variable.
void init_registers_amd64_avx_linux (void);
/* Defined in auto-generated file i386-mmx-linux.c. */
void init_registers_i386_mmx_linux (void);
+/* Defined in auto-generated file x32-linux.c. */
+void init_registers_x32_linux (void);
+/* Defined in auto-generated file x32-avx-linux.c. */
+void init_registers_x32_avx_linux (void);
static unsigned char jump_insn[] = { 0xe9, 0, 0, 0, 0 };
static unsigned char small_jump_insn[] = { 0x66, 0xe9, 0, 0 };
#ifdef __x86_64__
if (num_xmm_registers == 8)
init_registers_i386_linux ();
- else
+ else if (linux_is_elf64)
init_registers_amd64_linux ();
+ else
+ init_registers_x32_linux ();
#else
{
# ifdef HAVE_PTRACE_GETFPXREGS
/* I386 has 8 xmm regs. */
if (num_xmm_registers == 8)
init_registers_i386_avx_linux ();
- else
+ else if (linux_is_elf64)
init_registers_amd64_avx_linux ();
+ else
+ init_registers_x32_avx_linux ();
#else
init_registers_i386_avx_linux ();
#endif