[LLVMbugs] [Bug 11860] New: ARM: floating-point arguments of variadic functions passed incorrectly with AAPCS-VFP ABI
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jan 26 04:34:34 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=11860
Bug #: 11860
Summary: ARM: floating-point arguments of variadic functions
passed incorrectly with AAPCS-VFP ABI
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: ARM
AssignedTo: unassignedbugs at nondot.org
ReportedBy: mans at mansr.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7948
--> http://llvm.org/bugs/attachment.cgi?id=7948
Fix vararg calls with float arguments under AAPCS-VFP ABI
Calls to variadic functions should always use the base AAPCS variant, even with
AAPCS-VFP is in use. This is currently broken as demonstrated by this test:
float foo(float x, ...);
float bar(void)
{
return foo(0.0);
}
Using -mfloat-abi hard, this compiles to the following:
00000000 <bar>:
0: e92d4800 push {r11, lr}
4: ed9f0a01 vldr s0, [pc, #4] ; 10 <bar+0x10>
8: ebfffffe bl 0 <foo>
c: e8bd8800 pop {r11, pc}
10: 00000000 andeq r0, r0, r0
The attached patch fixes the problem.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list