PPC: [liftoff] Change FillStackSlotsWithZero to use bytes
Missed out ppc in https://crrev.com/c/1947350 Bug: v8:9909 Change-Id: I1cdd02b75fda093d279ec9f4e8d99835a3e6c962 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1950223 Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#65323}
This commit is contained in:
parent
4972b2c84c
commit
376ff7e9b2
@ -146,36 +146,29 @@ void LiftoffAssembler::FillI64Half(Register, uint32_t offset, RegPairHalf) {
|
||||
bailout(kUnsupportedArchitecture, "FillI64Half");
|
||||
}
|
||||
|
||||
void LiftoffAssembler::FillStackSlotsWithZero(uint32_t index, uint32_t count) {
|
||||
DCHECK_LT(0, count);
|
||||
uint32_t last_stack_slot = index + count - 1;
|
||||
RecordUsedSpillOffset(last_stack_slot);
|
||||
void LiftoffAssembler::FillStackSlotsWithZero(uint32_t start, uint32_t size) {
|
||||
DCHECK_LT(0, size);
|
||||
DCHECK_EQ(0, size % 4);
|
||||
RecordUsedSpillOffset(start + size);
|
||||
|
||||
// We need a zero reg. Always use r0 for that, and push it before to restore
|
||||
// its value afterwards.
|
||||
push(r0);
|
||||
mov(r0, Operand(0));
|
||||
|
||||
if (count <= 5) {
|
||||
// Special straight-line code for up to five slots. Generates two
|
||||
// instructions per slot.
|
||||
for (uint32_t offset = 0; offset < count; ++offset) {
|
||||
StoreP(r0, liftoff::GetHalfStackSlot(
|
||||
GetStackOffsetFromIndex(index + offset), kLowWord));
|
||||
StoreP(r0, liftoff::GetHalfStackSlot(
|
||||
GetStackOffsetFromIndex(index + offset), kHighWord));
|
||||
if (size <= 36) {
|
||||
// Special straight-line code for up to nine words. Generates one
|
||||
// instruction per word.
|
||||
for (uint32_t offset = 4; offset <= size; offset += 4) {
|
||||
StoreP(r0, liftoff::GetHalfStackSlot(start + offset, kLowWord));
|
||||
}
|
||||
} else {
|
||||
// General case for bigger counts (9 instructions).
|
||||
// Use r4 for start address (inclusive), r5 for end address (exclusive).
|
||||
push(r4);
|
||||
push(r5);
|
||||
subi(r4, fp,
|
||||
Operand(liftoff::GetStackSlotOffset(
|
||||
GetStackOffsetFromIndex(last_stack_slot))));
|
||||
subi(r5, fp,
|
||||
Operand(liftoff::GetStackSlotOffset(GetStackOffsetFromIndex(index)) -
|
||||
kStackSlotSize));
|
||||
subi(r4, fp, Operand(liftoff::GetStackSlotOffset(start + size)));
|
||||
subi(r5, fp, Operand(liftoff::GetStackSlotOffset(start)));
|
||||
|
||||
Label loop;
|
||||
bind(&loop);
|
||||
|
Loading…
Reference in New Issue
Block a user