Centralise save-area-size computation for the bailout-register-save-area
Categories
(Core :: JavaScript Engine: JIT, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: jseward, Assigned: jseward)
References
Details
Attachments
(1 file)
MacroAssembler
methods PushRegsInMask
, storeRegsInMask
, PopRegsInMask
and PopRegsInMaskIgnore
create code to save/restore arbitrary subsets of the
registers in memory. Unfortunately logic which computes the size of this area
is decoupled from those routines and is not documented as being dependent on
them. This also means the format must be the same for all targets, which
isn't optimal re alignment of SIMD registers.
This patch introduces a new method, MacroAssembler::PushRegsInMaskSizeInBytes
,
to calculate that size independently on a per-platform basis. Ad-hoc
computations of the size are replaced by a call to this. On arm64, the
routine is used in an assertion to crosscheck the actual used size in
PushRegsInMask
, storeRegsInMask
and PopRegsInMaskIgnore
.
Blocks bug 1678097 / D100116 - Add vector registers on ARM64.
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
MacroAssembler methods PushRegsInMask, storeRegsInMask, PopRegsInMask and
PopRegsInMaskIgnore create code to save/restore arbitrary subsets of the
registers in memory. Unfortunately logic which computes the size of this area
is decoupled from those routines and is not documented as being dependent on
them. This also means the format must be the same for all targets, which may
not be optimal in future when we come to save/restore SIMD registers on more
targets.
This patch introduces a new method, MacroAssembler::PushRegsInMaskSizeInBytes,
to calculate that size independently on a per-platform basis. Ad-hoc
computations of the size are replaced by a call to this method. On
x86_{32,64} and arm{32,64}, the method is used in assertions to crosscheck
the actual used size in PushRegsInMask, storeRegsInMask and
PopRegsInMaskIgnore.
The inferred invariants have been recorded in comments. There is no change to
the generated code.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
bugherder |
Description
•