2020-06-16 06:31:10 +08:00
|
|
|
; RUN: llc --mtriple=wasm32-unknown-unknown -filetype=obj %s -o - | obj2yaml | FileCheck --check-prefixes CHECK,CHK32 %s
|
|
|
|
; RUN: llc --mtriple=wasm64-unknown-unknown -filetype=obj %s -o - | obj2yaml | FileCheck --check-prefixes CHECK,CHK64 %s
|
2017-06-17 07:59:10 +08:00
|
|
|
|
|
|
|
; Function that uses explict stack, and should generate a reference to
|
|
|
|
; __stack_pointer, along with the corresponding reloction entry.
|
|
|
|
define hidden void @foo() #0 {
|
|
|
|
entry:
|
|
|
|
alloca i32, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK: - Type: IMPORT
|
|
|
|
; CHECK: Imports:
|
|
|
|
; CHECK: - Module: env
|
|
|
|
; CHECK: Field: __stack_pointer
|
|
|
|
; CHECK: Kind: GLOBAL
|
2020-06-16 06:31:10 +08:00
|
|
|
; CHK32: GlobalType: I32
|
|
|
|
; CHK64: GlobalType: I64
|
2017-12-06 09:02:44 +08:00
|
|
|
; CHECK: GlobalMutable: true
|
2017-06-17 07:59:10 +08:00
|
|
|
; CHECK: - Type: CODE
|
|
|
|
; CHECK: Relocations:
|
2019-02-05 01:28:46 +08:00
|
|
|
; CHECK: - Type: R_WASM_GLOBAL_INDEX_LEB
|
2017-06-17 07:59:10 +08:00
|
|
|
; CHECK: Index: 0
|