Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Unified Diff: runtime/vm/intermediate_language.cc

Issue 12049056: Use builtin fmod for double modulo operation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 17487)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -2632,6 +2632,7 @@
ASSERT(!CPUFeatures::double_truncate_round_supported());
return 1;
}
+ case MethodRecognizer::kDoubleMod:
case MethodRecognizer::kDoublePow:
return 2;
default:
@@ -2648,6 +2649,10 @@
"libc_pow", reinterpret_cast<RuntimeFunction>(
static_cast<BinaryMathCFunction>(&pow)), 0, true);
+extern const RuntimeEntry kModRuntimeEntry(
+ "libc_fmod", reinterpret_cast<RuntimeFunction>(
+ static_cast<BinaryMathCFunction>(&fmod)), 0, true);
+
extern const RuntimeEntry kFloorRuntimeEntry(
"libc_floor", reinterpret_cast<RuntimeFunction>(
static_cast<UnaryMathCFunction>(&floor)), 0, true);
@@ -2677,6 +2682,8 @@
return kCeilRuntimeEntry;
case MethodRecognizer::kDoublePow:
return kPowRuntimeEntry;
+ case MethodRecognizer::kDoubleMod:
+ return kModRuntimeEntry;
default:
UNREACHABLE();
}
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698