This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfc/i960] Zap REGISTER_CONVERTIBLE() from config/i960/*
- To: gdb-patches at sources dot redhat dot com
- Subject: [rfc/i960] Zap REGISTER_CONVERTIBLE() from config/i960/*
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sat, 10 Nov 2001 19:42:05 -0500
Hello,
Same again. This zaps the *COVERT* stuff from the un-maintained i960
target.
enjoy,
Andrew
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.
Index: i960-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i960-tdep.c,v
retrieving revision 1.7
diff -p -r1.7 i960-tdep.c
*** i960-tdep.c 2001/03/06 08:21:08 1.7
--- i960-tdep.c 2001/11/11 00:39:19
***************
*** 34,39 ****
--- 34,49 ----
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
Index: config/i960/tm-i960.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i960/tm-i960.h,v
retrieving revision 1.4
diff -p -r1.4 tm-i960.h
*** tm-i960.h 2001/08/01 18:39:26 1.4
--- tm-i960.h 2001/11/11 00:39:20
*************** extern CORE_ADDR saved_pc_after_call ();
*** 156,194 ****
#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)
/* Macros for understanding function return values... */
--- 156,170 ----
#define MAX_REGISTER_VIRTUAL_SIZE 8
#include "floatformat.h"
#define TARGET_LONG_DOUBLE_FORMAT &floatformat_i960_ext
/* Return the GDB type object for the "standard" data type
of data in register N. */
! struct type *i960_register_type (int regnum);
! #define REGISTER_VIRTUAL_TYPE(N) i960_register_type (N)
/* Macros for understanding function return values... */
Index: config/i960/tm-nindy960.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i960/tm-nindy960.h,v
retrieving revision 1.3
diff -p -r1.3 tm-nindy960.h
*** tm-nindy960.h 2001/03/06 08:21:29 1.3
--- tm-nindy960.h 2001/11/11 00:39:20
*************** extern int
*** 104,110 ****
*/
#define DECR_PC_AFTER_BREAK 0
-
- #undef REGISTER_CONVERT_TO_VIRTUAL
- #undef REGISTER_CONVERT_TO_RAW
- #undef REGISTER_CONVERTIBLE
--- 104,106 ----