Eliminate REGISTER_CONVERTIBLE().

This commit is contained in:
Andrew Cagney 2001-11-13 03:10:35 +00:00
parent 2c10d744f3
commit 0cb2e7c50f
4 changed files with 23 additions and 30 deletions

View 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.

View 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)
/* Macros for understanding function return values... */

View 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

View File

@ -34,6 +34,16 @@
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