Commit 0770fcba authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [turbofan] Implemented the optional Float32RoundTiesEven operator.

  port 57117b83 (r32308)

  original commit message:
  The Float32RoundTiesEven operator rounds float32 numbers towards the nearest
  integer. If the distance to two integers is the same, then the result is
  the even integer. This is the default rounding mode of the ieee 754 floating
  point standard.

  I implemented the optional Float32RoundTiesEven operator on x64, ia32, arm, and arm64.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#32595}
parent 69ea09dd
......@@ -890,7 +890,9 @@ void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) {
void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) {
UNREACHABLE();
X87OperandGenerator g(this);
Emit(kX87Float32Round | MiscField::encode(kRoundToNearest),
g.UseFixed(node, stX_0), g.Use(node->InputAt(0)));
}
......@@ -1323,6 +1325,7 @@ InstructionSelector::SupportedMachineOperatorFlags() {
MachineOperatorBuilder::kFloat64RoundUp |
MachineOperatorBuilder::kFloat32RoundTruncate |
MachineOperatorBuilder::kFloat64RoundTruncate |
MachineOperatorBuilder::kFloat32RoundTiesEven |
MachineOperatorBuilder::kFloat64RoundTiesEven;
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