diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-02-23 21:37:52 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-02-23 21:37:52 +0000 |
commit | 90f90721e35051971f4b5a0305373f2eb5db5e56 (patch) | |
tree | 83a54a0ec8228b36003cba455112b6ee7ac9a747 /gdb/x86-64-tdep.h | |
parent | d547918807c8e9e177cf8959fec198b4c700c362 (diff) | |
download | gdb-90f90721e35051971f4b5a0305373f2eb5db5e56.zip gdb-90f90721e35051971f4b5a0305373f2eb5db5e56.tar.gz gdb-90f90721e35051971f4b5a0305373f2eb5db5e56.tar.bz2 |
* x86-64-tdep.h: Tewak comment.
(enum amd64_regnum): New.
(X86_64_RAX_REGNUM, X86_64_RDX_REGNUM, X86_64_RDI_REGNUM)
(X86_64_RBP_REGNUM, X86_64_RSP_REGNUM, X86_64_RIP_REGNUM)
(X86_64_EFLAGS_REGNUM, X86_64_ST0_REGNUM, X86_64_XMM0_REGNUM)
(X86_64_XMM1_REGNUM): Removed.
(AMD64_NUM_GREGS): Renamed from X86_64_NUM_GREGS.
(amd64_init_abi, amd64_supply_fxsave, amd64_fill_fxsave): Adjust
prototypes for renamed functions.
* x86-64-tdep.c: Fix typo.
(amd64_dwarf_regmap): Use constants from `enum amd64_regnum' for
register numbers.
(amd64_return_value, amd64_push_arguments, amd64_push_dummy_call):
Use constants from `enum amd64_regnum' for register numbers.
(AMD64_NUM_SAVED_REGS): Adjust for renamed macros.
(amd64_analyze_prologue, amd64_frame_cache,
amd64_sigtramp_frame_cache): Use constants from `enum
amd64_regnum' for register numbers.
(amd64_supply_fpregset): Adjust for renamed functions.
(amd64_init_abi): Rename from x86_64_init_abi. Use constants from
`enum amd64_regnum' for register numbers.
(I387_ST0_REGNUM): Use constant from `enum amd64_regnum'.
(amd64_supply_fxsave): Rename from x86_64_supply_fxsave.
(amd64_fill_fxsave): Rename fro x86_64_fill_fxsave.
* x86-64-linux-tdep.c (amd64_linux_supply_gregset)
(amd64_linux_fill_gregset): Adjust for renamed macros.
(fetch_core_registers): Adjust for renamed functions.
(amd64_linux_init_abi): Adjust for renamed functions.
* x86-64-linux-nat.c (supply_gregset, fill_gregset): Adjust for
renamed functions.
* amd64-nat.c: Adjust for renamed macros.
* amd64bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Use constants from `enum amd64_regnum'
for register numbers. Adjust for renamed variables.
* amd64fbsd-nat.c (supply_gregset, fill_gregset): Adjust for
renamed variables.
(_initialize_amd64fbsd_nat): Use constants from `enum
amd64_regnum' for register numbers.
* amd64fbsd-tdep.c (amd64fbsd_sigcontext_addr): Use constants from
`enum amd64_regnum' for register numbers.
(amd64fbsd_init_abi): Adjust for renamed functions.
* amd64nbsd-tdep.c (amd64nbsd_sigcontext_addr): Use constants from
`enum amd64_regnum' for register numbers.
(amd64nbsd_init_abi): Adjust for renamed functions.
(_initialize_amd64nbsd_ndep): Adjust for renamed macros.
* amd64obsd-tdep.c (amd64obsd_sigcontext_addr): Use constants from
`enum amd64_regnum' for register numbers.
(amd64obsd_init_abi): Adjust for renamed functions.
(_initialize_amd64obsd_ndep): Adjust for renamed macros.
Diffstat (limited to 'gdb/x86-64-tdep.h')
-rw-r--r-- | gdb/x86-64-tdep.h | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/gdb/x86-64-tdep.h b/gdb/x86-64-tdep.h index 5ec371b..8367709 100644 --- a/gdb/x86-64-tdep.h +++ b/gdb/x86-64-tdep.h @@ -1,4 +1,4 @@ -/* Target-dependent code for the x86-64. +/* Target-dependent definitions for AMD64. Copyright 2001, 2003, 2004 Free Software Foundation, Inc. Contributed by Jiri Smid, SuSE Labs. @@ -31,36 +31,44 @@ struct regcache; /* Register numbers of various important registers. */ -#define X86_64_RAX_REGNUM 0 /* %rax */ -#define X86_64_RDX_REGNUM 3 /* %rdx */ -#define X86_64_RDI_REGNUM 5 /* %rdi */ -#define X86_64_RBP_REGNUM 6 /* %rbp */ -#define X86_64_RSP_REGNUM 7 /* %rsp */ -#define X86_64_RIP_REGNUM 16 /* %rip */ -#define X86_64_EFLAGS_REGNUM 17 /* %eflags */ -#define X86_64_ST0_REGNUM 24 /* %st0 */ -#define X86_64_XMM0_REGNUM 40 /* %xmm0 */ -#define X86_64_XMM1_REGNUM 41 /* %xmm1 */ +enum amd64_regnum +{ + AMD64_RAX_REGNUM, /* %rax */ + AMD64_RBX_REGNUM, /* %rbx */ + AMD64_RCX_REGNUM, /* %rcx */ + AMD64_RDX_REGNUM, /* %rdx */ + AMD64_RSI_REGNUM, /* %rsi */ + AMD64_RDI_REGNUM, /* %rdi */ + AMD64_RBP_REGNUM, /* %rbp */ + AMD64_RSP_REGNUM, /* %rsp */ + AMD64_R8_REGNUM = 8, /* %r8 */ + AMD64_R15_REGNUM = 15, /* %r15 */ + AMD64_RIP_REGNUM, /* %rip */ + AMD64_EFLAGS_REGNUM, /* %eflags */ + AMD64_ST0_REGNUM = 24, /* %st0 */ + AMD64_XMM0_REGNUM = 40, /* %xmm0 */ + AMD64_XMM1_REGNUM /* %xmm1 */ +}; /* Number of general purpose registers. */ -#define X86_64_NUM_GREGS 24 +#define AMD64_NUM_GREGS 24 -void x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch); +extern void amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch); /* 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. */ -extern void x86_64_supply_fxsave (struct regcache *regcache, int regnum, - const void *fxsave); +extern void amd64_supply_fxsave (struct regcache *regcache, int regnum, + const 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. */ -void x86_64_fill_fxsave (char *fxsave, int regnum); +extern void amd64_fill_fxsave (char *fxsave, int regnum); /* Variables exported from amd64nbsd-tdep.c. */ |