This commit is contained in:
parent
baf2d99d3d
commit
cff68223e0
60
altivec-regs.diff
Normal file
60
altivec-regs.diff
Normal file
@ -0,0 +1,60 @@
|
||||
2007-03-15 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* ppc-linux-tdep.c (ppc_linux_return_value): Vectors are returned
|
||||
in general registers.
|
||||
|
||||
--- gdb/ppc-linux-tdep.c
|
||||
+++ gdb/ppc-linux-tdep.c
|
||||
@@ -484,17 +484,47 @@
|
||||
/* For historic reasons, PPC 32 GNU/Linux follows PowerOpen rather
|
||||
than the 32 bit SYSV R4 ABI structure return convention - all
|
||||
structures, no matter their size, are put in memory. Vectors,
|
||||
- which were added later, do get returned in a register though. */
|
||||
+ which were added later, do get returned in a register, although
|
||||
+ not in an AltiVec register. */
|
||||
|
||||
static enum return_value_convention
|
||||
ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype,
|
||||
struct regcache *regcache, gdb_byte *readbuf,
|
||||
const gdb_byte *writebuf)
|
||||
{
|
||||
- if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
|
||||
- || TYPE_CODE (valtype) == TYPE_CODE_UNION)
|
||||
- && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8)
|
||||
- && TYPE_VECTOR (valtype)))
|
||||
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
+
|
||||
+ if (TYPE_LENGTH (valtype) == 16
|
||||
+ && TYPE_CODE (valtype) == TYPE_CODE_ARRAY
|
||||
+ && TYPE_VECTOR (valtype))
|
||||
+ {
|
||||
+ /* Return value is in r3-r6. */
|
||||
+ if (readbuf)
|
||||
+ {
|
||||
+ regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3,
|
||||
+ readbuf + 0);
|
||||
+ regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
|
||||
+ readbuf + 4);
|
||||
+ regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 5,
|
||||
+ readbuf + 8);
|
||||
+ regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 6,
|
||||
+ readbuf + 12);
|
||||
+ }
|
||||
+ if (writebuf)
|
||||
+ {
|
||||
+ regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3,
|
||||
+ writebuf + 0);
|
||||
+ regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 4,
|
||||
+ writebuf + 4);
|
||||
+ regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 5,
|
||||
+ writebuf + 8);
|
||||
+ regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 6,
|
||||
+ writebuf + 12);
|
||||
+ }
|
||||
+ return RETURN_VALUE_REGISTER_CONVENTION;
|
||||
+ }
|
||||
+ else if (TYPE_CODE (valtype) == TYPE_CODE_STRUCT
|
||||
+ || TYPE_CODE (valtype) == TYPE_CODE_UNION)
|
||||
return RETURN_VALUE_STRUCT_CONVENTION;
|
||||
else
|
||||
return ppc_sysv_abi_return_value (gdbarch, valtype, regcache, readbuf,
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 15 18:22:31 CET 2007 - schwab@suse.de
|
||||
|
||||
- Fix altivec vector return location [#250004].
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 12 18:07:07 CET 2007 - schwab@suse.de
|
||||
|
||||
|
6
gdb.spec
6
gdb.spec
@ -21,7 +21,7 @@ Group: Development/Tools/Debuggers
|
||||
Autoreqprov: on
|
||||
PreReq: %{install_info_prereq}
|
||||
Version: 6.6
|
||||
Release: 18
|
||||
Release: 20
|
||||
Summary: The GNU Debugger
|
||||
Source: gdb-%{version}.tar.bz2
|
||||
Patch1: gdb-misc.patch
|
||||
@ -41,6 +41,7 @@ Patch16: pc-regnum.diff
|
||||
Patch17: show-endian.diff
|
||||
Patch18: elf-symtab-read.diff
|
||||
Patch19: atomic-single-step.diff
|
||||
Patch20: altivec-regs.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -92,6 +93,7 @@ cd ..
|
||||
cd gdb
|
||||
%patch19
|
||||
cd ..
|
||||
%patch20
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS" \
|
||||
@ -147,6 +149,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Mar 15 2007 - schwab@suse.de
|
||||
- Fix altivec vector return location [#250004].
|
||||
* Mon Mar 12 2007 - schwab@suse.de
|
||||
- Update ppc DWARF patch to also handle broken debug info from old
|
||||
compilers.
|
||||
|
Loading…
x
Reference in New Issue
Block a user