[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / wasm / stack-first.test
blob72e1a006d5700132287d8074f6cac4002f7ee49b
1 ; Test that the --stack-first option places the stack at the start of linear
2 ; memory.  In this case the --stack-first option is being passed along with a
3 ; stack size of 512.  This means (since the stack grows down) the stack pointer
4 ; global should be initialized to 512.
5 ; Also test that __heap_base is still aligned with the --stack-first option.
7 RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/stack-first.s -o %t.o
8 RUN: wasm-ld -z stack-size=512 --stack-first --export=__data_end --export=__heap_base --export=someByte -o %t.wasm %t.o
9 RUN: obj2yaml %t.wasm | FileCheck %s
11 CHECK:        - Type:            GLOBAL
12 CHECK-NEXT:     Globals:         
13 CHECK-NEXT:       - Index:           0
14 CHECK-NEXT:         Type:            I32
15 CHECK-NEXT:         Mutable:         true
16 CHECK-NEXT:         InitExpr:        
17 CHECK-NEXT:           Opcode:          I32_CONST
18 CHECK-NEXT:           Value:           512
19 CHECK-NEXT:       - Index:           1
20 CHECK-NEXT:         Type:            I32
21 CHECK-NEXT:         Mutable:         false
22 CHECK-NEXT:         InitExpr:        
23 CHECK-NEXT:           Opcode:          I32_CONST
24 CHECK-NEXT:           Value:           512
25 CHECK-NEXT:       - Index:           2
26 CHECK-NEXT:         Type:            I32
27 CHECK-NEXT:         Mutable:         false
28 CHECK-NEXT:         InitExpr:        
29 CHECK-NEXT:           Opcode:          I32_CONST
30 CHECK-NEXT:           Value:           513
31 CHECK-NEXT:       - Index:           3
32 CHECK-NEXT:         Type:            I32
33 CHECK-NEXT:         Mutable:         false
34 CHECK-NEXT:         InitExpr:        
35 CHECK-NEXT:           Opcode:          I32_CONST
36 CHECK-NEXT:           Value:           528
37 CHECK-NEXT:   - Type:            EXPORT
38 CHECK-NEXT:     Exports:         
39 CHECK-NEXT:       - Name:            memory
40 CHECK-NEXT:         Kind:            MEMORY
41 CHECK-NEXT:         Index:           0
42 CHECK-NEXT:       - Name:            _start
43 CHECK-NEXT:         Kind:            FUNCTION
44 CHECK-NEXT:         Index:           0
45 CHECK-NEXT:       - Name:            someByte
46 CHECK-NEXT:         Kind:            GLOBAL
47 CHECK-NEXT:         Index:           1
48 CHECK-NEXT:       - Name:            __data_end
49 CHECK-NEXT:         Kind:            GLOBAL
50 CHECK-NEXT:         Index:           2
51 CHECK-NEXT:       - Name:            __heap_base
52 CHECK-NEXT:         Kind:            GLOBAL
53 CHECK-NEXT:         Index:           3