forked from Imagelibrary/binutils-gdb
* config/sparc/tm-sp64.h (REGISTER_RAW_SIZE): Lower 32 fp regs
have size 4. (REGISTER_VIRTUAL_SIZE): Likewise. (REGISTER_VIRTUAL_TYPE): Lower 32 fp regs have type float. Upper 32 fp regs have type double. * sparc-tdep.c (NUM_SPARC_FPREGS): Replace with (FP_REGISTER_BYTES): this, and update all uses. (FP_MAX_REGNUM): Define if not already. (get_saved_register): Handle new sparc64 fp regs. (sparc_frame_find_saved_regs): Likewise. (sparc_print_register_hook): Only print fp regs < 32 as doubles. Add code to handle long doubles when gdb does. (_initialize_sparc_tdep): Use print_insn_sparc64 if sparc64.
This commit is contained in:
@@ -176,16 +176,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Number of bytes of storage in the actual machine representation
|
||||
for register N. */
|
||||
/* ??? It's not clear whether we want to return 4 or 8 for fp regs. */
|
||||
|
||||
#undef REGISTER_RAW_SIZE
|
||||
#define REGISTER_RAW_SIZE(N) 8
|
||||
#define REGISTER_RAW_SIZE(N) \
|
||||
((N) < 32 ? 8 : (N) < 64 ? 4 : 8)
|
||||
|
||||
/* Number of bytes of storage in the program's representation
|
||||
for register N. */
|
||||
|
||||
#undef REGISTER_VIRTUAL_SIZE
|
||||
#define REGISTER_VIRTUAL_SIZE(N) 8
|
||||
#define REGISTER_VIRTUAL_SIZE(N) \
|
||||
((N) < 32 ? 8 : (N) < 64 ? 4 : 8)
|
||||
|
||||
/* Largest value REGISTER_RAW_SIZE can have. */
|
||||
/* tm-sparc.h defines this as 8, but play it safe. */
|
||||
@@ -204,8 +205,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef REGISTER_VIRTUAL_TYPE
|
||||
#define REGISTER_VIRTUAL_TYPE(N) \
|
||||
((N) < 32 ? builtin_type_long_long : (N) < 80 ? builtin_type_float : \
|
||||
builtin_type_long_long)
|
||||
((N) < 32 ? builtin_type_long_long \
|
||||
: (N) < 64 ? builtin_type_float \
|
||||
: (N) < 80 ? builtin_type_double \
|
||||
: builtin_type_long_long)
|
||||
|
||||
/* We use to support both 32 bit and 64 bit pointers.
|
||||
We can't anymore because TARGET_PTR_BIT must now be a constant. */
|
||||
|
||||
Reference in New Issue
Block a user