This change add supprot for defined wasm globas in the .s format
and in the MC layer.
Currently there is no support custom initialization and all wasm
globals are initialized to zero.
Fixes: PR45742
Paths
| Differential D79137
[WebAssmebly] Add support for defined wasm globals in MC and lld ClosedPublic Authored by sbc100 on Apr 29 2020, 3:41 PM.
Details Summary This change add supprot for defined wasm globas in the .s format Currently there is no support custom initialization and all wasm Fixes: PR45742
Diff Detail
Event Timelinesbc100 retitled this revision from [WebAssmebly] Add support for defined wasm in MC and lld to [WebAssmebly] Add support for defined wasm globals in MC and lld.Apr 29 2020, 3:42 PM
sbc100 added inline comments.
aardappel added inline comments. This revision is now accepted and ready to land.Apr 30 2020, 12:00 PM sbc100 added inline comments.
Closed by commit rG0a6c4d8d2ebc: [WebAssmebly] Add support for defined wasm globals in MC and lld (authored by sbc100). · Explain WhyApr 30 2020, 12:54 PM This revision was automatically updated to reflect the committed changes.
Comment Actions FAIL: LLVM :: ObjectYAML/wasm/global_section.yaml (28409 of 37227) ******************** TEST 'LLVM :: ObjectYAML/wasm/global_section.yaml' FAILED ******************** Script: -- : 'RUN: at line 1'; /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/yaml2obj /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ObjectYAML/wasm/global_section.yaml | /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/obj2yaml | /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ObjectYAML/wasm/global_section.yaml -- Exit Code: 2 Command Output (stderr): -- YAML:13:28: error: invalid number Value: -5 ^~ yaml2obj: error: failed to parse YAML input: Invalid argument Error reading file: <stdin>: The file was not recognized as a valid object file FileCheck error: '<stdin>' is empty. FileCheck command line: /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ObjectYAML/wasm/global_section.yaml -- ******************** Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. ******************** Failing Tests (1): LLVM :: ObjectYAML/wasm/global_section.yaml Testing Time: 192.29s
Revision Contents
Diff 261325 lld/test/wasm/globals.s
lld/wasm/WriterUtils.cpp
llvm/include/llvm/BinaryFormat/Wasm.h
llvm/lib/MC/WasmObjectWriter.cpp
llvm/test/MC/WebAssembly/globals.s
|
I presume there's a reason or precedent why this is not .global ?