Commit b9ded4ce authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS: Fix 'Turbofan: Modify WASM linkage to store floats using only 4 bytes.'

Port 817b59c8

Adds instructions for MIPS to push float (single) and double registers.

LOG=N
BUG=v8:4124
TEST=cctest/test-run-native-calls/Float32Select_stack_params_return_reg,
cctest/test-run-native-calls/MixedParams_0, cctest/test-run-native-calls/MixedParams_1,
cctest/test-run-native-calls/MixedParams_2, cctest/test-run-native-calls/MixedParams_3

Review-Url: https://codereview.chromium.org/2038813002
Cr-Commit-Position: refs/heads/master@{#36719}
parent 8d90210a
......@@ -1307,7 +1307,13 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
}
case kMipsStoreToStackSlot: {
if (instr->InputAt(0)->IsFPRegister()) {
__ sdc1(i.InputDoubleRegister(0), MemOperand(sp, i.InputInt32(1)));
LocationOperand* op = LocationOperand::cast(instr->InputAt(0));
if (op->representation() == MachineRepresentation::kFloat64) {
__ sdc1(i.InputDoubleRegister(0), MemOperand(sp, i.InputInt32(1)));
} else {
DCHECK_EQ(MachineRepresentation::kFloat32, op->representation());
__ swc1(i.InputSingleRegister(0), MemOperand(sp, i.InputInt32(1)));
}
} else {
__ sw(i.InputRegister(0), MemOperand(sp, i.InputInt32(1)));
}
......
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