diff --git a/src/wasm/baseline/arm64/liftoff-assembler-arm64.h b/src/wasm/baseline/arm64/liftoff-assembler-arm64.h index a079403a8d..8f2bf6a5f8 100644 --- a/src/wasm/baseline/arm64/liftoff-assembler-arm64.h +++ b/src/wasm/baseline/arm64/liftoff-assembler-arm64.h @@ -76,7 +76,7 @@ inline CPURegList PadRegList(RegList list) { inline CPURegList PadVRegList(RegList list) { if ((base::bits::CountPopulation(list) & 1) != 0) list |= fp_scratch.bit(); - return CPURegList(CPURegister::kVRegister, kDRegSizeInBits, list); + return CPURegList(CPURegister::kVRegister, kQRegSizeInBits, list); } inline CPURegister AcquireByType(UseScratchRegisterScope* temps, diff --git a/src/wasm/baseline/ia32/liftoff-assembler-ia32.h b/src/wasm/baseline/ia32/liftoff-assembler-ia32.h index a1b9700b81..a56de93b2b 100644 --- a/src/wasm/baseline/ia32/liftoff-assembler-ia32.h +++ b/src/wasm/baseline/ia32/liftoff-assembler-ia32.h @@ -1814,15 +1814,15 @@ void LiftoffAssembler::PushRegisters(LiftoffRegList regs) { LiftoffRegList fp_regs = regs & kFpCacheRegList; unsigned num_fp_regs = fp_regs.GetNumRegsSet(); if (num_fp_regs) { - AllocateStackSpace(num_fp_regs * kStackSlotSize); + AllocateStackSpace(num_fp_regs * kSimd128Size); unsigned offset = 0; while (!fp_regs.is_empty()) { LiftoffRegister reg = fp_regs.GetFirstRegSet(); - movsd(Operand(esp, offset), reg.fp()); + Movdqu(Operand(esp, offset), reg.fp()); fp_regs.clear(reg); - offset += sizeof(double); + offset += kSimd128Size; } - DCHECK_EQ(offset, num_fp_regs * sizeof(double)); + DCHECK_EQ(offset, num_fp_regs * kSimd128Size); } } @@ -1831,9 +1831,9 @@ void LiftoffAssembler::PopRegisters(LiftoffRegList regs) { unsigned fp_offset = 0; while (!fp_regs.is_empty()) { LiftoffRegister reg = fp_regs.GetFirstRegSet(); - movsd(reg.fp(), Operand(esp, fp_offset)); + Movdqu(reg.fp(), Operand(esp, fp_offset)); fp_regs.clear(reg); - fp_offset += sizeof(double); + fp_offset += kSimd128Size; } if (fp_offset) add(esp, Immediate(fp_offset)); LiftoffRegList gp_regs = regs & kGpCacheRegList; diff --git a/src/wasm/baseline/x64/liftoff-assembler-x64.h b/src/wasm/baseline/x64/liftoff-assembler-x64.h index f4c9e4df14..851f55d9fe 100644 --- a/src/wasm/baseline/x64/liftoff-assembler-x64.h +++ b/src/wasm/baseline/x64/liftoff-assembler-x64.h @@ -1556,15 +1556,15 @@ void LiftoffAssembler::PushRegisters(LiftoffRegList regs) { LiftoffRegList fp_regs = regs & kFpCacheRegList; unsigned num_fp_regs = fp_regs.GetNumRegsSet(); if (num_fp_regs) { - AllocateStackSpace(num_fp_regs * kStackSlotSize); + AllocateStackSpace(num_fp_regs * kSimd128Size); unsigned offset = 0; while (!fp_regs.is_empty()) { LiftoffRegister reg = fp_regs.GetFirstRegSet(); - Movsd(Operand(rsp, offset), reg.fp()); + Movdqu(Operand(rsp, offset), reg.fp()); fp_regs.clear(reg); - offset += sizeof(double); + offset += kSimd128Size; } - DCHECK_EQ(offset, num_fp_regs * sizeof(double)); + DCHECK_EQ(offset, num_fp_regs * kSimd128Size); } } @@ -1573,9 +1573,9 @@ void LiftoffAssembler::PopRegisters(LiftoffRegList regs) { unsigned fp_offset = 0; while (!fp_regs.is_empty()) { LiftoffRegister reg = fp_regs.GetFirstRegSet(); - Movsd(reg.fp(), Operand(rsp, fp_offset)); + Movdqu(reg.fp(), Operand(rsp, fp_offset)); fp_regs.clear(reg); - fp_offset += sizeof(double); + fp_offset += kSimd128Size; } if (fp_offset) addq(rsp, Immediate(fp_offset)); LiftoffRegList gp_regs = regs & kGpCacheRegList;