Commit da566d89 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [TurboFan] enable the Float64RoundDown and Float64RoundTruncate operators in x87.

  X87 port already implemented Float64RoundDown and Float64RoundTruncate operators, not enabled yet.
  This CL would enable them.

BUG=

Review URL: https://codereview.chromium.org/1486483003

Cr-Commit-Position: refs/heads/master@{#32442}
parent a8b2d9a1
......@@ -1091,11 +1091,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
case kX87Float64Round: {
RoundingMode mode =
static_cast<RoundingMode>(MiscField::decode(instr->opcode()));
if (mode == MiscField::encode(kRoundDown)) {
__ X87SetRC(0x0400);
} else {
__ X87SetRC(0x0c00);
}
// Set the correct round mode in x87 control register
__ X87SetRC((mode << 10));
if (!instr->InputAt(0)->IsDoubleRegister()) {
InstructionOperand* input = instr->InputAt(0);
......
......@@ -1300,6 +1300,9 @@ InstructionSelector::SupportedMachineOperatorFlags() {
if (CpuFeatures::IsSupported(POPCNT)) {
flags |= MachineOperatorBuilder::kWord32Popcnt;
}
flags |= MachineOperatorBuilder::kFloat64RoundDown |
MachineOperatorBuilder::kFloat64RoundTruncate;
return flags;
}
......
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