Closed Bug 1208663 Opened 4 years ago Closed 4 years ago

Implement the SafeWhenRacy operations (x86, x64, ARM, ARM64, MIPS32, MIPS64)

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: lth, Assigned: lth)

References

(Blocks 1 open bug)

Details

See bug 1084248: call-outs from C++ to opaque, platform-specific functions must be implemented in the jit/ARCH/AtomicOperations-ARCH.h files.
And arm64.

I wonder if the #ifdefs in jit/AtomicOperations-inl.h are correct? The switch on the JS_CODEGEN_* macros to select functions for the current host architecture.

In simulator builds, like --enable-simulator=arm, the JS_CODEGEN_ARM macro will be set on an x86 host.
See Also: → 1210456
(In reply to Jakob Stoklund Olesen [:jolesen] from comment #1)
> And arm64.
> 
> I wonder if the #ifdefs in jit/AtomicOperations-inl.h are correct? The
> switch on the JS_CODEGEN_* macros to select functions for the current host
> architecture.
> 
> In simulator builds, like --enable-simulator=arm, the JS_CODEGEN_ARM macro
> will be set on an x86 host.

That's pretty much as intended: To the extent we're simulating the atomics at all, fundamentally actual mutual exclusion comes down to the hardware you're running on.  It's generally recognized (on ARM anyway) that the atomic operations will not work properly, or will work with low fidelity, in the simulator, but the callouts to C++ will work.  Maybe the ARM64 simulator is more interesting in this regard?

Presumably there's a moral here about disabling certain tests during simulator runs, but it hasn't been a problem so far, probably an indication of insufficient tests being available for the atomics.  I have a bunch of tests I run manually though.
Let this be the meta-bug for the platform implementations, which are all going to be different.
Summary: Implement the SafeWhenRacy operations (x86, x64, ARM) → Implement the SafeWhenRacy operations (x86, x64, ARM, ARM64, MIPS32, MIPS64)
These files have all landed.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.