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: unassignedb...@nondot.org
          Reporter: manojgu...@google.com
                CC: echri...@gmail.com, lloz...@chromium.org,
                    llvm-bugs@lists.llvm.org, renato.go...@linaro.org,
                    weimi...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to