Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

136 lines
5.5 KiB
ArmAsm

# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
#
# Should fail without mutable globals feature enabled.
# RUN: not wasm-ld --export-all %t.o -o %t.wasm 2>&1 | FileCheck -check-prefix=CHECK-ERR %s
# RUN: not wasm-ld --export=foo_global %t.o -o %t.wasm 2>&1 | FileCheck -check-prefix=CHECK-ERR %s
# RUN: wasm-ld --extra-features=mutable-globals --export=foo_global %t.o -o %t.wasm
# RUN: obj2yaml %t.wasm | FileCheck %s
# Explcitly check that __stack_pointer can be exported
# RUN: wasm-ld --extra-features=mutable-globals --export=__stack_pointer %t.o -o %t.wasm
# RUN: obj2yaml %t.wasm | FileCheck -check-prefix=CHECK-SP %s
# RUN: wasm-ld --extra-features=mutable-globals --export-all %t.o -o %t.wasm
# RUN: obj2yaml %t.wasm | FileCheck -check-prefix=CHECK-ALL %s
.globl _start
.globl foo_global
.globl bar_global
.globaltype bar_global, i32, immutable
bar_global:
.globaltype foo_global, i32
foo_global:
_start:
.functype _start () -> ()
end_function
# Add a target feature and ensure that it is preserved when --extra-features is
# used above.
.section .custom_section.target_features,"",@
.int8 1
.int8 43
.int8 7
.ascii "atomics"
# CHECK-ERR: mutable global exported but 'mutable-globals' feature not present in inputs: `foo_global`. Use --no-check-features to suppress
# CHECK-ERR-NOT: bar_global
# CHECK: - Type: EXPORT
# CHECK-NEXT: Exports:
# CHECK-NEXT: - Name: memory
# CHECK-NEXT: Kind: MEMORY
# CHECK-NEXT: Index: 0
# CHECK-NEXT: - Name: _start
# CHECK-NEXT: Kind: FUNCTION
# CHECK-NEXT: Index: 0
# CHECK-NEXT: - Name: foo_global
# CHECK-NEXT: Kind: GLOBAL
# CHECK-NEXT: Index: 0
# CHECK-NEXT: - Type: CODE
# CHECK-SP: - Type: EXPORT
# CHECK-SP-NEXT: Exports:
# CHECK-SP-NEXT: - Name: memory
# CHECK-SP-NEXT: Kind: MEMORY
# CHECK-SP-NEXT: Index: 0
# CHECK-SP-NEXT: - Name: __stack_pointer
# CHECK-SP-NEXT: Kind: GLOBAL
# CHECK-SP-NEXT: Index: 0
# CHECK-SP-NEXT: - Name: _start
# CHECK-SP-NEXT: Kind: FUNCTION
# CHECK-SP-NEXT: Index: 0
# CHECK-SP-NEXT: - Type: CODE
# CHECK-ALL: - Type: EXPORT
# CHECK-ALL-NEXT: Exports:
# CHECK-ALL-NEXT: - Name: memory
# CHECK-ALL-NEXT: Kind: MEMORY
# CHECK-ALL-NEXT: Index: 0
# CHECK-ALL-NEXT: - Name: __wasm_call_ctors
# CHECK-ALL-NEXT: Kind: FUNCTION
# CHECK-ALL-NEXT: Index: 0
# CHECK-ALL-NEXT: - Name: __stack_pointer
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 0
# CHECK-ALL-NEXT: - Name: _start
# CHECK-ALL-NEXT: Kind: FUNCTION
# CHECK-ALL-NEXT: Index: 1
# CHECK-ALL-NEXT: - Name: foo_global
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 4
# CHECK-ALL-NEXT: - Name: bar_global
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 5
# CHECK-ALL-NEXT: - Name: __dso_handle
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 6
# CHECK-ALL-NEXT: - Name: __data_end
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 7
# CHECK-ALL-NEXT: - Name: __rodata_start
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 8
# CHECK-ALL-NEXT: - Name: __rodata_end
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 9
# CHECK-ALL-NEXT: - Name: __stack_low
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 10
# CHECK-ALL-NEXT: - Name: __stack_high
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 11
# CHECK-ALL-NEXT: - Name: __global_base
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 12
# CHECK-ALL-NEXT: - Name: __heap_base
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 13
# CHECK-ALL-NEXT: - Name: __heap_end
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 14
# CHECK-ALL-NEXT: - Name: __memory_base
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 1
# CHECK-ALL-NEXT: - Name: __table_base
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 2
# CHECK-ALL-NEXT: - Name: __wasm_first_page_end
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 15
# CHECK-ALL-NEXT: - Name: __tls_base
# CHECK-ALL-NEXT: Kind: GLOBAL
# CHECK-ALL-NEXT: Index: 3
# CHECK-ALL-NEXT: - Type: CODE
# CHECK-ALL: Name: target_features
# CHECK-ALL-NEXT: Features:
# CHECK-ALL-NEXT: - Prefix: USED
# CHECK-ALL-NEXT: Name: atomics
# CHECK-ALL-NEXT: - Prefix: USED
# CHECK-ALL-NEXT: Name: mutable-globals
# CHECK-ALL-NEXT: ...