Closed Bug 1709877 Opened 4 years ago Closed 4 years ago

--disable-wasm-simd config option is broken

Categories

(Core :: JavaScript: WebAssembly, defect)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: yury, Assigned: yury)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When --disable-wasm-simd is used:

On ARM64, the JS code fails to compile:

...
1:49.94 /Users/yury/Work/mozilla-unified/js/src/jit/arm64/Lowering-arm64.cpp:940:16: error: use of undeclared identifier 'tempSimd128'
 1:49.94     tempReg1 = tempSimd128();
 1:49.94                ^
 1:50.00 /Users/yury/Work/mozilla-unified/js/src/jit/arm64/Lowering-arm64.cpp:992:15: error: no member named 'ReportSimdAnalysis' in namespace 'js::wasm'
 1:50.00     js::wasm::ReportSimdAnalysis("shift -> constant shift");
 1:50.00     ~~~~~~~~~~^
 1:50.06 /Users/yury/Work/mozilla-unified/js/src/jit/arm64/Lowering-arm64.cpp:1001:13: error: no member named 'ReportSimdAnalysis' in namespace 'js::wasm'
 1:50.06   js::wasm::ReportSimdAnalysis("shift -> variable shift");
 1:50.06   ~~~~~~~~~~^
 1:50.12 /Users/yury/Work/mozilla-unified/js/src/jit/arm64/Lowering-arm64.cpp:1017:3: error: use of undeclared identifier 'Shuffle'; did you mean 'std::shuffle'?
 1:50.12   Shuffle s = AnalyzeShuffle(ins);
...

On x86/64, the JS code compiles but produces linker errors:

4:55.71 Undefined symbols for architecture x86_64:
 4:55.71   "__ZN2js3jit12LIRGenerator21visitWasmShiftSimd128EPNS0_17MWasmShiftSimd128E", referenced from:
 4:55.72       __ZN2js3jit12LIRGenerator24visitInstructionDispatchEPNS0_12MInstructionE in Unified_cpp_js_src_jit7.o
 4:55.78   "__ZN2js3jit12LIRGenerator21visitWasmUnarySimd128EPNS0_17MWasmUnarySimd128E", referenced from:
 4:55.79       __ZN2js3jit12LIRGenerator24visitInstructionDispatchEPNS0_12MInstructionE in Unified_cpp_js_src_jit7.o
 4:55.85   "__ZN2js3jit12LIRGenerator22visitWasmBinarySimd128EPNS0_18MWasmBinarySimd128E", referenced from:
 4:55.86       __ZN2js3jit12LIRGenerator24visitInstructionDispatchEPNS0_12MInstructionE in Unified_cpp_js_src_jit7.o
 4:55.93   "__ZN2js3jit12LIRGenerator22visitWasmReduceSimd128EPNS0_18MWasmReduceSimd128E", referenced from:
 4:55.94       __ZN2js3jit12LIRGenerator24visitInstructionDispatchEPNS0_12MInstructionE in Unified_cpp_js_src_jit7.o
 4:56.00   "__ZN2js3jit12LIRGenerator23visitWasmShuffleSimd128EPNS0_19MWasmShuffleSimd128E", referenced from:
...

The solution is to move/add #ifdef ENABLE_WASM_SIMD to every codegen function body that implements SIMD functionality.

Assignee: nobody → ydelendik
Status: NEW → ASSIGNED
Attachment #9220626 - Attachment description: WIP: Bug 1709877 - Fix --disable-wasm-simd config option. → Bug 1709877 - Fix --disable-wasm-simd config option. r?lth
Pushed by ydelendik@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bd7863277cc9 Fix --disable-wasm-simd config option. r=lth
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: