Zap REGISTER_CONVERTIBLE from m88k.

This commit is contained in:
Andrew Cagney 2001-11-13 02:39:29 +00:00
parent e5470cdc92
commit 2c10d744f3
3 changed files with 24 additions and 31 deletions

View file

@ -1,3 +1,12 @@
2001-11-10 Andrew Cagney <ac131313@redhat.com>
* m88k-tdep.c (m88k_register_type): New function.
* config/m88k/tm-m88k.h (REGISTER_CONVERTIBLE): Delete.
(REGISTER_CONVERT_TO_VIRTUAL): Delete.
(REGISTER_CONVERT_TO_RAW): Delete.
(m88k_register_type): Declare.
(REGISTER_VIRTUAL_TYPE): Update. Call m88k_register_type.
2001-11-11 Mark Kettenis <kettenis@elgar.my.domain>
* i386-tdep.h (FPU_REG_RAW_SIZE): Define unconditionally.

View file

@ -380,40 +380,11 @@ if (!target_is_m88110) \
#define MAX_REGISTER_VIRTUAL_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
/* Nonzero if register N requires conversion
from raw format to virtual format. */
#define REGISTER_CONVERTIBLE(N) ((N) >= XFP_REGNUM)
#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) \
{ \
DOUBLEST val; \
floatformat_to_doublest (&floatformat_m88110_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_m88110_ext, &val, (TO)); \
}
/* Return the GDB type object for the "standard" data type
of data in register N. */
#define REGISTER_VIRTUAL_TYPE(N) \
((N) >= XFP_REGNUM \
? builtin_type_double \
: ((N) == PC_REGNUM || (N) == FP_REGNUM || (N) == SP_REGNUM \
? lookup_pointer_type (builtin_type_void) : builtin_type_int))
struct type *m88k_register_type (int regnum);
#define REGISTER_VIRTUAL_TYPE(N) m88k_register_type (N)
/* The 88k call/return conventions call for "small" values to be returned
into consecutive registers starting from r2. */

View file

@ -39,6 +39,19 @@ void frame_find_saved_regs ();
int target_is_m88110 = 0;
/* The type of a register. */
struct type *
m88k_register_type (int regnum)
{
if (regnum >= XFP_REGNUM)
return builtin_type_m88110_ext;
else if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
return builtin_type_void_func_ptr;
else
return builtin_type_int32;
}
/* The m88k kernel aligns all instructions on 4-byte boundaries. The
kernel also uses the least significant two bits for its own hocus
pocus. When gdb receives an address from the kernel, it needs to