diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-26 20:32:52 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-26 20:32:52 +0000 |
commit | 08bbd35a80bf7765fe0d3043f9eb5a2f2786b649 (patch) | |
tree | 80108f0f128657f8623f8f66ad9735b4d88e7b47 /test/MC/WebAssembly/stack-ptr.ll | |
parent | 7c7aba6e5fef47a01a136be655b0a92cfd7090f6 (diff) |
Notes
Diffstat (limited to 'test/MC/WebAssembly/stack-ptr.ll')
-rw-r--r-- | test/MC/WebAssembly/stack-ptr.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/MC/WebAssembly/stack-ptr.ll b/test/MC/WebAssembly/stack-ptr.ll new file mode 100644 index 0000000000000..98d1311e154c4 --- /dev/null +++ b/test/MC/WebAssembly/stack-ptr.ll @@ -0,0 +1,21 @@ +; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s + +; 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: false +; CHECK: - Type: CODE +; CHECK: Relocations: +; CHECK: - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB +; CHECK: Index: 0 |