brintos

brintos / llvm-project-archived public Read only

0
0
Text · 816 B · 7a0c94d Raw
26 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o2# RUN: wasm-ld --export-all --import-table -o %t.wasm %t.o3# RUN: obj2yaml %t.wasm | FileCheck %s4 5.globl _start6_start:7  .functype _start () -> ()8  i32.const 19  # call_indirect instruction implicitly references the function table10  call_indirect () -> ()11  end_function12 13# Verify the --import-table flag creates a table import14 15# CHECK:       - Type:            IMPORT16# CHECK-NEXT:    Imports:17# CHECK-NEXT:      - Module:          env18# CHECK-NEXT:        Field:           __indirect_function_table19# CHECK-NEXT:        Kind:            TABLE20# CHECK-NEXT:        Table:21# CHECK-NEXT:          Index:           022# CHECK-NEXT:          ElemType:        FUNCREF23# CHECK-NEXT:          Limits:24# CHECK-NEXT:            Minimum:         0x125 26