mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
40dabb3533
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 |
||
---|---|---|
.. | ||
ductwork/debugger | ||
examples | ||
public | ||
src | ||
xpconnect | ||
app.mozbuild | ||
ffi.configure | ||
moz.build | ||
moz.configure | ||
sub.configure |