llvm-project/llvm/test/MC/WebAssembly/funcref-from-table.s
kamenokonokotan 219a2eb4d4 [WebAssembly] Update WebAssemblyAsmTypeCheck for table.get
This patch is aimed to resolve [[ https://github.com/llvm/llvm-project/issues/53789 | GitHub Issue #53789 ]].

Reviewed By: sbc100

Differential Revision: https://reviews.llvm.org/D120229
2022-03-05 16:57:29 +01:00

22 lines
680 B
ArmAsm

# RUN: llvm-mc -mattr=+reference-types -triple=wasm32-unknown-unknown -filetype=obj -o - < %s | obj2yaml | FileCheck %s
.globl __indirect_function_table
.tabletype __indirect_function_table, funcref
.globl obtain_funcref_from_table_index
obtain_funcref_from_table_index:
.functype obtain_funcref_from_table_index(i32) -> (funcref)
local.get 0
table.get __indirect_function_table
end_function
# CHECK: Sections:
# CHECK-NEXT: - Type: TYPE
# CHECK-NEXT: Signatures:
# CHECK-NEXT: - Index: 0
# CHECK-NEXT: ParamTypes:
# CHECK-NEXT: - I32
# CHECK-NEXT: ReturnTypes:
# CHECK-NEXT: - FUNCREF