brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 1f425e5 Raw
60 lines · plain
1# REQUIRES: webassembly-registered-target2# RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %s -o %t.o -g3# RUN: llvm-symbolizer --basenames --output-style=GNU -e %t.o 1 2 3 4 5 6 7 8 9 10 11 12 13 | FileCheck %s4 5foo:6    .functype foo () -> ()7    nop8    return9    end_function10 11bar:12    .functype bar (i32) -> (i32)13    local.get 014    nop15    return16    end_function17 18 19## Symbols start from (including) the function length and should cover all the20## way to the next symbol start.21## TODO: create a loc for .functype? It could go with the local declarations.22 23## Byte 1 is the function length, has no loc but the symbol table considers it24## the start of the function25# CHECK: foo26# CHECK-NEXT: ??:027## Byte 2 is the local declaration, but for some reason DWARF is marking it as line 7.28## TODO: figure out why.29# CHECK-NEXT: foo30# CHECK-NEXT: wasm-basic.s:731## Byte 3 is actually the nop, line 732# CHECK-NEXT: foo33# CHECK-NEXT: wasm-basic.s:734## Byte 4 is the return, line 835# CHECK-NEXT: foo36# CHECK-NEXT: wasm-basic.s:837## Byte 5 is the end_function, line 938# CHECK-NEXT: foo39# CHECK-NEXT: wasm-basic.s:940## Byte 6 is bar's function length, symbol table considers it part of bar41# CHECK-NEXT: bar42# CHECK-NEXT: ??:043## Byte 7 bar's local declaration, but DWARF marks it as line 13, like above44# CHECK-NEXT: bar45# CHECK-NEXT: wasm-basic.s:1346## Byte 8 and 9 are actually the local.get on line 1347# CHECK-NEXT: bar48# CHECK-NEXT: wasm-basic.s:1349# CHECK-NEXT: bar50# CHECK-NEXT: wasm-basic.s:1351## Byte 10 is the nop52# CHECK-NEXT: bar53# CHECK-NEXT: wasm-basic.s:1454## Byte b is the return55# CHECK-NEXT: bar56# CHECK-NEXT: wasm-basic.s:1557## Byte c is end_function58# CHECK-NEXT: bar59# CHECK-NEXT: wasm-basic.s:1660