[llvm-commits] [llvm] r117205 - in /llvm/trunk: lib/Target/X86/X86AsmPrinter.cpp test/CodeGen/X86/fltused.ll
Michael J. Spencer
bigcheesegs at gmail.com
Sat Oct 23 02:06:59 PDT 2010
Author: mspencer
Date: Sat Oct 23 04:06:59 2010
New Revision: 117205
URL: http://llvm.org/viewvc/llvm-project?rev=117205&view=rev
Log:
X86: Emit _fltused instead of __fltused on Windows x64.
Modified:
llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp
llvm/trunk/test/CodeGen/X86/fltused.ll
Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=117205&r1=117204&r2=117205&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Sat Oct 23 04:06:59 2010
@@ -583,7 +583,8 @@
if (Subtarget->isTargetWindows()
&& !Subtarget->isTargetCygMing()
&& 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);
}
Modified: llvm/trunk/test/CodeGen/X86/fltused.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fltused.ll?rev=117205&r1=117204&r2=117205&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fltused.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fltused.ll Sat Oct 23 04:06:59 2010
@@ -2,7 +2,8 @@
; any function is called with floating point arguments on Windows. And that it
; 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"
@@ -14,4 +15,5 @@
declare i32 @printf(i8* nocapture, ...) nounwind
-; CHECK: .globl __fltused
+; WIN32: .globl __fltused
+; WIN64: .globl _fltused
More information about the llvm-commits
mailing list