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

X87: [turbofan] Implemented the optional Float32RoundTruncate operator.

  port 19741ac9 (r32301)

  original commit message:
  The Float32RoundTruncate operator rounds float32 numbers towards zero.
  The operator is currently implemented on x64, ia32, arm, and arm64.

  Additionally I added support for the float32 vrintz, vrintn, and vrinta
  instructions to the arm simulator.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#32537}
parent bc7d63cc
...@@ -871,7 +871,9 @@ void InstructionSelector::VisitFloat64RoundUp(Node* node) { ...@@ -871,7 +871,9 @@ void InstructionSelector::VisitFloat64RoundUp(Node* node) {
void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { void InstructionSelector::VisitFloat32RoundTruncate(Node* node) {
UNREACHABLE(); X87OperandGenerator g(this);
Emit(kX87Float32Round | MiscField::encode(kRoundToZero),
g.UseFixed(node, stX_0), g.Use(node->InputAt(0)));
} }
...@@ -1319,6 +1321,7 @@ InstructionSelector::SupportedMachineOperatorFlags() { ...@@ -1319,6 +1321,7 @@ InstructionSelector::SupportedMachineOperatorFlags() {
MachineOperatorBuilder::kFloat64RoundDown | MachineOperatorBuilder::kFloat64RoundDown |
MachineOperatorBuilder::kFloat32RoundUp | MachineOperatorBuilder::kFloat32RoundUp |
MachineOperatorBuilder::kFloat64RoundUp | MachineOperatorBuilder::kFloat64RoundUp |
MachineOperatorBuilder::kFloat32RoundTruncate |
MachineOperatorBuilder::kFloat64RoundTruncate | MachineOperatorBuilder::kFloat64RoundTruncate |
MachineOperatorBuilder::kFloat64RoundTiesEven; MachineOperatorBuilder::kFloat64RoundTiesEven;
return flags; 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