mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-22 04:05:05 +00:00
X86: correct library call setup for Windows itanium
This target is identical to the Windows MSVC (and follows Microsoft ABI for C). Correct the library call setup for this target. The same set of library calls are missing on this environment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213883 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
855a7e6eff
commit
69280f8844
@ -426,7 +426,7 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T,
|
||||
TLI.setUnavailable(LibFunc::fiprintf);
|
||||
}
|
||||
|
||||
if (T.isKnownWindowsMSVCEnvironment()) {
|
||||
if (T.isKnownWindowsMSVCEnvironment() || T.isWindowsItaniumEnvironment()) {
|
||||
// Win32 does not support long double
|
||||
TLI.setUnavailable(LibFunc::acosl);
|
||||
TLI.setUnavailable(LibFunc::asinl);
|
||||
|
16
test/MC/X86/x86-windows-itanium-libcalls.ll
Normal file
16
test/MC/X86/x86-windows-itanium-libcalls.ll
Normal file
@ -0,0 +1,16 @@
|
||||
; RUN: opt -mtriple i686-windows-itanium -O2 -o - %s | llvm-dis | FileCheck %s
|
||||
|
||||
target triple = "i686-windows-itanium"
|
||||
|
||||
declare dllimport double @floor(double)
|
||||
|
||||
define dllexport float @test(float %f) {
|
||||
%conv = fpext float %f to double
|
||||
%call = tail call double @floor(double %conv)
|
||||
%cast = fptrunc double %call to float
|
||||
ret float %cast
|
||||
}
|
||||
|
||||
; CHECK-NOT: floorf
|
||||
; CHECK: floor
|
||||
|
Loading…
x
Reference in New Issue
Block a user