summaryrefslogtreecommitdiff
path: root/gdb/arm-linux-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-08-21 04:31:32 +0000
committerAndrew Cagney <cagney@redhat.com>2001-08-21 04:31:32 +0000
commitebb33d6941fc00971c42b9e4b71e2d7c3f2761bd (patch)
treef66fdec80d298857b8e1e246ea60c13a01cdb30d /gdb/arm-linux-tdep.c
parentb341707f9d638d753dd861f69855e4bbea947b50 (diff)
downloadgdb-ebb33d6941fc00971c42b9e4b71e2d7c3f2761bd.tar.gz
* arm-tdep.c (convert_from_extended, convert_to_extended): Delete
assembler version of function. (convert_from_extended, convert_to_extended): Rewrite. Use floatformat_to_doublest, floatformat_from_doublest, floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword. (arm_push_arguments): Use extract_floating and store_floating to perform floating point conversions. (SWAP_TARGET_AND_HOST): Delete macro. * arm-linux-tdep.c (arm_linux_push_arguments): Use extract_floating and store_floating to perform floating point conversions.
Diffstat (limited to 'gdb/arm-linux-tdep.c')
-rw-r--r--gdb/arm-linux-tdep.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 6faf85be9ba..ae06160ca5b 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -160,7 +160,6 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
int len;
char *val;
- double dbl_arg;
CORE_ADDR regval;
enum type_code typecode;
struct type *arg_type, *target_type;
@@ -180,14 +179,11 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
calling the function. */
if (TYPE_CODE_FLT == typecode && REGISTER_SIZE == len)
{
- /* Float argument in buffer is in host format. Read it and
- convert to DOUBLEST, and store it in target double. */
DOUBLEST dblval;
-
+ dblval = extract_floating (val, len);
len = TARGET_DOUBLE_BIT / TARGET_CHAR_BIT;
- floatformat_to_doublest (HOST_FLOAT_FORMAT, val, &dblval);
- store_floating (&dbl_arg, len, dblval);
- val = (char *) &dbl_arg;
+ val = alloca (len);
+ store_floating (val, len, dblval);
}
/* If the argument is a pointer to a function, and it is a Thumb