From: Jim Blandy Date: Fri, 7 Dec 2001 22:49:25 +0000 (+0000) Subject: * s390-tdep.c (s390_store_return_value): Don't convert float X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=03a013f4d3754315f08a8127581086b95645e732;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 77db6689877..37920f2c689 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2001-12-07 Jim Blandy + + * 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. + 2001-12-07 Daniel Jacobowitz * valops.c (hand_function_call): Check for method arguments in diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index cc282245700..ddeacadd7fe 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 {