diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-07-28 20:05:15 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-07-28 20:05:15 +0000 |
commit | 16f769f344550548d34e3ad926640707542a6571 (patch) | |
tree | 4e6e5a1ce97f82fad1f222a54930afcee436cbd9 /gdb | |
parent | 5b7f31a409c4cf665493580e9087f293298255dc (diff) | |
download | gdb-16f769f344550548d34e3ad926640707542a6571.zip gdb-16f769f344550548d34e3ad926640707542a6571.tar.gz gdb-16f769f344550548d34e3ad926640707542a6571.tar.bz2 |
From 2001-07-23 Andreas Schwab <schwab@suse.de>:
* config/m68k/tm-m68k.h (TARGET_LONG_DOUBLE_FORMAT): Define.
(TARGET_LONG_DOUBLE_BIT): Define.
(REGISTER_VIRTUAL_SIZE): Return 12 for floating point registers.
(MAX_REGISTER_VIRTUAL_SIZE): Increase to 12.
(REGISTER_VIRTUAL_TYPE): Return builtin_type_long_double for
floating point registers.
(REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL)
(REGISTER_CONVERT_TO_RAW): Remove.
* config/m68k/xm-linux.h (HOST_LONG_DOUBLE_FORMAT): Define.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/config/m68k/tm-m68k.h | 43 | ||||
-rw-r--r-- | gdb/config/m68k/xm-linux.h | 2 |
3 files changed, 24 insertions, 34 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1025a1c..5024fbb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +2001-07-28 Andrew Cagney <ac131313@redhat.com> + + From 2001-07-23 Andreas Schwab <schwab@suse.de>: + * config/m68k/tm-m68k.h (TARGET_LONG_DOUBLE_FORMAT): Define. + (TARGET_LONG_DOUBLE_BIT): Define. + (REGISTER_VIRTUAL_SIZE): Return 12 for floating point registers. + (MAX_REGISTER_VIRTUAL_SIZE): Increase to 12. + (REGISTER_VIRTUAL_TYPE): Return builtin_type_long_double for + floating point registers. + (REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL) + (REGISTER_CONVERT_TO_RAW): Remove. + * config/m68k/xm-linux.h (HOST_LONG_DOUBLE_FORMAT): Define. + 2001-07-26 Andrew Cagney <ac131313@redhat.com> * thread.c, breakpoint.c: Include "gdb.h". diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h index e2a5d5d..6c5fc5b 100644 --- a/gdb/config/m68k/tm-m68k.h +++ b/gdb/config/m68k/tm-m68k.h @@ -28,6 +28,10 @@ /* Define the bit, byte, and word ordering of the machine. */ #define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_LONG_DOUBLE_FORMAT &floatformat_m68881_ext + +#define TARGET_LONG_DOUBLE_BIT 96 + /* Offset from address of function to start of its code. Zero on most machines. */ @@ -137,9 +141,9 @@ extern void m68k_find_saved_regs (struct frame_info *, /* Number of bytes of storage in the program's representation for register N. On the 68000, all regs are 4 bytes - except the floating point regs which are 8-byte doubles. */ + except the floating point regs which are 12-byte long doubles. */ -#define REGISTER_VIRTUAL_SIZE(N) (((unsigned)(N) - FP0_REGNUM) < 8 ? 8 : 4) +#define REGISTER_VIRTUAL_SIZE(N) (((unsigned)(N) - FP0_REGNUM) < 8 ? 12 : 4) /* Largest value REGISTER_RAW_SIZE can have. */ @@ -147,39 +151,10 @@ extern void m68k_find_saved_regs (struct frame_info *, /* Largest value REGISTER_VIRTUAL_SIZE can have. */ -#define MAX_REGISTER_VIRTUAL_SIZE 8 - -/* Nonzero if register N requires conversion - from raw format to virtual format. */ - -#define REGISTER_CONVERTIBLE(N) (((unsigned)(N) - FP0_REGNUM) < 8) - -#include "floatformat.h" - -/* Convert data from raw format for register REGNUM in buffer FROM - to virtual format with type TYPE in buffer TO. */ - -#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ -do \ - { \ - DOUBLEST dbl_tmp_val; \ - floatformat_to_doublest (&floatformat_m68881_ext, (FROM), &dbl_tmp_val); \ - store_floating ((TO), TYPE_LENGTH (TYPE), dbl_tmp_val); \ - } while (0) - -/* Convert data from virtual format with type TYPE in buffer FROM - to raw format for register REGNUM in buffer TO. */ - -#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ -do \ - { \ - DOUBLEST dbl_tmp_val; \ - dbl_tmp_val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ - floatformat_from_doublest (&floatformat_m68881_ext, &dbl_tmp_val, (TO)); \ - } while (0) +#define MAX_REGISTER_VIRTUAL_SIZE 12 /* Return the GDB type object for the "standard" data type of data - in register N. This should be int for D0-D7, double for FP0-FP7, + in register N. This should be int for D0-D7, long double for FP0-FP7, and void pointer for all others (A0-A7, PC, SR, FPCONTROL etc). Note, for registers which contain addresses return pointer to void, not pointer to char, because we don't want to attempt to print @@ -187,7 +162,7 @@ do \ #define REGISTER_VIRTUAL_TYPE(N) \ ((unsigned) (N) >= FPC_REGNUM ? lookup_pointer_type (builtin_type_void) : \ - (unsigned) (N) >= FP0_REGNUM ? builtin_type_double : \ + (unsigned) (N) >= FP0_REGNUM ? builtin_type_long_double : \ (unsigned) (N) >= A0_REGNUM ? lookup_pointer_type (builtin_type_void) : \ builtin_type_int) diff --git a/gdb/config/m68k/xm-linux.h b/gdb/config/m68k/xm-linux.h index 881eedc..ebd9126 100644 --- a/gdb/config/m68k/xm-linux.h +++ b/gdb/config/m68k/xm-linux.h @@ -29,6 +29,8 @@ to get the offset in the core file of the register values. */ #define KERNEL_U_ADDR 0x0 +#define HOST_LONG_DOUBLE_FORMAT &floatformat_m68881_ext + /* Need R_OK etc, but USG isn't defined. */ #include <unistd.h> |