Commit f4063610 authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC: fix AssembleMove and Push in codegen

R=joransiu@ca.ibm.com, jbarboza@ca.ibm.com, michael_dawson@ca.ibm.com

Bug: 
Change-Id: I616ccaa956929a3816a9026bf54cabf6041590ec
Reviewed-on: https://chromium-review.googlesource.com/726182Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#48703}
parent 952540d2
......@@ -1725,13 +1725,16 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
if (op->representation() == MachineRepresentation::kFloat64) {
__ StoreDoubleU(i.InputDoubleRegister(0),
MemOperand(sp, -kDoubleSize), r0);
frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize);
} else {
DCHECK_EQ(MachineRepresentation::kFloat32, op->representation());
__ StoreSingleU(i.InputDoubleRegister(0),
MemOperand(sp, -kPointerSize), r0);
frame_access_state()->IncreaseSPDelta(1);
}
} else {
__ StorePU(i.InputRegister(0), MemOperand(sp, -kPointerSize), r0);
frame_access_state()->IncreaseSPDelta(1);
}
DCHECK_EQ(LeaveRC, i.OutputRCBit());
break;
......@@ -2538,8 +2541,10 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
: Double(src.ToFloat64());
#endif
__ LoadDoubleLiteral(dst, value, kScratchReg);
if (destination->IsFPStackSlot()) {
if (destination->IsDoubleStackSlot()) {
__ StoreDouble(dst, g.ToMemOperand(destination), r0);
} else if (destination->IsFloatStackSlot()) {
__ StoreSingle(dst, g.ToMemOperand(destination), r0);
}
}
} else if (source->IsFPRegister()) {
......
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