This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Move amd64 register number definitions


This moves the constants for register numbers from x86-64-tdep.c to
x86-64-tdep.h, such that they can be used in other files too.

Checked in on mainline.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* x86-64-tdep.h (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): Moved here ...
	* x86-64-tdep.c: ... from here.

Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.81
diff -u -p -r1.81 x86-64-tdep.c
--- x86-64-tdep.c 2 Jul 2003 07:45:57 -0000 1.81
+++ x86-64-tdep.c 9 Jul 2003 22:08:45 -0000
@@ -39,18 +39,7 @@
 #include "x86-64-tdep.h"
 #include "i387-tdep.h"
 
-/* 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	22 /* %st0 */
-#define X86_64_XMM0_REGNUM	38 /* %xmm0 */
-#define X86_64_XMM1_REGNUM	39 /* %xmm1 */
+/* Register information.  */
 
 struct x86_64_register_info
 {
Index: x86-64-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.h,v
retrieving revision 1.15
diff -u -p -r1.15 x86-64-tdep.h
--- x86-64-tdep.h 31 May 2003 08:15:38 -0000 1.15
+++ x86-64-tdep.h 9 Jul 2003 22:08:45 -0000
@@ -30,6 +30,19 @@ struct frame_info;
 
 #include "i386-tdep.h"
 
+/* 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	22 /* %st0 */
+#define X86_64_XMM0_REGNUM	38 /* %xmm0 */
+#define X86_64_XMM1_REGNUM	39 /* %xmm1 */
+
 /* Number of general purpose registers.  */
 #define X86_64_NUM_GREGS	22
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]