Closed Bug 1399516 Opened 7 years ago Closed 7 years ago

MIPS[64]: Enable 64-bit atomics

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: dragan.mladjenovic, Assigned: dragan.mladjenovic)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36

Steps to reproduce:

This patch was not submitted in 1146817. Attaching it here with additional relaxation of 64-bit racy loads as per discussion in 1146817. Fixes mips32 and mips64 hardware builds.
Attached patch bug1399516.patchSplinter Review
Attachment #8907647 - Flags: review?(lhansen)
Comment on attachment 8907647 [details] [diff] [review]
bug1399516.patch

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

::: js/src/jit/mips-shared/AtomicOperations-mips-shared.h
@@ +124,5 @@
>  inline T
>  js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
>  {
> +    static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
> +    if (__atomic_always_lock_free(sizeof(T), 0)) {

The semantics of loadSafeWhenRacy and storeSafeWhenRacy have changed.  You should be able to use raw memory references in all cases for both of them on both 32-bit and 64-bit; see changes that landed very recently on ARM and x86.  What you have here will probably be nice and fast, but it's not necessary unless your C++ compiler does really strange things and splits 8-byte loads and stores into multiple operations even if it could use 8-byte loads and stores directly.
Attachment #8907647 - Flags: review?(lhansen) → review+
Keywords: checkin-needed
Assignee: nobody → dragan.mladjenovic
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d77baa08ebf
Enable 64-bit atomics on MIPS and minor code cleanup. r=lth
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9d77baa08ebf
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.