* s390-tdep.c (s390_store_return_value): Don't convert float
authorJim Blandy <jimb@codesourcery.com>
Fri, 7 Dec 2001 22:49:25 +0000 (22:49 +0000)
committerJim Blandy <jimb@codesourcery.com>
Fri, 7 Dec 2001 22:49:25 +0000 (22:49 +0000)
values to double format when returning them; just return them in
the first half of the FP register, as the ABI specifies.

gdb/ChangeLog
gdb/s390-tdep.c

index 77db6689877328f00257e3f75dfb9845f6cb593f..37920f2c6890c3498d4a13e8667fad991707ccb2 100644 (file)
@@ -1,3 +1,9 @@
+2001-12-07  Jim Blandy  <jimb@redhat.com>
+
+       * 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  <drow@mvista.com>
 
        * valops.c (hand_function_call): Check for method arguments in
index cc2822457000259852e19e5b05ff443e1f998773..ddeacadd7fe51af0b8016cb941de00e8720af398 100644 (file)
@@ -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
     {