1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/MC/WebAssembly/stack-ptr.ll
Sam Clegg d8d06a1305 [WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_
See https://github.com/WebAssembly/tool-conventions/pull/95.

This is less typing and IMHO more readable, and it also fits with
our naming around the binary format which tends to use the short name.
e.g.

include/llvm/BinaryFormat/Wasm.h
tools/llvm-objdump/WasmDump.cpp
etc..

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

llvm-svn: 353062
2019-02-04 17:28:46 +00:00

24 lines
731 B
LLVM

; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
target triple = "wasm32-unknown-unknown"
; 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_WASM_GLOBAL_INDEX_LEB
; CHECK: Index: 0