Closed Bug 1524178 Opened 5 years ago Closed 5 years ago

feeling-lucky atomics fallbacks should consider simulators specially so as to handle wasm

Categories

(Core :: JavaScript Engine: JIT, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

Our ARM and ARM64 simulators do not get native jitted atomics, but instead use the fallback feeling-lucky quasi-UB C++ code. (Buy me beer and I'll tell you why, but basically this comes down to the difficulty of defining JS_CODEGEN_X86 and JS_CODEGEN_ARM in the same build.)

But this means the simulators do not properly support wasm. Wasm requires lockfree8 but the feeling-lucky path only has that if opted into. However, the feeling-lucky code opts into that for neither simulator. For the ARM64 simulator it's easy; for the ARM32 simulator a little more annoying because we may require -latomic for the 64-bit primitives on x86.

Julian, see how this works out for you.

Attachment #9040335 - Flags: feedback?(jseward)
Attachment #9040335 - Flags: feedback?(jseward) → review?(jseward)
Comment on attachment 9040335 [details] [diff] [review]
bug1524178-lockfree8-for-simulators.patch

Review of attachment 9040335 [details] [diff] [review]:
-----------------------------------------------------------------

This looks OK with local testing and also on try.  Thanks for the quick fix.
Attachment #9040335 - Flags: review?(jseward) → review+
Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c474d2c881f5
Enable lock-free 8-byte atomics for ARM+ARM64 simulators. r=jseward
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: