1 # REQUIRES: aarch64, x86
2 # RUN: split-file %s %t.dir
4 # RUN: llvm-mc -filetype=obj -triple=aarch64-windows %t.dir/arm64-dllmain.s -o %t.dir/arm64-dllmain.obj
5 # RUN: llvm-mc -filetype=obj -triple=aarch64-windows %t.dir/arm64-p4sym.s -o %t.dir/arm64-p4sym.obj
6 # RUN: lld-link -dll -machine:arm64 %t.dir/arm64-dllmain.obj %t.dir/arm64-p4sym.obj -out:%t.dll
8 # RUN: llvm-objdump -dz %t.dll | FileCheck -check-prefix=CHECK-ARM64 %s
9 # CHECK-ARM64: 180001000: 52800020 mov w0, #0x1
10 # CHECK-ARM64: 180001004: d65f03c0 ret
11 # CHECK-ARM64: 180001008: 00000000
12 # CHECK-ARM64: 18000100c: 00000000
13 # CHECK-ARM64: 180001010: 52800040 mov w0, #0x2
14 # CHECK-ARM64: 180001014: d65f03c0 ret
17 .def _DllMainCRTStartup;
21 .globl _DllMainCRTStartup
38 # RUN: llvm-mc -filetype=obj -triple=x86_64-windows %t.dir/x86_64-dllmain.s -o %t.dir/x86_64-dllmain.obj
39 # RUN: llvm-mc -filetype=obj -triple=x86_64-windows %t.dir/x86_64-p4sym.s -o %t.dir/x86_64-p4sym.obj
40 # RUN: lld-link -dll -machine:amd64 %t.dir/x86_64-dllmain.obj %t.dir/x86_64-p4sym.obj -out:%t.dll
42 # RUN: llvm-objdump -dz %t.dll | FileCheck -check-prefix=CHECK-X64 %s
43 # CHECK-X64: 180001000: b8 01 00 00 00 movl $0x1, %eax
44 # CHECK-X64: 180001005: c3 retq
45 # CHECK-X64: 180001006: cc int3
46 # CHECK-X64: 180001007: cc int3
47 # CHECK-X64: 180001008: cc int3
48 # CHECK-X64: 180001009: cc int3
49 # CHECK-X64: 18000100a: cc int3
50 # CHECK-X64: 18000100b: cc int3
51 # CHECK-X64: 18000100c: cc int3
52 # CHECK-X64: 18000100d: cc int3
53 # CHECK-X64: 18000100e: cc int3
54 # CHECK-X64: 18000100f: cc int3
55 # CHECK-X64: 180001010: b8 02 00 00 00 movl $0x2, %eax
56 # CHECK-X64: 180001015: c3 retq
59 .def _DllMainCRTStartup;
63 .globl _DllMainCRTStartup