aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-11-08 16:52:37 +0000
committerAndrew Cagney <cagney@redhat.com>2002-11-08 16:52:37 +0000
commit23a3445934a40c226954813718d1345a30f4dba0 (patch)
treeb76711367efe3847ea0dda2b8665c591a8ce4d12 /gdb/i386-tdep.h
parentd709c0200723c8e71df58cc6df48c2116bb5e733 (diff)
downloadgdb-23a3445934a40c226954813718d1345a30f4dba0.zip
gdb-23a3445934a40c226954813718d1345a30f4dba0.tar.gz
gdb-23a3445934a40c226954813718d1345a30f4dba0.tar.bz2
2002-11-06 Andrew Cagney <cagney@redhat.com>
* i386-tdep.c (i386_mmx_regnum_p): Rename mmx_regnum_p. Update all callers. (i386_fp_regnum_p): New function. Use instead of FP_REGNUM_P. (i386_fpc_regnum_p): New function. Use instead of FPC_REGNUM_P. (i386_sse_regnum_p): New function. Use instead of SSE_REGNUM_P. (i386_mxcsr_regnum_p): new function. Use instead of MXCSR_REGNUM_P. * i386-tdep.h (SSE_REGNUM_P): Delete macro. (i386_sse_regnum_p): Declare. (i386_mxcsr_regnum_p): Declare. (FP_REGNUM_P, FPC_REGNUM_P): Delete macros. (i386_fp_regnum_p, i386_fpc_regnum_p): Declare. (IS_FP_REGNUM): Update definition. (IS_FPU_CTRL_REGNUM): Update definition.. (IS_SSE_REGNUM): Update definition.. * i386v-nat.c (register_u_addr): Update. * go32-nat.c (fetch_register): Update. (store_register): Update.
Diffstat (limited to 'gdb/i386-tdep.h')
-rw-r--r--gdb/i386-tdep.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 646001b..e30d7e3 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -113,11 +113,10 @@ struct gdbarch_tdep
/* FPU opcode, bottom eleven bits. */
#define FOP_REGNUM (FPC_REGNUM + 7)
-/* Return non-zero if N corresponds to a FPU data registers. */
-#define FP_REGNUM_P(n) (FP0_REGNUM && FP0_REGNUM <= (n) && (n) < FPC_REGNUM)
-
-/* Return non-zero if N corresponds to a FPU control register. */
-#define FPC_REGNUM_P(n) (FPC_REGNUM <= (n) && (n) < XMM0_REGNUM)
+/* 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. */
@@ -128,17 +127,23 @@ struct gdbarch_tdep
#define MXCSR_REGNUM \
(XMM0_REGNUM + gdbarch_tdep (current_gdbarch)->num_xmm_regs)
-/* Return non-zero if N corresponds to a SSE data register. */
-#define SSE_REGNUM_P(n) (XMM0_REGNUM <= (n) && (n) < MXCSR_REGNUM)
+/* Return non-zero if REGNUM matches the SSE register and the SSE
+ register set is active. */
+extern int i386_sse_regnum_p (int regnum);
+extern int i386_mxcsr_regnum_p (int regnum);
+
+/* Return non-zero if REGNUM matches the ORIG_EAX register and the
+ register hack is active. */
+extern int i386_linux_orig_eax_regnum_p (int regnum);
/* FIXME: kettenis/2001-11-24: Obsolete macro's. */
#define FCS_REGNUM FISEG_REGNUM
#define FCOFF_REGNUM FIOFF_REGNUM
#define FDS_REGNUM FOSEG_REGNUM
#define FDOFF_REGNUM FOOFF_REGNUM
-#define IS_FP_REGNUM(n) FP_REGNUM_P (n)
-#define IS_FPU_CTRL_REGNUM(n) FPC_REGNUM_P (n)
-#define IS_SSE_REGNUM(n) SSE_REGNUM_P (n)
+#define IS_FP_REGNUM(n) i386_fp_regnum_p (n)
+#define IS_FPU_CTRL_REGNUM(n) i386_fpc_regnum_p (n)
+#define IS_SSE_REGNUM(n) i386_sse_regnum_p (n)
#define I386_NUM_GREGS 16
#define I386_NUM_FREGS 16