Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 049d3e64d5fadb1ef9f44b9db4e38362f4f9a4b8..1e85ada0b811e976206eea779ad8498f99fa55d9 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1203,14 +1203,24 @@ OStream& HCompareMap::PrintDataTo(OStream& os) const { // NOLINT |
const char* HUnaryMathOperation::OpName() const { |
switch (op()) { |
- case kMathFloor: return "floor"; |
- case kMathRound: return "round"; |
- case kMathAbs: return "abs"; |
- case kMathLog: return "log"; |
- case kMathExp: return "exp"; |
- case kMathSqrt: return "sqrt"; |
- case kMathPowHalf: return "pow-half"; |
- case kMathClz32: return "clz32"; |
+ case kMathFloor: |
+ return "floor"; |
+ case kMathFround: |
+ return "fround"; |
+ case kMathRound: |
+ return "round"; |
+ case kMathAbs: |
+ return "abs"; |
+ case kMathLog: |
+ return "log"; |
+ case kMathExp: |
+ return "exp"; |
+ case kMathSqrt: |
+ return "sqrt"; |
+ case kMathPowHalf: |
+ return "pow-half"; |
+ case kMathClz32: |
+ return "clz32"; |
default: |
UNREACHABLE(); |
return NULL; |
@@ -4135,6 +4145,7 @@ HInstruction* HUnaryMathOperation::New( |
case kMathAbs: |
return H_CONSTANT_DOUBLE((d > 0.0) ? d : -d); |
case kMathRound: |
+ case kMathFround: |
case kMathFloor: |
return H_CONSTANT_DOUBLE(d); |
case kMathClz32: |
@@ -4162,6 +4173,8 @@ HInstruction* HUnaryMathOperation::New( |
// Exponent is not negative, the double value is already an integer. |
if (Double(d).Exponent() >= 0) return H_CONSTANT_DOUBLE(d); |
return H_CONSTANT_DOUBLE(std::floor(d + 0.5)); |
+ case kMathFround: |
+ return H_CONSTANT_DOUBLE(static_cast<double>(static_cast<float>(d))); |
case kMathFloor: |
return H_CONSTANT_DOUBLE(std::floor(d)); |
case kMathClz32: { |