diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-09-08 14:46:09 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-09-08 14:46:09 +0000 |
commit | f6792ef4afa7992e19bb1e2e536881b1ffaa0606 (patch) | |
tree | f2e24f95b23ed188827439fa8fd9bdddc95e6350 /gdb | |
parent | eeefdaa78f7bdf4c215f5176ea92c94c4a2cc41e (diff) | |
download | gdb-f6792ef4afa7992e19bb1e2e536881b1ffaa0606.zip gdb-f6792ef4afa7992e19bb1e2e536881b1ffaa0606.tar.gz gdb-f6792ef4afa7992e19bb1e2e536881b1ffaa0606.tar.bz2 |
* i386-tdep.h (FPC_REGNUM, FCTRL_REGNUM, FSTAT_REGNUM, FTAG_REGNUM)
(FISEG_REGNUM, FIOFF_REGNUM, FOSEG_REGNUM, FOOFF_REGNUM)
(FOP_REGNUM, XMM0_REGNUM, MXCSR_REGNUM): Remove macros.
(i386_frameless_signal_p): Remove prototype.
* i386-linux-nat.c (GETFPREGS_SUPPLIES): Remove macro.
(GETFPXREGS_SUPPLIES): Define using I386_ST0_REGNUM and
I386_SSE_NUM_REGS.
* i386-nto-tdep.c (i386nto_supply_gregset): Use I386_NUM_GREGS
instead of FP0_REGNUM.
(i386nto_regset_id): Use I386_NUM_GREGS and I386_NUM_FREGS instead
of FP0_REGNUM and FPC_REGNUM.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/i386-linux-nat.c | 10 | ||||
-rw-r--r-- | gdb/i386-nto-tdep.c | 6 | ||||
-rw-r--r-- | gdb/i386-tdep.h | 42 |
4 files changed, 18 insertions, 52 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8245044..b24ba70 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,17 @@ 2004-09-08 Mark Kettenis <kettenis@gnu.org> + * i386-tdep.h (FPC_REGNUM, FCTRL_REGNUM, FSTAT_REGNUM, FTAG_REGNUM) + (FISEG_REGNUM, FIOFF_REGNUM, FOSEG_REGNUM, FOOFF_REGNUM) + (FOP_REGNUM, XMM0_REGNUM, MXCSR_REGNUM): Remove macros. + (i386_frameless_signal_p): Remove prototype. + * i386-linux-nat.c (GETFPREGS_SUPPLIES): Remove macro. + (GETFPXREGS_SUPPLIES): Define using I386_ST0_REGNUM and + I386_SSE_NUM_REGS. + * i386-nto-tdep.c (i386nto_supply_gregset): Use I386_NUM_GREGS + instead of FP0_REGNUM. + (i386nto_regset_id): Use I386_NUM_GREGS and I386_NUM_FREGS instead + of FP0_REGNUM and FPC_REGNUM. + * solib-sunos.c (sunos_relocate_main_executable): Remove function. (sunos_solib_create_inferior_hook): Don't call sunos_relocate_main_executable. diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index 7229d06..d61c999 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -62,13 +62,8 @@ /* Prototypes for supply_gregset etc. */ #include "gregset.h" -/* Prototypes for i387_supply_fsave etc. */ #include "i387-tdep.h" - -/* Defines for XMM0_REGNUM etc. */ #include "i386-tdep.h" - -/* Defines I386_LINUX_ORIG_EAX_REGNUM. */ #include "i386-linux-tdep.h" /* Defines ps_err_e, struct ps_prochandle. */ @@ -111,11 +106,8 @@ static int regmap[] = #define GETREGS_SUPPLIES(regno) \ ((0 <= (regno) && (regno) <= 15) || (regno) == I386_LINUX_ORIG_EAX_REGNUM) -#define GETFPREGS_SUPPLIES(regno) \ - (FP0_REGNUM <= (regno) && (regno) <= LAST_FPU_CTRL_REGNUM) - #define GETFPXREGS_SUPPLIES(regno) \ - (FP0_REGNUM <= (regno) && (regno) <= MXCSR_REGNUM) + (I386_ST0_REGNUM <= (regno) && (regno) < I386_SSE_NUM_REGS) /* Does the current host support the GETREGS request? */ int have_ptrace_getregs = diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c index 5b95cd6..eed66a9 100644 --- a/gdb/i386-nto-tdep.c +++ b/gdb/i386-nto-tdep.c @@ -73,7 +73,7 @@ i386nto_supply_gregset (char *gpregs) unsigned regno; int empty = 0; - for (regno = 0; regno < FP0_REGNUM; regno++) + for (regno = 0; regno < I386_NUM_GREGS; regno++) { int offset = nto_reg_offset (regno); if (offset == -1) @@ -111,9 +111,9 @@ i386nto_regset_id (int regno) { if (regno == -1) return NTO_REG_END; - else if (regno < FP0_REGNUM) + else if (regno < I386_NUM_GREGS) return NTO_REG_GENERAL; - else if (regno < FPC_REGNUM) + else if (regno < I386_NUM_GREGS + I386_NUM_FREGS) return NTO_REG_FLOAT; return -1; /* Error. */ diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index 32ef049..29f2f27 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -111,48 +111,11 @@ struct gdbarch_tdep (at most) in the FPU, but are zero-extended to 32 bits in GDB's register cache. */ -/* "Generic" floating point control register. */ -#define FPC_REGNUM (FP0_REGNUM + 8) - -/* FPU control word. */ -#define FCTRL_REGNUM FPC_REGNUM - -/* FPU status word. */ -#define FSTAT_REGNUM (FPC_REGNUM + 1) - -/* FPU register tag word. */ -#define FTAG_REGNUM (FPC_REGNUM + 2) - -/* FPU instruction's code segment selector, called "FPU Instruction - Pointer Selector" in the IA-32 manuals. */ -#define FISEG_REGNUM (FPC_REGNUM + 3) - -/* FPU instruction's offset within segment. */ -#define FIOFF_REGNUM (FPC_REGNUM + 4) - -/* FPU operand's data segment. */ -#define FOSEG_REGNUM (FPC_REGNUM + 5) - -/* FPU operand's offset within segment */ -#define FOOFF_REGNUM (FPC_REGNUM + 6) - -/* FPU opcode, bottom eleven bits. */ -#define FOP_REGNUM (FPC_REGNUM + 7) - /* Return non-zero if REGNUM matches the FP register and the FP register set is active. */ extern int i386_fp_regnum_p (int regnum); extern int i386_fpc_regnum_p (int regnum); -/* SSE registers. */ - -/* First SSE data register. */ -#define XMM0_REGNUM (FPC_REGNUM + 8) - -/* SSE control/status register. */ -#define MXCSR_REGNUM \ - (XMM0_REGNUM + gdbarch_tdep (current_gdbarch)->num_xmm_regs) - /* Register numbers of various important registers. */ enum i386_regnum @@ -188,10 +151,9 @@ enum i386_regnum /* Functions exported from i386-tdep.c. */ extern CORE_ADDR i386_pe_skip_trampoline_code (CORE_ADDR pc, char *name); -extern int i386_frameless_signal_p (struct frame_info *frame); -/* Return the name of register REG. */ -extern char const *i386_register_name (int reg); +/* Return the name of register REGNUM. */ +extern char const *i386_register_name (int regnum); /* Return non-zero if REGNUM is a member of the specified group. */ extern int i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum, |