* corelow.c, exec.c, inftarg.c, m3-nat.c, op50-rom.c, procfs.c,
[deliverable/binutils-gdb.git] / gdb / values.c
index 916bf6f27ab1c074741f435c47f216d7bd5bef32..aa4a4f2090a7cc4563f3786bc2e1864b56d47f5e 100644 (file)
@@ -1466,8 +1466,6 @@ set_return_value (val)
      value_ptr val;
 {
   register enum type_code code = TYPE_CODE (VALUE_TYPE (val));
-  double dbuf;
-  LONGEST lbuf;
 
   if (code == TYPE_CODE_ERROR)
     error ("Function return type unknown.");
@@ -1476,19 +1474,7 @@ set_return_value (val)
       || code == TYPE_CODE_UNION)      /* FIXME, implement struct return.  */
     error ("GDB does not support specifying a struct or union return value.");
 
-  /* FIXME, this is bogus.  We don't know what the return conventions
-     are, or how values should be promoted.... */
-  if (code == TYPE_CODE_FLT)
-    {
-      dbuf = value_as_double (val);
-
-      STORE_RETURN_VALUE (VALUE_TYPE (val), (char *)&dbuf);
-    }
-  else
-    {
-      lbuf = value_as_long (val);
-      STORE_RETURN_VALUE (VALUE_TYPE (val), (char *)&lbuf);
-    }
+  STORE_RETURN_VALUE (VALUE_TYPE (val), VALUE_CONTENTS (val));
 }
 \f
 void
This page took 0.023573 seconds and 4 git commands to generate.