From: Richard Henderson Date: Mon, 2 Jun 2003 16:13:58 +0000 (+0000) Subject: * alpha-tdep.c (alpha_register_virtual_type): Use void_data_ptr X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7266705675d569d940cb6ce04d17c78c6a3b554e;p=binutils-gdb.git * alpha-tdep.c (alpha_register_virtual_type): Use void_data_ptr for SP, GP; void_func_ptr for PC; non-language-specific types for all others. * alpha-tdep.h (ALPHA_GP_REGNUM): New. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 68cb29db1e3..ff7afe633b6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2003-06-02 Richard Henderson + + * alpha-tdep.c (alpha_register_virtual_type): Use void_data_ptr + for SP, GP; void_func_ptr for PC; non-language-specific types + for all others. + * alpha-tdep.h (ALPHA_GP_REGNUM): New. + 2003-06-02 Richard Henderson * top.h (lim_at_start): Declare. diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 53c9f63d192..44b8401cff4 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -89,8 +89,17 @@ alpha_register_convertible (int regno) static struct type * alpha_register_virtual_type (int regno) { - return ((regno >= FP0_REGNUM && regno < (FP0_REGNUM+31)) - ? builtin_type_double : builtin_type_long); + if (regno == ALPHA_SP_REGNUM || regno == ALPHA_GP_REGNUM) + return builtin_type_void_data_ptr; + if (regno == ALPHA_PC_REGNUM) + return builtin_type_void_func_ptr; + + /* Don't need to worry about little vs big endian until + some jerk tries to port to alpha-unicosmk. */ + if (regno >= FP0_REGNUM && regno < FP0_REGNUM + 31) + return builtin_type_ieee_double_little; + + return builtin_type_int64; } /* Is REGNUM a member of REGGROUP? */ diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h index f69eeac1a2c..7f1ec5139ef 100644 --- a/gdb/alpha-tdep.h +++ b/gdb/alpha-tdep.h @@ -43,9 +43,10 @@ #define ALPHA_GCC_FP_REGNUM 15 /* Used by gcc as frame register */ #define ALPHA_A0_REGNUM 16 /* Loc of first arg during a subr call */ #define ALPHA_T9_REGNUM 23 /* Return address register for OSF/1 __div* */ +#define ALPHA_RA_REGNUM 26 /* Contains return address value */ #define ALPHA_T12_REGNUM 27 /* Contains start addr of current proc */ +#define ALPHA_GP_REGNUM 29 /* Contains the global pointer */ #define ALPHA_SP_REGNUM 30 /* Contains address of top of stack */ -#define ALPHA_RA_REGNUM 26 /* Contains return address value */ #define ALPHA_ZERO_REGNUM 31 /* Read-only register, always 0 */ #define ALPHA_FP0_REGNUM 32 /* Floating point register 0 */ #define ALPHA_FPA0_REGNUM 48 /* First float arg during a subr call */