aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-tdep.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-05-10 18:58:44 +0000
committerJim Blandy <jimb@codesourcery.com>2004-05-10 18:58:44 +0000
commit7bcda025ec2abe0f8a8583a11083ee06e6b46d86 (patch)
tree7a1e525f38b21b59a15c914efab7c369e0b95201 /gdb/ppc-linux-tdep.c
parentcca0d3b0302614184413157e253136ebf3aa5295 (diff)
downloadfsf-binutils-gdb-7bcda025ec2abe0f8a8583a11083ee06e6b46d86.zip
fsf-binutils-gdb-7bcda025ec2abe0f8a8583a11083ee06e6b46d86.tar.gz
fsf-binutils-gdb-7bcda025ec2abe0f8a8583a11083ee06e6b46d86.tar.bz2
Back out change. The NetBSD changes need Jason Thorpe's approval, but
he hasn't reviewed it yet.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r--gdb/ppc-linux-tdep.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 49f4ad6..94c67f1 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -944,16 +944,12 @@ ppc_linux_sigtramp_cache (struct frame_info *next_frame, void **this_cache)
cache->saved_regs[tdep->ppc_cr_regnum].addr = gpregs + 38 * tdep->wordsize;
/* Floating point registers. */
- if (ppc_floating_point_unit_p (gdbarch))
+ for (i = 0; i < 32; i++)
{
- for (i = 0; i < ppc_num_fprs; i++)
- {
- int regnum = i + tdep->ppc_fp0_regnum;
- cache->saved_regs[regnum].addr = fpregs + i * tdep->wordsize;
- }
- cache->saved_regs[tdep->ppc_fpscr_regnum].addr
- = fpregs + 32 * tdep->wordsize;
+ int regnum = i + tdep->ppc_fp0_regnum;
+ cache->saved_regs[regnum].addr = fpregs + i * tdep->wordsize;
}
+ cache->saved_regs[tdep->ppc_fpscr_regnum].addr = fpregs + 32 * tdep->wordsize;
return cache;
}
@@ -1022,18 +1018,15 @@ ppc_linux_supply_fpregset (const struct regset *regset,
struct gdbarch_tdep *regcache_tdep = gdbarch_tdep (regcache_arch);
const bfd_byte *buf = fpset;
- if (! ppc_floating_point_unit_p (regcache_arch))
- return;
-
- for (regi = 0; regi < ppc_num_fprs; regi++)
+ for (regi = 0; regi < 32; regi++)
regcache_raw_supply (regcache,
regcache_tdep->ppc_fp0_regnum + regi,
buf + 8 * regi);
- /* The FPSCR is stored in the low order word of the last
- doubleword in the fpregset. */
+ /* The FPSCR is stored in the low order word of the last doubleword in the
+ fpregset. */
regcache_raw_supply (regcache, regcache_tdep->ppc_fpscr_regnum,
- buf + 8 * 32 + 4);
+ buf + 8 * 32 + 4);
}
static struct regset ppc_linux_fpregset = { NULL, ppc_linux_supply_fpregset };