This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/59799] New: aarch64_pass_by_reference never passes arrays by value, contrary to ABI documentation


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59799

            Bug ID: 59799
           Summary: aarch64_pass_by_reference never passes arrays by
                    value, contrary to ABI documentation
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: michael.hudson at linaro dot org

It's always possible I'm totally misunderstanding something here, but it seems
that this code:

      /* Arrays always passed by reference.  */
      if (TREE_CODE (type) == ARRAY_TYPE)
    return true;

in gcc/config/aarch64/aarch64.c does not agree with the rules from "Procedure
Call Standard for the ARM 64-bit Architecture"
(http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf).
 As far as I can see the rules on page 18 and 19 make no distinction between
arrays and structs and they can both be passed in registers when small enough.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]