Commit 18450061 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[liftoff] Fix zeroing the stack on arm64

Bug: v8:9909
Bug: chromium:1030912
Change-Id: I56134087156e4fe2598ef5a282cd57344a729a38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1950225
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65344}
parent d3821800
...@@ -418,13 +418,13 @@ void LiftoffAssembler::FillStackSlotsWithZero(uint32_t start, uint32_t size) { ...@@ -418,13 +418,13 @@ void LiftoffAssembler::FillStackSlotsWithZero(uint32_t start, uint32_t size) {
switch (remainder) { switch (remainder) {
case 12: case 12:
str(xzr, liftoff::GetStackSlot(start + remainder)); str(xzr, liftoff::GetStackSlot(start + remainder));
strh(xzr, liftoff::GetStackSlot(start + remainder - 8)); str(wzr, liftoff::GetStackSlot(start + remainder - 8));
break; break;
case 8: case 8:
str(xzr, liftoff::GetStackSlot(start + remainder)); str(xzr, liftoff::GetStackSlot(start + remainder));
break; break;
case 4: case 4:
strh(xzr, liftoff::GetStackSlot(start + remainder)); str(wzr, liftoff::GetStackSlot(start + remainder));
break; break;
case 0: case 0:
break; break;
...@@ -443,7 +443,7 @@ void LiftoffAssembler::FillStackSlotsWithZero(uint32_t start, uint32_t size) { ...@@ -443,7 +443,7 @@ void LiftoffAssembler::FillStackSlotsWithZero(uint32_t start, uint32_t size) {
Label loop; Label loop;
bind(&loop); bind(&loop);
sub(count_reg, count_reg, 1); sub(count_reg, count_reg, 1);
strh(xzr, MemOperand(address_reg, kSystemPointerSize, PostIndex)); str(wzr, MemOperand(address_reg, kSystemPointerSize / 2, PostIndex));
cbnz(count_reg, &loop); cbnz(count_reg, &loop);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment