[Bug target/71493] New: [6/7 regression] accidental ABI change for structure return on PowerPC

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 10 09:27:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71493

            Bug ID: 71493
           Summary: [6/7 regression] accidental ABI change for structure
                    return on PowerPC
           Product: gcc
           Version: 6.1.1
            Status: UNCONFIRMED
          Keywords: ABI
          Severity: major
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ebotcazou at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc-elf

Created attachment 38675
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38675&action=edit
Testcase

r225631 introduced an accidental ABI change for 32-bit SVR4 targets that don't
define DRAFT_V4_STRUCT_RET (in particular not Linux):

@@ -32144,7 +32168,7 @@ rs6000_function_value (const_tree valtyp
   if (DECIMAL_FLOAT_MODE_P (mode) && TARGET_HARD_FLOAT && TARGET_FPRS)
     /* _Decimal128 must use an even/odd register pair.  */
     regno = (mode == TDmode) ? FP_ARG_RETURN + 1 : FP_ARG_RETURN;
-  else if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_HARD_FLOAT && TARGET_FPRS
+  else if (SCALAR_FLOAT_MODE_NOT_VECTOR_P (mode) && TARGET_HARD_FLOAT &&
TARGET_FPRS
           && ((TARGET_SINGLE_FLOAT && (mode == SFmode)) ||
TARGET_DOUBLE_FLOAT))
     regno = FP_ARG_RETURN;
   else if (TREE_CODE (valtype) == COMPLEX_TYPE

Previously structures containing a single FP field were returned in r3/r4, now
they are returned in fp1 instead (unless -msoft-float).


More information about the Gcc-bugs mailing list