Eliminate REGISTER_CONVERTIBLE().
authorAndrew Cagney <cagney@redhat.com>
Tue, 13 Nov 2001 03:10:35 +0000 (03:10 +0000)
committerAndrew Cagney <cagney@redhat.com>
Tue, 13 Nov 2001 03:10:35 +0000 (03:10 +0000)
gdb/ChangeLog
gdb/config/i960/tm-i960.h
gdb/config/i960/tm-nindy960.h
gdb/i960-tdep.c

index d29e04714856aad515a8fe07582abedc8a355e9e..1126b23ca96a2a0327303456c4c4c9383de00b5e 100644 (file)
@@ -1,3 +1,14 @@
+2001-11-10  Andrew Cagney  <ac131313@redhat.com>
+
+       * config/i960/tm-nindy960.h (REGISTER_CONVERTIBLE)
+       (REGISTER_CONVERT_TO_RAW, REGISTER_CONVERT_TO_VIRTUAL): Delete
+       undef.
+       * i960-tdep.c (i960_register_type): New function.
+       * config/i960/tm-i960.h (REGISTER_CONVERTIBLE): Delete.
+       (REGISTER_CONVERT_TO_VIRTUAL): Delete.
+       (REGISTER_CONVERT_TO_RAW): Delete.
+       (REGISTER_VIRTUAL_TYPE): Update.  Call i960_register_type.
+
 2001-11-10  Andrew Cagney  <ac131313@redhat.com>
 
        * m88k-tdep.c (m88k_register_type): New function.
index ab4262035bebca6ae9b4e36c673d91ac144117da..f47b880e8a5b173ec3a4d2e1e129681856d3216f 100644 (file)
@@ -156,39 +156,15 @@ extern CORE_ADDR saved_pc_after_call ();
 
 #define MAX_REGISTER_VIRTUAL_SIZE 8
 
-/* Nonzero if register N requires conversion from raw format to virtual
-   format.  */
-
-#define REGISTER_CONVERTIBLE(N) ((N) >= FP0_REGNUM)
-
 #include "floatformat.h"
 
 #define TARGET_LONG_DOUBLE_FORMAT &floatformat_i960_ext
 
-/* 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)       \
-{ \
-  DOUBLEST val; \
-  floatformat_to_doublest (&floatformat_i960_ext, (FROM), &val); \
-  store_floating ((TO), TYPE_LENGTH (TYPE), val); \
-}
-
-/* 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)   \
-{ \
-  DOUBLEST val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
-  floatformat_from_doublest (&floatformat_i960_ext, &val, (TO)); \
-}
-
 /* Return the GDB type object for the "standard" data type
    of data in register N.  */
 
-#define REGISTER_VIRTUAL_TYPE(N) ((N) < FP0_REGNUM ? \
-                                       builtin_type_int : builtin_type_double)
+struct type *i960_register_type (int regnum);
+#define REGISTER_VIRTUAL_TYPE(N) i960_register_type (N)
 \f
 /* Macros for understanding function return values... */
 
index 1a958734a2eef235596edc965a2d953fb89200f7..e9cb99c9f4bb01bb7e2416d4e98e10a0779b6471 100644 (file)
@@ -104,7 +104,3 @@ extern int
  */
 
 #define DECR_PC_AFTER_BREAK 0
-
-#undef REGISTER_CONVERT_TO_VIRTUAL
-#undef REGISTER_CONVERT_TO_RAW
-#undef REGISTER_CONVERTIBLE
index 197ac103eafad871bf93cc027a67b1d45d81efd8..053c7fa4c87c5eb50c56b7a7591b41ffa23fa82e 100644 (file)
 static CORE_ADDR next_insn (CORE_ADDR memaddr,
                            unsigned int *pword1, unsigned int *pword2);
 
+struct type *
+i960_register_type (int regnum)
+{
+  if (regnum < FP0_REGNUM)
+    return builtin_type_int32;
+  else
+    return builtin_type_i960_ext;
+}
+
+
 /* Does the specified function use the "struct returning" convention
    or the "value returning" convention?  The "value returning" convention
    almost invariably returns the entire value in registers.  The
This page took 0.042477 seconds and 4 git commands to generate.