From: David Edelsohn Date: Wed, 6 Sep 1995 21:35:20 +0000 (+0000) Subject: * config/sparc/tm-sp64.h (REGISTER_RAW_SIZE): Lower 32 fp regs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70943b5f0b6dc45349f13d3f18f51e13e660d136;p=binutils-gdb.git * 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. --- diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h index a8aa68f9511..825f14abed3 100644 --- a/gdb/config/sparc/tm-sp64.h +++ b/gdb/config/sparc/tm-sp64.h @@ -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. */