[PATCH] D66974: Allow '@' to appear in x86 mingw symbols

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 14:02:07 PDT 2019


rnk created this revision.
rnk added a reviewer: mstorsjo.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

There is no reason to differ in assembler behavior here between -msvc
and -gnu targets. Without this setting, the text after the '@' is
interpreted as a symbol variable, like foo at IMGREL.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D66974

Files:
  llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
  llvm/test/MC/X86/stdcall.s


Index: llvm/test/MC/X86/stdcall.s
===================================================================
--- /dev/null
+++ llvm/test/MC/X86/stdcall.s
@@ -0,0 +1,19 @@
+# RUN: llvm-mc %s -filetype=obj -o - -triple i686-windows-msvc | llvm-nm - | FileCheck %s
+# RUN: llvm-mc %s -filetype=obj -o - -triple i686-windows-gnu | llvm-nm - | FileCheck %s
+
+# CHECK: T _mystdcall at 8{{$}}
+# CHECK: T foo
+
+.text
+.global _mystdcall at 8
+_mystdcall at 8:
+	movl 4(%esp), %eax
+	addl 8(%esp), %eax
+	retl $8
+
+.global foo
+foo:
+	pushl $1
+	pushl $2
+	calll _mystdcall at 8
+	retl
Index: llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
===================================================================
--- llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
+++ llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
@@ -163,5 +163,7 @@
 
   TextAlignFillValue = 0x90;
 
+  AllowAtInName = true;
+
   UseIntegratedAssembler = true;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66974.217970.patch
Type: text/x-patch
Size: 913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190829/fdb706a9/attachment.bin>


More information about the llvm-commits mailing list