mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
X86: Emit _fltused instead of __fltused on Windows x64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117205 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
19e57025d4
commit
c527407010
@ -583,7 +583,8 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
|
|||||||
if (Subtarget->isTargetWindows()
|
if (Subtarget->isTargetWindows()
|
||||||
&& !Subtarget->isTargetCygMing()
|
&& !Subtarget->isTargetCygMing()
|
||||||
&& MMI->callsExternalVAFunctionWithFloatingPointArguments()) {
|
&& MMI->callsExternalVAFunctionWithFloatingPointArguments()) {
|
||||||
MCSymbol *S = MMI->getContext().GetOrCreateSymbol(StringRef("__fltused"));
|
StringRef SymbolName = Subtarget->is64Bit() ? "_fltused" : "__fltused";
|
||||||
|
MCSymbol *S = MMI->getContext().GetOrCreateSymbol(SymbolName);
|
||||||
OutStreamer.EmitSymbolAttribute(S, MCSA_Global);
|
OutStreamer.EmitSymbolAttribute(S, MCSA_Global);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
; any function is called with floating point arguments on Windows. And that it
|
; any function is called with floating point arguments on Windows. And that it
|
||||||
; is not emitted otherwise.
|
; is not emitted otherwise.
|
||||||
|
|
||||||
; RUN: llc < %s -mtriple i686-pc-win32 | FileCheck %s
|
; RUN: llc < %s -mtriple i686-pc-win32 | FileCheck %s --check-prefix WIN32
|
||||||
|
; RUN: llc < %s -mtriple x86_64-pc-win32 | FileCheck %s --check-prefix WIN64
|
||||||
|
|
||||||
@.str = private constant [4 x i8] c"%f\0A\00"
|
@.str = private constant [4 x i8] c"%f\0A\00"
|
||||||
|
|
||||||
@ -14,4 +15,5 @@ entry:
|
|||||||
|
|
||||||
declare i32 @printf(i8* nocapture, ...) nounwind
|
declare i32 @printf(i8* nocapture, ...) nounwind
|
||||||
|
|
||||||
; CHECK: .globl __fltused
|
; WIN32: .globl __fltused
|
||||||
|
; WIN64: .globl _fltused
|
||||||
|
Loading…
Reference in New Issue
Block a user