27 lines · plain
1# RUN: llvm-mc -mattr=+call-indirect-overlong -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o2# RUN: wasm-ld --import-table -o %t.wasm %t.o3# RUN: obj2yaml %t.wasm | FileCheck %s4 5.globl __indirect_function_table6.tabletype __indirect_function_table, funcref7 8.globl _start9_start:10 .functype _start () -> ()11 i32.const 112 call_indirect __indirect_function_table, () -> ()13 end_function14 15# Verify the --import-table flag creates a table import16 17# CHECK: - Type: IMPORT18# CHECK-NEXT: Imports:19# CHECK-NEXT: - Module: env20# CHECK-NEXT: Field: __indirect_function_table21# CHECK-NEXT: Kind: TABLE22# CHECK-NEXT: Table:23# CHECK-NEXT: Index: 024# CHECK-NEXT: ElemType: FUNCREF25# CHECK-NEXT: Limits:26# CHECK-NEXT: Minimum: 0x127