From 26144df5d2c0b2fa0244f3fb95f8ed2686ac0815 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sun, 6 May 2007 14:28:27 +0000 Subject: [PATCH] * i387-tdep.c (i387_fill_fsave, i387_fill_fxsave): Remove. * i387-tdep.h (i387_fill_fsave, i387_fill_fxsave): Remove prototypes. * i368-linux-nat.c (supply_fpregset, supply_fpxregset): Replace i387_fill_fsave and i387_fill_fxsave calls by inline copies. * i386-nto-tdep.c (i386nto_regset_fill): Likewise. * i386gnu-nat.c (store_fpregs): Likewise. * i386v4-nat.c (fill_fpregset): Likewise. * go32-nat.c (store_register, go32_store_registers): Likewise. --- gdb/ChangeLog | 11 +++++++++++ gdb/go32-nat.c | 4 ++-- gdb/i386-linux-nat.c | 4 ++-- gdb/i386-nto-tdep.c | 4 ++-- gdb/i386gnu-nat.c | 2 +- gdb/i386v4-nat.c | 2 +- gdb/i387-tdep.c | 22 ---------------------- gdb/i387-tdep.h | 14 -------------- 8 files changed, 19 insertions(+), 44 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 65efbf4..62afb81 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2007-05-06 Ulrich Weigand + * i387-tdep.c (i387_fill_fsave, i387_fill_fxsave): Remove. + * i387-tdep.h (i387_fill_fsave, i387_fill_fxsave): Remove prototypes. + * i368-linux-nat.c (supply_fpregset, supply_fpxregset): Replace + i387_fill_fsave and i387_fill_fxsave calls by inline copies. + * i386-nto-tdep.c (i386nto_regset_fill): Likewise. + * i386gnu-nat.c (store_fpregs): Likewise. + * i386v4-nat.c (fill_fpregset): Likewise. + * go32-nat.c (store_register, go32_store_registers): Likewise. + +2007-05-06 Ulrich Weigand + * cris-tdep.c (supply_gregset): Rename to ... (cris_supply_gregset): ... this. Add REGCACHE parameter. Use it instead of current_regcache. diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index c64874f..919b42a 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -497,7 +497,7 @@ store_register (int regno) regcache_raw_collect (current_regcache, regno, (char *) &a_tss + regno_mapping[regno].tss_ofs); else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno)) - i387_fill_fsave ((char *) &npx, regno); + i387_collect_fsave (current_regcache, regno, &npx); else internal_error (__FILE__, __LINE__, _("Invalid register no. %d in store_register."), regno); @@ -514,7 +514,7 @@ go32_store_registers (int regno) { for (r = 0; r < FP0_REGNUM; r++) store_register (r); - i387_fill_fsave ((char *) &npx, -1); + i387_collect_fsave (current_regcache, -1, &npx); } } diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index dfa260e..8572c57 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -303,7 +303,7 @@ supply_fpregset (elf_fpregset_t *fpregsetp) void fill_fpregset (elf_fpregset_t *fpregsetp, int regno) { - i387_fill_fsave ((char *) fpregsetp, regno); + i387_collect_fsave (current_regcache, regno, fpregsetp); } #ifdef HAVE_PTRACE_GETREGS @@ -367,7 +367,7 @@ supply_fpxregset (elf_fpxregset_t *fpxregsetp) void fill_fpxregset (elf_fpxregset_t *fpxregsetp, int regno) { - i387_fill_fxsave ((char *) fpxregsetp, regno); + i387_collect_fxsave (current_regcache, regno, fpxregsetp); } /* Fetch all registers covered by the PTRACE_GETFPXREGS request from diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c index 75acd7e..f617faf 100644 --- a/gdb/i386-nto-tdep.c +++ b/gdb/i386-nto-tdep.c @@ -193,9 +193,9 @@ i386nto_regset_fill (int regset, char *data) else if (regset == NTO_REG_FLOAT) { if (nto_cpuinfo_valid && nto_cpuinfo_flags | X86_CPU_FXSR) - i387_fill_fxsave (data, -1); + i387_collect_fxsave (current_regcache, -1, data); else - i387_fill_fsave (data, -1); + i387_collect_fsave (current_regcache, -1, data); } else return -1; diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c index fa39297..3c2c574 100644 --- a/gdb/i386gnu-nat.c +++ b/gdb/i386gnu-nat.c @@ -186,7 +186,7 @@ store_fpregs (struct proc *thread, int regno) /* FIXME: kettenis/2001-07-15: Is this right? Should we somehow take into account DEPRECATED_REGISTER_VALID like the old code did? */ - i387_fill_fsave (state.hw_state, regno); + i387_collect_fsave (current_regcache, regno, state.hw_state); err = thread_set_state (thread->port, i386_FLOAT_STATE, (thread_state_t) &state, i386_FLOAT_STATE_COUNT); diff --git a/gdb/i386v4-nat.c b/gdb/i386v4-nat.c index 7d9f29a..6829fa6 100644 --- a/gdb/i386v4-nat.c +++ b/gdb/i386v4-nat.c @@ -154,7 +154,7 @@ fill_fpregset (fpregset_t *fpregsetp, int regno) if (FP0_REGNUM == 0) return; - i387_fill_fsave ((char *) fpregsetp, regno); + i387_collect_fsave (current_regcache, regno, fpregsetp); } #endif /* HAVE_FPREGSET_T */ diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index f4d6aa6..5dce37f 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -473,17 +473,6 @@ i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave) } #undef I387_ST0_REGNUM } - -/* Fill register REGNUM (if it is a floating-point register) in *FSAVE - with the value in GDB's register cache. If REGNUM is -1, do this - for all registers. This function doesn't touch any of the reserved - bits in *FSAVE. */ - -void -i387_fill_fsave (void *fsave, int regnum) -{ - i387_collect_fsave (current_regcache, regnum, fsave); -} /* At fxsave_offset[REGNUM] you'll find the offset to the location in @@ -701,17 +690,6 @@ i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave) #undef I387_NUM_XMM_REGS } -/* Fill register REGNUM (if it is a floating-point or SSE register) in - *FXSAVE with the value in GDB's register cache. If REGNUM is -1, do - this for all registers. This function doesn't touch any of the - reserved bits in *FXSAVE. */ - -void -i387_fill_fxsave (void *fxsave, int regnum) -{ - i387_collect_fxsave (current_regcache, regnum, fxsave); -} - /* Recreate the FTW (tag word) valid bits from the 80-bit FP data in *RAW. */ diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h index 2a1c0b1..e9b82dd 100644 --- a/gdb/i387-tdep.h +++ b/gdb/i387-tdep.h @@ -90,13 +90,6 @@ extern void i387_supply_fsave (struct regcache *regcache, int regnum, extern void i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave); -/* Fill register REGNUM (if it is a floating-point register) in *FSAVE - with the value in GDB's register cache. If REGNUM is -1, do this - for all registers. This function doesn't touch any of the reserved - bits in *FSAVE. */ - -extern void i387_fill_fsave (void *fsave, int regnum); - /* 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. */ @@ -112,13 +105,6 @@ extern void i387_supply_fxsave (struct regcache *regcache, int regnum, extern void i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave); -/* Fill register REGNUM (if it is a floating-point or SSE register) in - *FXSAVE with the value in GDB's register cache. If REGNUM is -1, do - this for all registers. This function doesn't touch any of the - reserved bits in *FXSAVE. */ - -extern void i387_fill_fxsave (void *fxsave, int regnum); - /* Prepare the FPU stack in REGCACHE for a function return. */ extern void i387_return_value (struct gdbarch *gdbarch, -- 2.7.4