gecko-dev/js
Julian Seward 40dabb3533 Bug 1678097 - Add vector registers on ARM64. r=lth,nbp.
In short, this patch adds support for vector registers on ARM64, including
machinery to save and restore them on the stack.  It also cleans up and
documents some of the save/restore logic.

There are many changes:

* We add a new type, Bitset128, that can represent the register set on ARM64
  with vector registers. This is a mostly-constexpr class with two uint64_t's
  that behaves like a 128-bit integer in the cases we need for register sets.

* Since the new type is 16 bytes wide, misc code throughout the system that
  switches on register set width is updated to handle the case.

* The FloatRegisters::SetType is changed to use Bitset128, and various
  constants defined in ARM64 FloatRegisters are updated to reflect this.  As
  the constants are constexpr, we can be reasonably sure that there are no
  initialization-order problems introduced by this.

* The registers in ARM64 FloatRegisters are rearranged so that single comes
  before double, which comes before vector registers, to conform to the order
  used everywhere else.

* In MacroAssembler.h, the semantics required of PushRegsInMask and its
  associated functions have been further documented.

* For ARM64, PushRegsInMask and its associated functions (PushRegsInMask,
  storeRegsInMask, PopRegsInMaskIgnore, ReduceSetForPush, GetPushSizeInBytes,
  getRegisterDumpOffsetInBytes, and new function
  FloatRegister::BroadcastToAllSizes), have been rewritten to handle
  saving/restoring of SIMD registers.  PushRegsInMask and storeRegsInMask have
  been merged into a single function so as to reduce code duplication and the
  associated danger of mistakenly writing different formats.

* In many places that are ARM64-specific, code guarded by `#ifndef
  ENABLE_WASM_SIMD` has been removed, so that in effect we always assume that
  SIMD register state is available on the target, and can be loaded and
  stored, even though we haven't yet enabled ARM64 SIMD support per se.

* The routines PushRegsInMaskForWasmStubs, PopRegsInMaskForWasmStubs and
  GetPushSizeInBytesForWasmStubs have been removed, since their operation has
  now been subsumed into their non-`ForWasmStubs` equivalents.

* In Safepoints.cpp, {Write,Read}FloatRegisterMask have been rewritten to
  support 128-bit sets.  One side effect is that reads/writes of 64-bit chunks
  have been changed to use new routines {write,read}Unsigned64 rather than two
  uses of {write,read}Unsigned.  The effect is to save one byte when
  bits 64:32 are all zero.

* Ridealong cleanup: the constant ION_FRAME_SLACK_SIZE has been removed.  It
  has no known uses.

* Note that RABALDR_SIDEALLOC_V128 is still in place in the wasm baseline
  compiler.  This patch does not remove it.

Differential Revision: https://phabricator.services.mozilla.com/D100116
2021-05-05 05:45:35 +00:00
..
ductwork/debugger
examples
public Bug 1704185 - Rename JS::GetRealmWeakMapKey to JS::GetRealmKeyObject. r=peterv 2021-05-04 23:48:26 +00:00
src Bug 1678097 - Add vector registers on ARM64. r=lth,nbp. 2021-05-05 05:45:35 +00:00
xpconnect Bug 1704185 - Rename JS::GetRealmWeakMapKey to JS::GetRealmKeyObject. r=peterv 2021-05-04 23:48:26 +00:00
app.mozbuild Bug 1679938 - Don't recurse the build into mfbt for projects that don't need it. r=firefox-build-system-reviewers,mhentges 2020-12-01 23:52:03 +00:00
ffi.configure
moz.build Bug 1708739 - Move WeakMap APIs to new public header r=yulia 2021-05-01 12:10:14 +00:00
moz.configure Bug 1706124 - wasm: Implement the extended-const proposal. r=lth 2021-05-04 15:58:26 +00:00
sub.configure