[llvm] r196814 - Don't add suffixes for stdcall/fastcall on 64 coff.
Rafael Espindola
rafael.espindola at gmail.com
Mon Dec 9 12:44:48 PST 2013
Author: rafael
Date: Mon Dec 9 14:44:48 2013
New Revision: 196814
URL: http://llvm.org/viewvc/llvm-project?rev=196814&view=rev
Log:
Don't add suffixes for stdcall/fastcall on 64 coff.
This matches the behavior of both msvc and mingw.
Modified:
llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
llvm/trunk/test/CodeGen/X86/fastcall-correct-mangling.ll
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp?rev=196814&r1=196813&r2=196814&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp Mon Dec 9 14:44:48 2013
@@ -128,6 +128,7 @@ X86MCAsmInfoMicrosoft::X86MCAsmInfoMicro
if (Triple.getArch() == Triple::x86_64) {
GlobalPrefix = '\0';
PrivateGlobalPrefix = ".L";
+ HasMicrosoftFastStdCallMangling = false;
}
AssemblerDialect = AsmWriterFlavor;
@@ -143,6 +144,7 @@ X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF
if (Triple.getArch() == Triple::x86_64) {
GlobalPrefix = '\0';
PrivateGlobalPrefix = ".L";
+ HasMicrosoftFastStdCallMangling = false;
}
AssemblerDialect = AsmWriterFlavor;
Modified: llvm/trunk/test/CodeGen/X86/fastcall-correct-mangling.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fastcall-correct-mangling.ll?rev=196814&r1=196813&r2=196814&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fastcall-correct-mangling.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fastcall-correct-mangling.ll Mon Dec 9 14:44:48 2013
@@ -1,14 +1,26 @@
-; RUN: llc < %s -mtriple=i386-unknown-mingw32 | FileCheck %s
+; RUN: llc < %s -mtriple=i386-unknown-mingw32 | \
+; RUN: FileCheck --check-prefix=CHECK32 %s
+
+; RUN: llc < %s -mtriple=i386-unknown-win32 | \
+; RUN: FileCheck --check-prefix=CHECK32 %s
+
+; RUN: llc < %s -mtriple=x86_64-unknown-mingw32 | \
+; RUN: FileCheck --check-prefix=CHECK64 %s
+
+; RUN: llc < %s -mtriple=x86_64-unknown-mingw32 | \
+; RUN: FileCheck --check-prefix=CHECK64 %s
; Check that a fastcall function gets correct mangling
define x86_fastcallcc void @func(i64 %X, i8 %Y, i8 %G, i16 %Z) {
-; CHECK: @func at 20:
+; CHECK32-LABEL: {{^}}@func at 20:
+; CHECK64-LABEL: {{^}}func:
ret void
}
define x86_fastcallcc i32 @"\01DoNotMangle"(i32 %a) {
-; CHECK: DoNotMangle:
+; CHECK32-LABEL: {{^}}DoNotMangle:
+; CHECK64-LABEL: {{^}}DoNotMangle:
entry:
ret i32 %a
}
More information about the llvm-commits
mailing list