1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=i686-windows-msvc %s -o %t.obj 3 4# RUN: lld-link -safeseh:no -entry:dllmain -dll %t.obj -out:%t.dll -implib:%t.lib 5# RUN: llvm-readobj %t.lib | FileCheck -check-prefix DECORATED-IMPLIB %s 6# RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix DECORATED-EXPORTS %s 7 8# DECORATED-IMPLIB: Name type: name 9# DECORATED-IMPLIB-NEXT: __imp_@fastcall@8 10# DECORATED-IMPLIB-NEXT: @fastcall@8 11# DECORATED-IMPLIB: Name type: name 12# DECORATED-IMPLIB-NEXT: __imp__stdcall@8 13# DECORATED-IMPLIB-NEXT: _stdcall@8 14# DECORATED-IMPLIB: Name type: noprefix 15# DECORATED-IMPLIB-NEXT: __imp___underscored 16# DECORATED-IMPLIB-NEXT: __underscored 17# DECORATED-IMPLIB: Name type: name 18# DECORATED-IMPLIB-NEXT: __imp_vectorcall@@8 19# DECORATED-IMPLIB-NEXT: vectorcall@@8 20 21# DECORATED-EXPORTS: Name: @fastcall@8 22# DECORATED-EXPORTS: Name: _stdcall@8 23# DECORATED-EXPORTS: Name: _underscored 24# DECORATED-EXPORTS: Name: vectorcall@@8 25 26 .def _stdcall@8; 27 .scl 2; 28 .type 32; 29 .endef 30 .globl _stdcall@8 31 .globl @fastcall@8 32 .globl vectorcall@@8 33 .globl __underscored 34_stdcall@8: 35 movl 8(%esp), %eax 36 addl 4(%esp), %eax 37 retl $8 38@fastcall@8: 39 movl 8(%esp), %eax 40 addl 4(%esp), %eax 41 retl $8 42vectorcall@@8: 43 movl 8(%esp), %eax 44 addl 4(%esp), %eax 45 retl $8 46__underscored: 47 ret 48 49 .def _dllmain; 50 .scl 2; 51 .type 32; 52 .endef 53 .globl _dllmain 54_dllmain: 55 retl 56 57.section .drectve 58.ascii "-export:__underscored -export:_stdcall@8 -export:@fastcall@8 -export:vectorcall@@8" 59