brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 3b51165 Raw
93 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s2 3.globaltype __tls_base, i324.globaltype __tls_align, i32, immutable5 6.globl tls1_addr7tls1_addr:8  .functype tls1_addr () -> (i32)9  global.get __tls_base10  i32.const tls111  i32.add12  end_function13 14.globl tls2_addr15tls2_addr:16  .functype tls2_addr () -> (i32)17  global.get __tls_base18  i32.const tls219  i32.add20  end_function21 22.globl tls_align23tls_align:24  .functype tls_align () -> (i32)25  global.get __tls_align26  end_function27 28.section  .bss.no_tls,"",@29.globl  no_tls30.p2align  231no_tls:32  .int32  033  .size no_tls, 434 35.section  .tdata.tls1,"",@36.globl  tls137.p2align  238tls1:39  .int32  140  .size tls1, 441 42.section  .tdata.tls2,"",@43.globl  tls244.p2align  445tls2:46  .int32  147  .size tls2, 448 49.section  .custom_section.target_features,"",@50  .int8 251  .int8 4352  .int8 753  .ascii  "atomics"54  .int8 4355  .int8 1156  .ascii  "bulk-memory"57 58# RUN: wasm-ld -no-gc-sections --shared-memory --max-memory=131072 --no-entry -o %t.wasm %t.o59# RUN: obj2yaml %t.wasm | FileCheck %s60 61# CHECK:      - Type:            GLOBAL62# CHECK-NEXT:   Globals:63# CHECK-NEXT:     - Index:           064# CHECK-NEXT:       Type:            I3265# CHECK-NEXT:       Mutable:         true66# CHECK-NEXT:       InitExpr:67# CHECK-NEXT:         Opcode:          I32_CONST68# CHECK-NEXT:         Value:           6553669 70# __tls_base71# CHECK-NEXT:     - Index:           172# CHECK-NEXT:       Type:            I3273# CHECK-NEXT:       Mutable:         true74# CHECK-NEXT:       InitExpr:75# CHECK-NEXT:         Opcode:          I32_CONST76# CHECK-NEXT:         Value:           077 78# __tls_size79# CHECK-NEXT:     - Index:           280# CHECK-NEXT:       Type:            I3281# CHECK-NEXT:       Mutable:         false82# CHECK-NEXT:       InitExpr:83# CHECK-NEXT:         Opcode:          I32_CONST84# CHECK-NEXT:         Value:           2085 86# __tls_align87# CHECK-NEXT:     - Index:           388# CHECK-NEXT:       Type:            I3289# CHECK-NEXT:       Mutable:         false90# CHECK-NEXT:       InitExpr:91# CHECK-NEXT:         Opcode:          I32_CONST92# CHECK-NEXT:         Value:           1693