[llvm-bugs] [Bug 33030] New: ARM: Builtins should use AAPCS ABI for non-windows platforms

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 12 14:46:49 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33030

            Bug ID: 33030
           Summary: ARM: Builtins should use AAPCS ABI for non-windows
                    platforms
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: manojgupta at google.com
                CC: echristo at gmail.com, llozano at chromium.org,
                    llvm-bugs at lists.llvm.org, renato.golin at linaro.org,
                    weimingz at codeaurora.org

COMPILER_RT_ABI is incorrectly defined  in compiler-rt trunk.

For ARM, COMPILER_RT_ABI used to be defined as aapcs unconditionally. 

#define COMPILER_RT_ABI __attribute__((pcs("aapcs")))

However, r298974 changed the following define conditional on HF:

# ifdef COMPILER_RT_ARMHF_TARGET
#   define COMPILER_RT_ABI
# else
#   define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
# endif

This does not work on Non-Windows platforms since llvm always expects AAPCS ABI
for the builtins.

E.g. d2ulz is expected to have AAPCS calling convention.

$ grep -r d2ulz  llvm/lib/Target/ARM/

llvm/lib/Target/ARM/ARMISelLowering.cpp:      { RTLIB::FPTOUINT_F64_I64,
"__aeabi_d2ulz", CallingConv::ARM_AAPCS, ISD::SETCC_INVALID },

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170512/7b266e2f/attachment.html>


More information about the llvm-bugs mailing list