aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-02-14 19:00:58 +0000
committerCorinna Vinschen <corinna@vinschen.de>2002-02-14 19:00:58 +0000
commit6b230f1b26437c6a503302392ee57477b4c468ad (patch)
tree6558d2c0aefe673c980b5afb3f4bc43abcc43a38
parent1ea98d1203dec8ac6bf66a5e861e80b1ca108a81 (diff)
downloadgdb-6b230f1b26437c6a503302392ee57477b4c468ad.zip
gdb-6b230f1b26437c6a503302392ee57477b4c468ad.tar.gz
gdb-6b230f1b26437c6a503302392ee57477b4c468ad.tar.bz2
* arm-tdep.c (arm_push_arguments): Eliminate special float type
handling. * config/arm/tm-arm.h (COERCE_FLOAT_TO_DOUBLE): Define to call standard_coerce_float_to_double().
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/arm-tdep.c22
-rw-r--r--gdb/config/arm/tm-arm.h2
3 files changed, 10 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 27730ee..a2ee75f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2002-02-14 Corinna Vinschen <vinschen@redhat.com>
+
+ * arm-tdep.c (arm_push_arguments): Eliminate special float type
+ handling.
+ * config/arm/tm-arm.h (COERCE_FLOAT_TO_DOUBLE): Define to call
+ standard_coerce_float_to_double().
+
2002-02-14 Christopher Faylor <cgf@redhat.com>
* config/i386/xm-cygwin.h: Revert inadvertent reinclusion of
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index ad4e13c..40d0bcd 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1353,12 +1353,7 @@ arm_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
arg_type = check_typedef (VALUE_TYPE (args[argnum]));
len = TYPE_LENGTH (arg_type);
- /* ANSI C code passes float arguments as integers, K&R code
- passes float arguments as doubles. Correct for this here. */
- if (TYPE_CODE_FLT == TYPE_CODE (arg_type) && REGISTER_SIZE == len)
- nstack_size += FP_REGISTER_VIRTUAL_SIZE;
- else
- nstack_size += len;
+ nstack_size += len;
}
/* Allocate room on the stack, and initialize our stack frame
@@ -1395,21 +1390,6 @@ arm_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
typecode = TYPE_CODE (arg_type);
val = (char *) VALUE_CONTENTS (args[argnum]);
- /* ANSI C code passes float arguments as integers, K&R code
- passes float arguments as doubles. The .stabs record for
- for ANSI prototype floating point arguments records the
- type as FP_INTEGER, while a K&R style (no prototype)
- .stabs records the type as FP_FLOAT. In this latter case
- the compiler converts the float arguments to double before
- calling the function. */
- if (TYPE_CODE_FLT == typecode && REGISTER_SIZE == len)
- {
- DOUBLEST dblval;
- dblval = extract_floating (val, len);
- len = TARGET_DOUBLE_BIT / TARGET_CHAR_BIT;
- val = alloca (len);
- store_floating (val, len, dblval);
- }
#if 1
/* I don't know why this code was disable. The only logical use
for a function pointer is to call that function, so setting
diff --git a/gdb/config/arm/tm-arm.h b/gdb/config/arm/tm-arm.h
index df973af..27a9c8b 100644
--- a/gdb/config/arm/tm-arm.h
+++ b/gdb/config/arm/tm-arm.h
@@ -73,4 +73,6 @@ extern int arm_call_dummy_breakpoint_offset (void);
/* The first 0x20 bytes are the trap vectors. */
#define LOWEST_PC 0x20
+#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (standard_coerce_float_to_double (formal, actual))
+
#endif /* TM_ARM_H */