Commit 900bc793 authored by akos.palfi's avatar akos.palfi Committed by Commit bot

MIPS: Do not use the 64-bit floor and truncate instructions in fp32 mode.

These instructions have unpredictable result when the processor is in fp32 mode.

BUG=

TEST=mjsunit/math-floor-global,math-floor-local,math-floor-part1

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

Cr-Commit-Position: refs/heads/master@{#28194}
parent 72ab4217
......@@ -980,7 +980,8 @@ InstructionSelector::SupportedMachineOperatorFlags() {
MachineOperatorBuilder::Flags flags =
MachineOperatorBuilder::kFloat32Abs | MachineOperatorBuilder::kFloat64Abs;
if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) {
if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
IsFp64Mode()) {
flags |= MachineOperatorBuilder::kFloat64RoundDown |
MachineOperatorBuilder::kFloat64RoundTruncate;
}
......
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