]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
From 2001-07-23 Andreas Schwab <schwab@suse.de>:
authorAndrew Cagney <cagney@redhat.com>
Sat, 28 Jul 2001 20:05:15 +0000 (20:05 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 28 Jul 2001 20:05:15 +0000 (20:05 +0000)
* 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.

gdb/ChangeLog
gdb/config/m68k/tm-m68k.h
gdb/config/m68k/xm-linux.h

index 1025a1c601ecfcbe1585c33d64071d1135dd64c4..5024fbb12924a9f8b035c579cc9963bea18f8cf9 100644 (file)
@@ -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".
index e2a5d5dae26bae0e0cebfffee83ab57c95fd99bd..6c5fc5b2169be4233021c73c2350ec210b2156ba 100644 (file)
 /* 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)
 
index 881eedc88ab743a4f76655be954158af1e5a24ea..ebd9126d0f90d77e117a78fa1daec99c68eae55b 100644 (file)
@@ -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>