33 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -triple i686-windows-msvc %s -o %t.obj -filetype=obj3# RUN: lld-link -safeseh:no %t.obj -out:%t.dll -dll -nodefaultlib -noentry -export:foo_std=bar_std -export:foo_fast=bar_fast4# RUN: llvm-nm %t.lib | FileCheck %s5 6# MSVC fudges the lookup of 'bar' to allow it to find the stdcall function7# _bar_std@8, and then exports _foo_std@8. Same for fastcall and other mangling8# schemes.9 10# CHECK: export-stdcall.s.tmp.dll:11# CHECK: 00000000 T @foo_fast@812# CHECK: 00000000 T __imp_@foo_fast@813 14# CHECK: export-stdcall.s.tmp.dll:15# CHECK: 00000000 T __imp__foo_std@816# CHECK: 00000000 T _foo_std@817 18 .text19 .def _bar_std@8; .scl 2; .type 32; .endef20 .globl _bar_std@821_bar_std@8:22 movl 8(%esp), %eax23 movl 4(%esp), %ecx24 leal 42(%ecx,%eax), %eax25 retl $826 27 .def @bar_fast@8; .scl 2; .type 32; .endef28 .globl @bar_fast@829@bar_fast@8:30 leal 42(%ecx,%eax), %eax31 retl32 33