Skip to content

Commit 81e458d

Browse files
committed
Allow '@' to appear in x86 mingw symbols
Summary: 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@IMGREL. Reviewers: mstorsjo Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66974 llvm-svn: 370408
1 parent 33541fa commit 81e458d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,7 @@ X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF(const Triple &Triple) {
163163

164164
TextAlignFillValue = 0x90;
165165

166+
AllowAtInName = true;
167+
166168
UseIntegratedAssembler = true;
167169
}

llvm/test/MC/X86/stdcall.s

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# RUN: llvm-mc %s -filetype=obj -o - -triple i686-windows-msvc | llvm-nm - | FileCheck %s
2+
# RUN: llvm-mc %s -filetype=obj -o - -triple i686-windows-gnu | llvm-nm - | FileCheck %s
3+
4+
# CHECK: T _mystdcall@8{{$}}
5+
# CHECK: T foo
6+
7+
.text
8+
.global _mystdcall@8
9+
_mystdcall@8:
10+
movl 4(%esp), %eax
11+
addl 8(%esp), %eax
12+
retl $8
13+
14+
.global foo
15+
foo:
16+
pushl $1
17+
pushl $2
18+
calll _mystdcall@8
19+
retl

0 commit comments

Comments
 (0)