| Index: src/compiler/x87/code-generator-x87.cc
|
| diff --git a/src/compiler/x87/code-generator-x87.cc b/src/compiler/x87/code-generator-x87.cc
|
| index c68d848f74ee1312d7d0e881bd3afa12500fb947..59832b43ff24cc94a821500292f8718b6db39196 100644
|
| --- a/src/compiler/x87/code-generator-x87.cc
|
| +++ b/src/compiler/x87/code-generator-x87.cc
|
| @@ -834,6 +834,23 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| __ lea(esp, Operand(esp, kFloatSize));
|
| break;
|
| }
|
| + case kX87Float32Round: {
|
| + RoundingMode mode =
|
| + static_cast<RoundingMode>(MiscField::decode(instr->opcode()));
|
| + // Set the correct round mode in x87 control register
|
| + __ X87SetRC((mode << 10));
|
| +
|
| + if (!instr->InputAt(0)->IsDoubleRegister()) {
|
| + InstructionOperand* input = instr->InputAt(0);
|
| + USE(input);
|
| + DCHECK(input->IsDoubleStackSlot());
|
| + __ fstp(0);
|
| + __ fld_s(i.InputOperand(0));
|
| + }
|
| + __ frndint();
|
| + __ X87SetRC(0x0000);
|
| + break;
|
| + }
|
| case kX87Float64Add: {
|
| __ X87SetFPUCW(0x027F);
|
| __ fstp(0);
|
|
|