Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PSA: Now jitting some atomic operations used by C++

17 views
Skip to first unread message

Lars Hansen

unread,
Jan 21, 2019, 2:56:00 AM1/21/19
to dev-tech-...@lists.mozilla.org
I just landed https://bugzilla.mozilla.org/show_bug.cgi?id=1394420; see
that bug + long commit msgs on the patches for more information.

The work has some observable consequences for teams porting to tier-3
platforms:

- if your platform does not have a JIT you probably won't notice much
except if you have local patches; code in jit/AtomicOperations* and
jit/*/AtomicOperations* has moved around and you'll need to adapt.

- if your platform makes use of a JIT for a tier-1 platform but is not
itself tier-1 (hello tier-3 x86/ARM/ARM64 Linux rebuilds), SpiderMonkey
will now call jit-generated atomics from C++, rather than the
unsafe/undefined C++ atomics placeholders. In particular, it should no
longer be necessary for you to link with -latomic on x86 Linux.

- if your platform has a JIT for a tier-3 platform (hello MIPS) you are
currently stuck with your private unsafe/undefined C++ atomics
placeholders, which I hope I did not break. However you may now be able to
move from your private C++ definitions to the jitted definitions by
rewriting some code; start at the end of jit/AtomicOperations.h and look at
similar code for ARM/ARM64. There's a little platform-specific code in
jit/shared/AtomicsOperations-shared-jit.cpp that has to be adapted. Reach
out to me if you run into trouble. Patches welcome. etc.

--lars
0 new messages