aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauerman@br.ibm.com>2008-11-18 21:48:48 +0000
committerThiago Jung Bauermann <bauerman@br.ibm.com>2008-11-18 21:48:48 +0000
commit2c4ad7812552d2384390260c7906c3d6b4c476fa (patch)
treee670eeaf2e791759c89ceb17e1e95e58291b94f1 /gdb/gdbserver
parent69abc51c172060b82b71123ca818062ee699099e (diff)
downloadgdb-2c4ad7812552d2384390260c7906c3d6b4c476fa.zip
gdb-2c4ad7812552d2384390260c7906c3d6b4c476fa.tar.gz
gdb-2c4ad7812552d2384390260c7906c3d6b4c476fa.tar.bz2
gdb/
* features/Makefile (rs6000/powerpc-isa205-32l-expedite, rs6000/powerpc-isa205-altivec32l-expedite, powerpc-isa205-vsx32l-expedite, rs6000/powerpc-isa205-64l-expedite, rs6000/powerpc-isa205-altivec64l-expedite, powerpc-isa205-vsx64l-expedite): New variables. * regformats/rs6000/powerpc-isa205-32l.dat: Generate. * regformats/rs6000/powerpc-isa205-altivec32l.dat: Generate. * regformats/rs6000/powerpc-isa205-vsx32l.dat: Generate. * regformats/rs6000/powerpc-isa205-64l.dat: Generate. * regformats/rs6000/powerpc-isa205-altivec64l.dat: Generate. * regformats/rs6000/powerpc-isa205-vsx64l.dat: Generate. gdbserver/ * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c, powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c, powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c, powerpc-isa205-64l.o, powerpc-isa205-64l.c, powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c, powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets. * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and XML target descriptions. * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR when inferior is running on an ISA 2.05 or later processor. Add special case to return offset for full 64-bit slot of FPSCR when in 32-bits.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog15
-rw-r--r--gdb/gdbserver/Makefile.in24
-rw-r--r--gdb/gdbserver/configure.srv13
-rw-r--r--gdb/gdbserver/linux-ppc-low.c49
4 files changed, 95 insertions, 6 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index a4194dc..8b25d43 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,18 @@
+2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
+ powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
+ powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
+ powerpc-isa205-64l.o, powerpc-isa205-64l.c,
+ powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
+ powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
+ * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
+ XML target descriptions.
+ * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
+ when inferior is running on an ISA 2.05 or later processor. Add
+ special case to return offset for full 64-bit slot of FPSCR when
+ in 32-bits.
+
2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
* Makefile.in (SFILES, clean): Added sparc64 files.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 2a45d28..641ebe2 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -215,7 +215,11 @@ clean:
rm -f arm-with-iwmmxt.c mips-linux.c mips64-linux.c
rm -f powerpc-32l.c powerpc-64l.c powerpc-e500l.c
rm -f powerpc-altivec32l.c powerpc-vsx32l.c powerpc-altivec64l.c
- rm -f powerpc-vsx64l.c xml-builtin.c stamp-xml
+ rm -f powerpc-vsx64l.c
+ rm -f powerpc-isa205-32l.c powerpc-isa205-64l.c
+ rm -f powerpc-isa205-altivec32l.c powerpc-isa205-vsx32l.c powerpc-isa205-altivec64l.c
+ rm -f powerpc-isa205-vsx64l.c
+ rm -f xml-builtin.c stamp-xml
maintainer-clean realclean distclean: clean
rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log
@@ -362,6 +366,15 @@ powerpc-altivec32l.c : $(srcdir)/../regformats/rs6000/powerpc-altivec32l.dat $(r
powerpc-vsx32l.o : powerpc-vsx32l.c $(regdef_h)
powerpc-vsx32l.c : $(srcdir)/../regformats/rs6000/powerpc-vsx32l.dat $(regdat_sh)
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-vsx32l.dat powerpc-vsx32l.c
+powerpc-isa205-32l.o : powerpc-isa205-32l.c $(regdef_h)
+powerpc-isa205-32l.c : $(srcdir)/../regformats/rs6000/powerpc-isa205-32l.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-isa205-32l.dat powerpc-isa205-32l.c
+powerpc-isa205-altivec32l.o : powerpc-isa205-altivec32l.c $(regdef_h)
+powerpc-isa205-altivec32l.c : $(srcdir)/../regformats/rs6000/powerpc-isa205-altivec32l.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-isa205-altivec32l.dat powerpc-isa205-altivec32l.c
+powerpc-isa205-vsx32l.o : powerpc-isa205-vsx32l.c $(regdef_h)
+powerpc-isa205-vsx32l.c : $(srcdir)/../regformats/rs6000/powerpc-isa205-vsx32l.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-isa205-vsx32l.dat powerpc-isa205-vsx32l.c
powerpc-e500l.o : powerpc-e500l.c $(regdef_h)
powerpc-e500l.c : $(srcdir)/../regformats/rs6000/powerpc-e500l.dat $(regdat_sh)
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-e500l.dat powerpc-e500l.c
@@ -374,6 +387,15 @@ powerpc-altivec64l.c : $(srcdir)/../regformats/rs6000/powerpc-altivec64l.dat $(r
powerpc-vsx64l.o : powerpc-vsx64l.c $(regdef_h)
powerpc-vsx64l.c : $(srcdir)/../regformats/rs6000/powerpc-vsx64l.dat $(regdat_sh)
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-vsx64l.dat powerpc-vsx64l.c
+powerpc-isa205-64l.o : powerpc-isa205-64l.c $(regdef_h)
+powerpc-isa205-64l.c : $(srcdir)/../regformats/rs6000/powerpc-isa205-64l.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-isa205-64l.dat powerpc-isa205-64l.c
+powerpc-isa205-altivec64l.o : powerpc-isa205-altivec64l.c $(regdef_h)
+powerpc-isa205-altivec64l.c : $(srcdir)/../regformats/rs6000/powerpc-isa205-altivec64l.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-isa205-altivec64l.dat powerpc-isa205-altivec64l.c
+powerpc-isa205-vsx64l.o : powerpc-isa205-vsx64l.c $(regdef_h)
+powerpc-isa205-vsx64l.c : $(srcdir)/../regformats/rs6000/powerpc-isa205-vsx64l.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-isa205-vsx64l.dat powerpc-isa205-vsx64l.c
reg-s390.o : reg-s390.c $(regdef_h)
reg-s390.c : $(srcdir)/../regformats/reg-s390.dat $(regdat_sh)
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-s390.dat reg-s390.c
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index b4d15bf..624acce 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -103,24 +103,37 @@ case "${target}" in
powerpc*-*-linux*) srv_regobj="powerpc-32l.o"
srv_regobj="${srv_regobj} powerpc-altivec32l.o"
srv_regobj="${srv_regobj} powerpc-vsx32l.o"
+ srv_regobj="${srv_regobj} powerpc-isa205-32l.o"
+ srv_regobj="${srv_regobj} powerpc-isa205-altivec32l.o"
+ srv_regobj="${srv_regobj} powerpc-isa205-vsx32l.o"
srv_regobj="${srv_regobj} powerpc-e500l.o"
srv_regobj="${srv_regobj} powerpc-64l.o"
srv_regobj="${srv_regobj} powerpc-altivec64l.o"
srv_regobj="${srv_regobj} powerpc-vsx64l.o"
+ srv_regobj="${srv_regobj} powerpc-isa205-64l.o"
+ srv_regobj="${srv_regobj} powerpc-isa205-altivec64l.o"
+ srv_regobj="${srv_regobj} powerpc-isa205-vsx64l.o"
srv_tgtobj="linux-low.o linux-ppc-low.o"
srv_xmlfiles="rs6000/powerpc-32l.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-altivec32l.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-vsx32l.xml"
+ srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-32l.xml"
+ srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-altivec32l.xml"
+ srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-vsx32l.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power-altivec.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power-vsx.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power-core.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power-linux.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power-fpu.xml"
+ srv_xmlfiles="${srv_xmlfiles} rs6000/power-fpu-isa205.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-e500l.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power-spe.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-64l.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-altivec64l.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-vsx64l.xml"
+ srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-64l.xml"
+ srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-altivec64l.xml"
+ srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-isa205-vsx64l.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power64-core.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power64-linux.xml"
srv_linux_usrregs=yes
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
index a7bd83f..4b6ac30 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
@@ -28,6 +28,7 @@
#define PPC_FEATURE_HAS_VSX 0x00000080
#define PPC_FEATURE_HAS_ALTIVEC 0x10000000
#define PPC_FEATURE_HAS_SPE 0x00800000
+#define PPC_FEATURE_ARCH_2_05 0x00001000
static unsigned long ppc_hwcap;
@@ -38,6 +39,12 @@ void init_registers_powerpc_32l (void);
void init_registers_powerpc_altivec32l (void);
/* Defined in auto-generated file powerpc-vsx32l.c. */
void init_registers_powerpc_vsx32l (void);
+/* Defined in auto-generated file powerpc-isa205-32l.c. */
+void init_registers_powerpc_isa205_32l (void);
+/* Defined in auto-generated file powerpc-isa205-altivec32l.c. */
+void init_registers_powerpc_isa205_altivec32l (void);
+/* Defined in auto-generated file powerpc-isa205-vsx32l.c. */
+void init_registers_powerpc_isa205_vsx32l (void);
/* Defined in auto-generated file powerpc-e500l.c. */
void init_registers_powerpc_e500l (void);
/* Defined in auto-generated file powerpc-64l.c. */
@@ -46,6 +53,12 @@ void init_registers_powerpc_64l (void);
void init_registers_powerpc_altivec64l (void);
/* Defined in auto-generated file powerpc-vsx64l.c. */
void init_registers_powerpc_vsx64l (void);
+/* Defined in auto-generated file powerpc-isa205-64l.c. */
+void init_registers_powerpc_isa205_64l (void);
+/* Defined in auto-generated file powerpc-isa205-altivec64l.c. */
+void init_registers_powerpc_isa205_altivec64l (void);
+/* Defined in auto-generated file powerpc-isa205-vsx64l.c. */
+void init_registers_powerpc_isa205_vsx64l (void);
#define ppc_num_regs 73
@@ -260,9 +273,20 @@ ppc_arch_setup (void)
{
ppc_get_hwcap (&ppc_hwcap);
if (ppc_hwcap & PPC_FEATURE_HAS_VSX)
- init_registers_powerpc_vsx64l ();
+ {
+ if (ppc_hwcap & PPC_FEATURE_ARCH_2_05)
+ init_registers_powerpc_isa205_vsx64l ();
+ else
+ init_registers_powerpc_vsx64l ();
+ }
else if (ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC)
- init_registers_powerpc_altivec64l ();
+ {
+ if (ppc_hwcap & PPC_FEATURE_ARCH_2_05)
+ init_registers_powerpc_isa205_altivec64l ();
+ else
+ init_registers_powerpc_altivec64l ();
+ }
+
return;
}
#endif
@@ -272,10 +296,19 @@ ppc_arch_setup (void)
ppc_get_hwcap (&ppc_hwcap);
if (ppc_hwcap & PPC_FEATURE_HAS_VSX)
- init_registers_powerpc_vsx32l ();
+ {
+ if (ppc_hwcap & PPC_FEATURE_ARCH_2_05)
+ init_registers_powerpc_isa205_vsx32l ();
+ else
+ init_registers_powerpc_vsx32l ();
+ }
else if (ppc_hwcap & PPC_FEATURE_HAS_ALTIVEC)
- init_registers_powerpc_altivec32l ();
-
+ {
+ if (ppc_hwcap & PPC_FEATURE_ARCH_2_05)
+ init_registers_powerpc_isa205_altivec32l ();
+ else
+ init_registers_powerpc_altivec32l ();
+ }
/* On 32-bit machines, check for SPE registers.
Set the low target's regmap field as appropriately. */
@@ -286,6 +319,12 @@ ppc_arch_setup (void)
init_registers_powerpc_e500l ();
the_low_target.regmap = ppc_regmap_e500;
}
+
+ /* If the FPSCR is 64-bit wide, we need to fetch the whole 64-bit
+ slot and not just its second word. The PT_FPSCR supplied in a
+ 32-bit GDB compilation doesn't reflect this. */
+ if (register_size (70) == 8)
+ ppc_regmap[70] = (48 + 2*32) * sizeof (long);
#endif
}