[AArch64][SME2] Add multi-vector saturating doubling multiply high intrinsics
[llvm-project.git] / lld / test / wasm / export.s
blobc1662985b97a2d4b2126625b2d743919e067fd9a
1 # Test in default mode
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
3 # RUN: not wasm-ld --export=missing -o %t.wasm %t.o 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s
4 # RUN: wasm-ld --export=hidden_function -o %t.wasm %t.o
5 # RUN: obj2yaml %t.wasm | FileCheck %s
7 # Now test in Emscripten mode
8 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten -o %t.o %s
9 # RUN: not wasm-ld --export=missing -o %t.wasm %t.o 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s
10 # RUN: wasm-ld --export=hidden_function -o %t.wasm %t.o
11 # RUN: obj2yaml %t.wasm | FileCheck %s --check-prefixes=CHECK,EMSCRIPTEN
13 # Not exported by default, but forced via commandline
14 .hidden hidden_function
15 .globl hidden_function
16 hidden_function:
17 .functype hidden_function () -> (i32)
18 i32.const 0
19 end_function
21 # Not exported by default
22 .globl default_function
23 default_function:
24 .functype default_function () -> (i32)
25 i32.const 0
26 end_function
28 # Exported in emscripten mode which treats .no_dead_strip as a signal to export
29 .no_dead_strip used_function
30 .globl used_function
31 used_function:
32 .functype used_function () -> (i32)
33 i32.const 0
34 end_function
36 # Exported by default
37 .globl _start
38 _start:
39 .functype _start () -> ()
40 end_function
42 # CHECK-ERROR: error: symbol exported via --export not found: missing
44 # CHECK-NOT: - Name: default_function
46 # CHECK: - Type: EXPORT
47 # CHECK-NEXT: Exports:
48 # CHECK-NEXT: - Name: memory
49 # CHECK-NEXT: Kind: MEMORY
50 # CHECK-NEXT: Index: 0
51 # CHECK-NEXT: - Name: hidden_function
52 # CHECK-NEXT: Kind: FUNCTION
53 # CHECK-NEXT: Index: 0
54 # EMSCRIPTEN-NEXT: - Name: used_function
55 # EMSCRIPTEN-NEXT: Kind: FUNCTION
56 # EMSCRIPTEN-NEXT: Index: 1
57 # CHECK-NEXT: - Name: _start
58 # CHECK-NEXT: Kind: FUNCTION
59 # CHECK-NEXT: Index: 2
60 # CHECK-NEXT: - Type: CODE