llvm/test/MC/WebAssembly/stack-ptr.ll
Sam Clegg 7db4b1729a [WebAssembly] MC: Use inline triple in test bitcode files
This matches the CodeGen tests and makes it a little easy
to run these from the command line manually.

Differential Revision: https://reviews.llvm.org/D42440

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323275 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-23 23:03:47 +00:00

24 lines
743 B
LLVM

; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
target triple = "wasm32-unknown-unknown-wasm"
; 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
; CHECK: GlobalType: I32
; CHECK: GlobalMutable: true
; CHECK: - Type: CODE
; CHECK: Relocations:
; CHECK: - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB
; CHECK: Index: 0