aboutsummaryrefslogtreecommitdiff
path: root/gdb/x86-64-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-09-28 13:35:44 +0000
committerMark Kettenis <kettenis@gnu.org>2003-09-28 13:35:44 +0000
commit41d041d67127783bcb817154c71354e26dbef6d0 (patch)
tree331492d77b4f465feefbc0a391808917cdbd6329 /gdb/x86-64-tdep.c
parent84138122ac468000c9ec8c47b8a5e342d6a57d50 (diff)
downloadgdb-41d041d67127783bcb817154c71354e26dbef6d0.zip
gdb-41d041d67127783bcb817154c71354e26dbef6d0.tar.gz
gdb-41d041d67127783bcb817154c71354e26dbef6d0.tar.bz2
* i387-tdep.c (i387_supply_fsave, i387_supply_fxsave): Add
regcache argument and reverse the order of the other two arguments. Remove local regcache variable. Determine architecture from REGCACHE. Update comments. * x86-64-tdep.c (x86_64_supply_fxsave): Add regcache argument and reverse the order of the other two arguments. Remove local regcache variable. Determine architecture from REGCACHE. Update comments. * i387-tdep.h (i387_supply_fsave, i387_supply_fxsave): Adjust prototypes. Update comments. * x86-64-tdep.c (x86_64_supply_fxsave): Adjust prototype. Adjust comment. * amd64fbsd-nat.c (supply_fpregset, fetch_inferior_registers): Update. * go32-nat.c (fetch_register, go32_fetch_registers): Update. * i386-interix-nat.c (supply_fpregset): Update. * i386-linux-nat.c (supply_fpregset, supply_fpxregset): Update. * i386-nto-tdep.c (i386nto_supply_fpregset): Update. * i386gnu-nat.c (fetch_fpregs, supply_fpregset): Update. * i386bsd-nat.c (supply_fpregset, fetch_inferior_registers): Update. * i386nbsd-tdep.c (fetch_core_registers, fetch_elfcore_registers): Update. * i386obsd-tdep.c (fetch_core_registers): Update. * i386v4-nat.c (supply_fpregset): Update. * x86-64-linux-nat.c (supply_fpregset): Update. * x86-64-linux-tdep.c (fetch_core_registers): Update.
Diffstat (limited to 'gdb/x86-64-tdep.c')
-rw-r--r--gdb/x86-64-tdep.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 13fc5d2..39a02b0 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -1289,22 +1289,32 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
bits of these pointers (instead of just the 16-bits of the segment
selector). */
-/* Fill register REGNUM in GDB's register cache with the appropriate
+/* The 64-bit FXSAVE format differs from the 32-bit format in the
+ sense that the instruction pointer and data pointer are simply
+ 64-bit offsets into the code segment and the data segment instead
+ of a selector offset pair. The functions below store the upper 32
+ bits of these pointers (instead of just the 16-bits of the segment
+ selector). */
+
+/* Fill register REGNUM in REGCACHE with the appropriate
floating-point or SSE register value from *FXSAVE. If REGNUM is
-1, do this for all registers. This function masks off any of the
reserved bits in *FXSAVE. */
void
-x86_64_supply_fxsave (const char *fxsave, int regnum)
+x86_64_supply_fxsave (struct regcache *regcache, int regnum,
+ const void *fxsave)
{
- i387_supply_fxsave (fxsave, regnum);
+ i387_supply_fxsave (regcache, regnum, fxsave);
if (fxsave)
{
+ const char *regs = fxsave;
+
if (regnum == -1 || regnum == I387_FISEG_REGNUM)
- supply_register (I387_FISEG_REGNUM, fxsave + 12);
+ regcache_raw_supply (regcache, I387_FISEG_REGNUM, regs + 12);
if (regnum == -1 || regnum == I387_FOSEG_REGNUM)
- supply_register (I387_FOSEG_REGNUM, fxsave + 20);
+ regcache_raw_supply (regcache, I387_FOSEG_REGNUM, regs + 20);
}
}