Commit 8732b2ee authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

ppc: rename StoreF32/F64/WithUpdate

Change-Id: Ife5883cf5108dfc25603a57df0044d096b6c5855
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949105
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75053}
parent 00729680
......@@ -2831,8 +2831,8 @@ void TurboAssembler::LoadSimd128(Simd128Register dst, const MemOperand& mem) {
lxvx(dst, mem);
}
void TurboAssembler::StoreDouble(DoubleRegister src, const MemOperand& mem,
Register scratch) {
void TurboAssembler::StoreF64(DoubleRegister src, const MemOperand& mem,
Register scratch) {
Register base = mem.ra();
int offset = mem.offset();
......@@ -2844,8 +2844,9 @@ void TurboAssembler::StoreDouble(DoubleRegister src, const MemOperand& mem,
}
}
void TurboAssembler::StoreDoubleU(DoubleRegister src, const MemOperand& mem,
Register scratch) {
void TurboAssembler::StoreF64WithUpdate(DoubleRegister src,
const MemOperand& mem,
Register scratch) {
Register base = mem.ra();
int offset = mem.offset();
......@@ -2857,8 +2858,8 @@ void TurboAssembler::StoreDoubleU(DoubleRegister src, const MemOperand& mem,
}
}
void TurboAssembler::StoreSingle(DoubleRegister src, const MemOperand& mem,
Register scratch) {
void TurboAssembler::StoreF32(DoubleRegister src, const MemOperand& mem,
Register scratch) {
Register base = mem.ra();
int offset = mem.offset();
......@@ -2870,8 +2871,9 @@ void TurboAssembler::StoreSingle(DoubleRegister src, const MemOperand& mem,
}
}
void TurboAssembler::StoreSingleU(DoubleRegister src, const MemOperand& mem,
Register scratch) {
void TurboAssembler::StoreF32WithUpdate(DoubleRegister src,
const MemOperand& mem,
Register scratch) {
Register base = mem.ra();
int offset = mem.offset();
......@@ -2974,7 +2976,7 @@ void TurboAssembler::SwapFloat32(DoubleRegister src, MemOperand dst,
DCHECK(!AreAliased(src, scratch));
fmr(scratch, src);
LoadF32(src, dst, r0);
StoreSingle(scratch, dst, r0);
StoreF32(scratch, dst, r0);
}
void TurboAssembler::SwapFloat32(MemOperand src, MemOperand dst,
......@@ -2983,8 +2985,8 @@ void TurboAssembler::SwapFloat32(MemOperand src, MemOperand dst,
DCHECK(!AreAliased(scratch_0, scratch_1));
LoadF32(scratch_0, src, r0);
LoadF32(scratch_1, dst, r0);
StoreSingle(scratch_0, dst, r0);
StoreSingle(scratch_1, src, r0);
StoreF32(scratch_0, dst, r0);
StoreF32(scratch_1, src, r0);
}
void TurboAssembler::SwapDouble(DoubleRegister src, DoubleRegister dst,
......@@ -3001,7 +3003,7 @@ void TurboAssembler::SwapDouble(DoubleRegister src, MemOperand dst,
DCHECK(!AreAliased(src, scratch));
fmr(scratch, src);
LoadF64(src, dst, r0);
StoreDouble(scratch, dst, r0);
StoreF64(scratch, dst, r0);
}
void TurboAssembler::SwapDouble(MemOperand src, MemOperand dst,
......@@ -3010,8 +3012,8 @@ void TurboAssembler::SwapDouble(MemOperand src, MemOperand dst,
DCHECK(!AreAliased(scratch_0, scratch_1));
LoadF64(scratch_0, src, r0);
LoadF64(scratch_1, dst, r0);
StoreDouble(scratch_0, dst, r0);
StoreDouble(scratch_1, src, r0);
StoreF64(scratch_0, dst, r0);
StoreF64(scratch_1, src, r0);
}
void TurboAssembler::SwapSimd128(Simd128Register src, Simd128Register dst,
......
......@@ -155,15 +155,15 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void LoadPC(Register dst);
void ComputeCodeStartAddress(Register dst);
void StoreDouble(DoubleRegister src, const MemOperand& mem,
Register scratch = no_reg);
void StoreDoubleU(DoubleRegister src, const MemOperand& mem,
Register scratch = no_reg);
void StoreSingle(DoubleRegister src, const MemOperand& mem,
Register scratch = no_reg);
void StoreSingleU(DoubleRegister src, const MemOperand& mem,
Register scratch = no_reg);
void StoreF64(DoubleRegister src, const MemOperand& mem,
Register scratch = no_reg);
void StoreF64WithUpdate(DoubleRegister src, const MemOperand& mem,
Register scratch = no_reg);
void StoreF32(DoubleRegister src, const MemOperand& mem,
Register scratch = no_reg);
void StoreF32WithUpdate(DoubleRegister src, const MemOperand& mem,
Register scratch = no_reg);
void StoreSimd128(Simd128Register src, const MemOperand& mem);
void Cmpi(Register src1, const Operand& src2, Register scratch,
......
......@@ -1761,12 +1761,12 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
__ AllocateStackSpace((slots - pushed_slots) * kSystemPointerSize);
switch (rep) {
case MachineRepresentation::kFloat32:
__ StoreSingleU(i.InputDoubleRegister(1),
MemOperand(sp, -kSystemPointerSize), r0);
__ StoreF32WithUpdate(i.InputDoubleRegister(1),
MemOperand(sp, -kSystemPointerSize), r0);
break;
case MachineRepresentation::kFloat64:
__ StoreDoubleU(i.InputDoubleRegister(1),
MemOperand(sp, -kDoubleSize), r0);
__ StoreF64WithUpdate(i.InputDoubleRegister(1),
MemOperand(sp, -kDoubleSize), r0);
break;
case MachineRepresentation::kSimd128:
__ addi(sp, sp, Operand(-kSimd128Size));
......@@ -1786,12 +1786,14 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
if (instr->InputAt(0)->IsFPRegister()) {
LocationOperand* op = LocationOperand::cast(instr->InputAt(0));
if (op->representation() == MachineRepresentation::kFloat64) {
__ StoreDoubleU(i.InputDoubleRegister(0),
MemOperand(sp, -num_slots * kSystemPointerSize), r0);
__ StoreF64WithUpdate(i.InputDoubleRegister(0),
MemOperand(sp, -num_slots * kSystemPointerSize),
r0);
} else {
DCHECK_EQ(MachineRepresentation::kFloat32, op->representation());
__ StoreSingleU(i.InputDoubleRegister(0),
MemOperand(sp, -num_slots * kSystemPointerSize), r0);
__ StoreF32WithUpdate(i.InputDoubleRegister(0),
MemOperand(sp, -num_slots * kSystemPointerSize),
r0);
}
} else {
__ StoreU64WithUpdate(i.InputRegister(0),
......@@ -1805,11 +1807,11 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
if (instr->InputAt(0)->IsFPRegister()) {
LocationOperand* op = LocationOperand::cast(instr->InputAt(0));
if (op->representation() == MachineRepresentation::kFloat64) {
__ StoreDouble(i.InputDoubleRegister(0),
MemOperand(sp, slot * kSystemPointerSize), r0);
__ StoreF64(i.InputDoubleRegister(0),
MemOperand(sp, slot * kSystemPointerSize), r0);
} else if (op->representation() == MachineRepresentation::kFloat32) {
__ StoreSingle(i.InputDoubleRegister(0),
MemOperand(sp, slot * kSystemPointerSize), r0);
__ StoreF32(i.InputDoubleRegister(0),
MemOperand(sp, slot * kSystemPointerSize), r0);
} else {
DCHECK_EQ(MachineRepresentation::kSimd128, op->representation());
__ mov(ip, Operand(slot * kSystemPointerSize));
......@@ -4413,9 +4415,9 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
#endif
__ LoadDoubleLiteral(dst, value, kScratchReg);
if (destination->IsDoubleStackSlot()) {
__ StoreDouble(dst, g.ToMemOperand(destination), r0);
__ StoreF64(dst, g.ToMemOperand(destination), r0);
} else if (destination->IsFloatStackSlot()) {
__ StoreSingle(dst, g.ToMemOperand(destination), r0);
__ StoreF32(dst, g.ToMemOperand(destination), r0);
}
}
} else if (source->IsFPRegister()) {
......@@ -4439,9 +4441,9 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
DCHECK(destination->IsFPStackSlot());
LocationOperand* op = LocationOperand::cast(source);
if (op->representation() == MachineRepresentation::kFloat64) {
__ StoreDouble(src, g.ToMemOperand(destination), r0);
__ StoreF64(src, g.ToMemOperand(destination), r0);
} else {
__ StoreSingle(src, g.ToMemOperand(destination), r0);
__ StoreF32(src, g.ToMemOperand(destination), r0);
}
}
}
......@@ -4466,10 +4468,10 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
DoubleRegister temp = kScratchDoubleReg;
if (op->representation() == MachineRepresentation::kFloat64) {
__ LoadF64(temp, src, r0);
__ StoreDouble(temp, g.ToMemOperand(destination), r0);
__ StoreF64(temp, g.ToMemOperand(destination), r0);
} else if (op->representation() == MachineRepresentation::kFloat32) {
__ LoadF32(temp, src, r0);
__ StoreSingle(temp, g.ToMemOperand(destination), r0);
__ StoreF32(temp, g.ToMemOperand(destination), r0);
} else {
DCHECK_EQ(MachineRepresentation::kSimd128, op->representation());
// push v0, to be used as scratch
......
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