(arm_register_convertible): Delete.
(arm_register_convert_to_virtual): Delete.
(arm_register_convert_to_raw): Delete.
* config/arm/tm-arm.h (REGISTER_CONVERTIBLE): Delete.
(REGISTER_CONVERT_TO_VIRTUAL): Delete.
(REGISTER_CONVERT_TO_RAW): Delete.
(REGISTER_VIRTUAL_TYPE): Redefine as call to arm_register_type.
(arm_register_type): Declare.
+2001-11-10 Andrew Cagney <ac131313@redhat.com>
+
+ * arm-tdep.c (arm_register_type): New function.
+ (arm_register_convertible): Delete.
+ (arm_register_convert_to_virtual): Delete.
+ (arm_register_convert_to_raw): Delete.
+ * config/arm/tm-arm.h (REGISTER_CONVERTIBLE): Delete.
+ (REGISTER_CONVERT_TO_VIRTUAL): Delete.
+ (REGISTER_CONVERT_TO_RAW): Delete.
+ (REGISTER_VIRTUAL_TYPE): Redefine as call to arm_register_type.
+ (arm_register_type): Declare.
+
2001-11-13 Elena Zannoni <ezannoni@redhat.com>
From Andrew Cagney <cagney@redhat.com>:
print_fpu_flags (status);
}
+struct type *
+arm_register_type (int regnum)
+{
+ if (regnum >= F0_REGNUM && regnum < F0_REGNUM + NUM_FREGS)
+ {
+ if (TARGET_BYTE_ORDER == BIG_ENDIAN)
+ return builtin_type_arm_ext_big;
+ else
+ return builtin_type_arm_ext_littlebyte_bigword;
+ }
+ else
+ return builtin_type_int32;
+}
+
/* NOTE: cagney/2001-08-20: Both convert_from_extended() and
convert_to_extended() use floatformat_arm_ext_littlebyte_bigword.
It is thought that this is is the floating-point register format on
&d, dbl);
}
-/* Nonzero if register N requires conversion from raw format to
- virtual format. */
-
-int
-arm_register_convertible (unsigned int regnum)
-{
- return ((regnum - F0_REGNUM) < 8);
-}
-
-/* Convert data from raw format for register REGNUM in buffer FROM to
- virtual format with type TYPE in buffer TO. */
-
-void
-arm_register_convert_to_virtual (unsigned int regnum, struct type *type,
- void *from, void *to)
-{
- double val;
-
- convert_from_extended (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. */
-
-void
-arm_register_convert_to_raw (unsigned int regnum, struct type *type,
- void *from, void *to)
-{
- double val = extract_floating (from, TYPE_LENGTH (type));
-
- convert_to_extended (&val, to);
-}
-
static int
condition_true (unsigned long cond, unsigned long status_reg)
{
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
#define MAX_REGISTER_VIRTUAL_SIZE FP_REGISTER_VIRTUAL_SIZE
-/* Nonzero if register N requires conversion from raw format to
- virtual format. */
-extern int arm_register_convertible (unsigned int);
-#define REGISTER_CONVERTIBLE(REGNUM) (arm_register_convertible (REGNUM))
-
-/* Convert data from raw format for register REGNUM in buffer FROM to
- virtual format with type TYPE in buffer TO. */
-
-extern void arm_register_convert_to_virtual (unsigned int regnum,
- struct type *type,
- void *from, void *to);
-#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
- arm_register_convert_to_virtual (REGNUM, TYPE, FROM, TO)
-
-/* Convert data from virtual format with type TYPE in buffer FROM to
- raw format for register REGNUM in buffer TO. */
-
-extern void arm_register_convert_to_raw (unsigned int regnum,
- struct type *type,
- void *from, void *to);
-#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
- arm_register_convert_to_raw (REGNUM, TYPE, FROM, TO)
-
/* Return the GDB type object for the "standard" data type of data in
register N. */
-#define REGISTER_VIRTUAL_TYPE(N) \
- (((unsigned)(N) - F0_REGNUM) < NUM_FREGS \
- ? builtin_type_double : builtin_type_int)
+extern struct type *arm_register_type (int regnum);
+#define REGISTER_VIRTUAL_TYPE(N) arm_register_type (N)
/* The system C compiler uses a similar structure return convention to gcc */
extern use_struct_convention_fn arm_use_struct_convention;