MIPS[64]: Enable 64-bit atomics

RESOLVED FIXED in Firefox 57

Status

()

RESOLVED FIXED
a year ago
a year ago

People

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

Tracking

Trunk
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
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.
(Assignee)

Comment 1

a year ago
Created attachment 8907647 [details] [diff] [review]
bug1399516.patch
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+
(Assignee)

Updated

a year ago
Keywords: checkin-needed
Assignee: nobody → dragan.mladjenovic

Comment 3

a year ago
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

Comment 4

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/9d77baa08ebf
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.