From 41d041d67127783bcb817154c71354e26dbef6d0 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 28 Sep 2003 13:35:44 +0000 Subject: * 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. --- gdb/i387-tdep.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'gdb/i387-tdep.c') diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 63943e7..ff369f9 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -378,15 +378,14 @@ static int fsave_offset[] = (fsave + fsave_offset[regnum - I387_ST0_REGNUM]) -/* Fill register REGNUM in GDB's register cache with the appropriate - value from *FSAVE. This function masks off any of the reserved - bits in *FSAVE. */ +/* Fill register REGNUM in REGCACHE with the appropriate value from + *FSAVE. This function masks off any of the reserved bits in + *FSAVE. */ void -i387_supply_fsave (const void *fsave, int regnum) +i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave) { - struct regcache *regcache = current_regcache; - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache)); const char *regs = fsave; int i; @@ -524,15 +523,14 @@ static int fxsave_offset[] = static int i387_tag (const unsigned char *raw); -/* Fill register REGNUM in GDB's register cache with the appropriate +/* Fill register REGNUM in REGCACHE with the appropriate floating-point or SSE register value from *FXSAVE. This function masks off any of the reserved bits in *FXSAVE. */ void -i387_supply_fxsave (const void *fxsave, int regnum) +i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave) { - struct regcache *regcache = current_regcache; - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache)); const char *regs = fxsave; int i; -- cgit v1.1