Commit 0f7fa3d0 by Jan Hubicka Committed by Jan Hubicka

i386.h (DBX_REGISTER_NUMBER): Return proper values for 64bits.

	* i386.h (DBX_REGISTER_NUMBER): Return proper values for 64bits.
	(dbx64_register_map): Declare.
	(RETURN_ADDR_RTX): Fix for 64bit.
	(DWARF_FRAME_RETURN_COLUMN): Set to 16 for 64bit.
	(INCOMING_FRAME_SP_OFFSET): Set to 8.
	* i386.c (dbx64_register_map): New global array.
	* beos-elf.h, freebsd.h, i386-interix.h, i386elf.h,
	linux.h (DBX_REGISTER_REGNUMBER): Use dbx64_register_map
	for 64bits.

From-SVN: r40365
parent 2251fd78
Sat Mar 10 14:34:59 CET 2001 Jan Hubicka <jh@suse.cz>
* i386.h (DBX_REGISTER_NUMBER): Return proper values for 64bits.
(dbx64_register_map): Declare.
(RETURN_ADDR_RTX): Fix for 64bit.
(DWARF_FRAME_RETURN_COLUMN): Set to 16 for 64bit.
(INCOMING_FRAME_SP_OFFSET): Set to 8.
* i386.c (dbx64_register_map): New global array.
* beos-elf.h, freebsd.h, i386-interix.h, i386elf.h,
linux.h (DBX_REGISTER_REGNUMBER): Use dbx64_register_map
for 64bits.
2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk> 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
* cppfiles.c (search_from): Use lbasename. * cppfiles.c (search_from): Use lbasename.
......
...@@ -49,7 +49,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -49,7 +49,8 @@ Boston, MA 02111-1307, USA. */
#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) #define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
#undef DBX_REGISTER_NUMBER #undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] #define DBX_REGISTER_NUMBER(n) \
(TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
/* Output assembler code to FILE to increment profiler label # LABELNO /* Output assembler code to FILE to increment profiler label # LABELNO
for profiling a function entry. */ for profiling a function entry. */
......
...@@ -50,7 +50,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -50,7 +50,8 @@ Boston, MA 02111-1307, USA. */
#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) #define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
#undef DBX_REGISTER_NUMBER #undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] #define DBX_REGISTER_NUMBER(n) \
(TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
#undef NO_PROFILE_COUNTERS #undef NO_PROFILE_COUNTERS
#define NO_PROFILE_COUNTERS #define NO_PROFILE_COUNTERS
......
...@@ -432,7 +432,8 @@ while (0) ...@@ -432,7 +432,8 @@ while (0)
#undef DBX_REGISTER_NUMBER #undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \ #define DBX_REGISTER_NUMBER(n) \
((n) == 0 ? 0 \ (TARGET_64BIT ? dbx64_register_map[n] \
: (n) == 0 ? 0 \
: (n) == 1 ? 2 \ : (n) == 1 ? 2 \
: (n) == 2 ? 1 \ : (n) == 2 ? 1 \
: (n) == 3 ? 3 \ : (n) == 3 ? 3 \
......
...@@ -353,6 +353,18 @@ int const dbx_register_map[FIRST_PSEUDO_REGISTER] = ...@@ -353,6 +353,18 @@ int const dbx_register_map[FIRST_PSEUDO_REGISTER] =
29, 30, 31, 32, 33, 34, 35, 36, /* MMX */ 29, 30, 31, 32, 33, 34, 35, 36, /* MMX */
}; };
/* The "default" register map used in 64bit mode. */
int const dbx64_register_map[FIRST_PSEUDO_REGISTER] =
{
0, 1, 2, 3, 4, 5, 6, 7, /* general regs */
33, 34, 35, 36, 37, 38, 39, 40 /* fp regs */
-1, -1, -1, -1, -1, /* arg, flags, fpsr, dir, frame */
17, 18, 19, 20, 21, 22, 23, 24, /* SSE */
41, 42, 43, 44, 45, 46, 47, 48, /* MMX */
8,9,10,11,12,13,14,15, /* extended integer registers */
25, 26, 27, 28, 29, 30, 31, 32, /* extended SSE registers */
};
/* Define the register numbers to be used in Dwarf debugging information. /* Define the register numbers to be used in Dwarf debugging information.
The SVR4 reference port C compiler uses the following register numbers The SVR4 reference port C compiler uses the following register numbers
in its Dwarf output code: in its Dwarf output code:
......
...@@ -2718,9 +2718,11 @@ number as al, and ax. ...@@ -2718,9 +2718,11 @@ number as al, and ax.
/* How to renumber registers for dbx and gdb. */ /* How to renumber registers for dbx and gdb. */
#define DBX_REGISTER_NUMBER(n) dbx_register_map[n] #define DBX_REGISTER_NUMBER(n) \
(TARGET_64BIT ? dbx64_register_map[n] : dbx_register_map[n])
extern int const dbx_register_map[FIRST_PSEUDO_REGISTER]; extern int const dbx_register_map[FIRST_PSEUDO_REGISTER];
extern int const dbx64_register_map[FIRST_PSEUDO_REGISTER];
extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER]; extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
/* Before the prologue, RA is at 0(%esp). */ /* Before the prologue, RA is at 0(%esp). */
...@@ -2730,14 +2732,14 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER]; ...@@ -2730,14 +2732,14 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
/* After the prologue, RA is at -4(AP) in the current frame. */ /* After the prologue, RA is at -4(AP) in the current frame. */
#define RETURN_ADDR_RTX(COUNT, FRAME) \ #define RETURN_ADDR_RTX(COUNT, FRAME) \
((COUNT) == 0 \ ((COUNT) == 0 \
? gen_rtx_MEM (Pmode, plus_constant (arg_pointer_rtx, -4))\ ? gen_rtx_MEM (Pmode, plus_constant (arg_pointer_rtx, TARGET_64BIT ? -8 : -4))\
: gen_rtx_MEM (Pmode, plus_constant (FRAME, 4))) : gen_rtx_MEM (Pmode, plus_constant (FRAME, TARGET_64BIT ? 8 : 4)))
/* PC is dbx register 8; let's use that column for RA. */ /* PC is dbx register 8; let's use that column for RA. */
#define DWARF_FRAME_RETURN_COLUMN 8 #define DWARF_FRAME_RETURN_COLUMN (TARGET_64BIT ? 16 : 8)
/* Before the prologue, the top of the frame is at 4(%esp). */ /* Before the prologue, the top of the frame is at 4(%esp). */
#define INCOMING_FRAME_SP_OFFSET 4 #define INCOMING_FRAME_SP_OFFSET UNITS_PER_WORD
/* This is how to output the definition of a user-level label named NAME, /* This is how to output the definition of a user-level label named NAME,
such as the label on a static function or variable NAME. */ such as the label on a static function or variable NAME. */
......
...@@ -112,7 +112,8 @@ do { long value[3]; \ ...@@ -112,7 +112,8 @@ do { long value[3]; \
} while (0) } while (0)
#undef DBX_REGISTER_NUMBER #undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] #define DBX_REGISTER_NUMBER(n) \
(TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
/* The routine used to output sequences of byte values. We use a special /* The routine used to output sequences of byte values. We use a special
version of this for most svr4 targets because doing so makes the version of this for most svr4 targets because doing so makes the
......
...@@ -56,7 +56,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -56,7 +56,8 @@ Boston, MA 02111-1307, USA. */
#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) #define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
#undef DBX_REGISTER_NUMBER #undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] #define DBX_REGISTER_NUMBER(n) \
(TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
/* Output assembler code to FILE to call the profiler. /* Output assembler code to FILE to call the profiler.
To the best of my knowledge, no Linux libc has required the label To the best of my knowledge, no Linux libc has required the label
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment