[llvm-bugs] [Bug 33030] ARM: Builtins should use AAPCS ABI for non-windows platforms
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 15 11:04:57 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33030
Manoj Gupta <manojgupta at google.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |---
Status|RESOLVED |REOPENED
--- Comment #5 from Manoj Gupta <manojgupta at google.com> ---
Please note that I am referring only to builtins (__aeabi_* functions generally
provided in libgcc) that need aapcs ABI.
Other functions can use aapcs_vfp ABI, just not these builtins.
Here is an example to illustrate it.
$ cat arm_dltoul.c
unsigned long long convert(double a) {
return (unsigned long long)a;
}
$ bin/clang -target armv7a-unknown-linux-gnueabihf arm_dltoul.c -c -O2
$ objdump -d arm_dltoul.o
arm_dltoul.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <convert>: // Convert function itself uses aapcs_vfp ABI. Arg is in d0
0: e92d4800 push {fp, lr}
4: e1a0b00d mov fp, sp
8: ec510b10 vmov r0, r1, d0 // d0 is moved to r0 and r1
c: ebfffffe bl 0 <__aeabi_d2ulz> // __aebi_d2ulz expects args
in r0 and r1 using AAPCS ABI.
10: e8bd8800 pop {fp, pc}
--
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/20170515/6bfa43c6/attachment.html>
More information about the llvm-bugs
mailing list