aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-tdep.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2001-12-07 22:49:25 +0000
committerJim Blandy <jimb@codesourcery.com>2001-12-07 22:49:25 +0000
commit03a013f4d3754315f08a8127581086b95645e732 (patch)
tree1a7c3dd7fdf28a8ef57db4e070a3da9f9ebead79 /gdb/s390-tdep.c
parent6a1675750a9251a46b746f90ea97f77164d4475c (diff)
downloadgdb-03a013f4d3754315f08a8127581086b95645e732.zip
gdb-03a013f4d3754315f08a8127581086b95645e732.tar.gz
gdb-03a013f4d3754315f08a8127581086b95645e732.tar.bz2
* s390-tdep.c (s390_store_return_value): Don't convert float
values to double format when returning them; just return them in the first half of the FP register, as the ABI specifies.
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r--gdb/s390-tdep.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index cc28224..ddeacad 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1144,12 +1144,13 @@ s390_store_return_value (struct type *valtype, char *valbuf)
if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
{
- DOUBLEST tempfloat = extract_floating (valbuf, TYPE_LENGTH (valtype));
-
- floatformat_from_doublest (&floatformat_ieee_double_big, &tempfloat,
- reg_buff);
- write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM), reg_buff,
- S390_FPR_SIZE);
+ if (TYPE_LENGTH (valtype) == 4
+ || TYPE_LENGTH (valtype) == 8)
+ write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM), valbuf,
+ TYPE_LENGTH (valtype));
+ else
+ error ("GDB is unable to return `long double' values "
+ "on this architecture.");
}
else
{