diff options
author | David Edelsohn <dje.gcc@gmail.com> | 1995-09-06 21:35:20 +0000 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 1995-09-06 21:35:20 +0000 |
commit | 70943b5f0b6dc45349f13d3f18f51e13e660d136 (patch) | |
tree | 6eabf493120a671b9e87475e6672105d71c0a157 | |
parent | bc55a53f1754dd2567fdc864f434dcc413cf6142 (diff) | |
download | gdb-70943b5f0b6dc45349f13d3f18f51e13e660d136.zip gdb-70943b5f0b6dc45349f13d3f18f51e13e660d136.tar.gz gdb-70943b5f0b6dc45349f13d3f18f51e13e660d136.tar.bz2 |
* 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.
-rw-r--r-- | gdb/config/sparc/tm-sp64.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h index a8aa68f..825f14a 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. */ |