annotate lld/test/COFF/export-stdcall.s @ 192:d7606dcf6fce

Added tag llvm10 for changeset 0572611fdcc8
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 14 Dec 2020 18:01:34 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 # REQUIRES: x86
anatofuz
parents:
diff changeset
2 # RUN: llvm-mc -triple i686-windows-msvc %s -o %t.obj -filetype=obj
anatofuz
parents:
diff changeset
3 # RUN: lld-link -safeseh:no %t.obj -out:%t.dll -dll -nodefaultlib -noentry -export:foo_std=bar_std -export:foo_fast=bar_fast
anatofuz
parents:
diff changeset
4 # RUN: llvm-nm %t.lib | FileCheck %s
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 # MSVC fudges the lookup of 'bar' to allow it to find the stdcall function
anatofuz
parents:
diff changeset
7 # _bar_std@8, and then exports _foo_std@8. Same for fastcall and other mangling
anatofuz
parents:
diff changeset
8 # schemes.
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 # CHECK: export-stdcall.s.tmp.dll:
anatofuz
parents:
diff changeset
11 # CHECK: 00000000 T @foo_fast@8
anatofuz
parents:
diff changeset
12 # CHECK: 00000000 T __imp_@foo_fast@8
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 # CHECK: export-stdcall.s.tmp.dll:
anatofuz
parents:
diff changeset
15 # CHECK: 00000000 T __imp__foo_std@8
anatofuz
parents:
diff changeset
16 # CHECK: 00000000 T _foo_std@8
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 .text
anatofuz
parents:
diff changeset
19 .def _bar_std@8; .scl 2; .type 32; .endef
anatofuz
parents:
diff changeset
20 .globl _bar_std@8
anatofuz
parents:
diff changeset
21 _bar_std@8:
anatofuz
parents:
diff changeset
22 movl 8(%esp), %eax
anatofuz
parents:
diff changeset
23 movl 4(%esp), %ecx
anatofuz
parents:
diff changeset
24 leal 42(%ecx,%eax), %eax
anatofuz
parents:
diff changeset
25 retl $8
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 .def @bar_fast@8; .scl 2; .type 32; .endef
anatofuz
parents:
diff changeset
28 .globl @bar_fast@8
anatofuz
parents:
diff changeset
29 @bar_fast@8:
anatofuz
parents:
diff changeset
30 leal 42(%ecx,%eax), %eax
anatofuz
parents:
diff changeset
31 retl
anatofuz
parents:
diff changeset
32