Chromium Code Reviews| Index: runtime/vm/intrinsifier.cc |
| diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc |
| index 364004a2a624bb6470065b374e9e5dd30df83ef2..3e48d147e610510239d16b905cdb01d719a97957 100644 |
| --- a/runtime/vm/intrinsifier.cc |
| +++ b/runtime/vm/intrinsifier.cc |
| @@ -5,6 +5,7 @@ |
| #include "vm/assembler.h" |
| #include "vm/compiler.h" |
| +#include "vm/cpu.h" |
|
Florian Schneider
2016/03/28 19:42:54
Why is this include needed?
Cutch
2016/03/28 20:08:45
Removed.
|
| #include "vm/flags.h" |
| #include "vm/flow_graph.h" |
| #include "vm/flow_graph_compiler.h" |
| @@ -1068,4 +1069,65 @@ bool Intrinsifier::Build_MathAtan2(FlowGraph* flow_graph) { |
| /* num_parameters = */ 2); |
| } |
| + |
| +bool Intrinsifier::Build_DoubleMod(FlowGraph* flow_graph) { |
| + if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false; |
| + |
| + GraphEntryInstr* graph_entry = flow_graph->graph_entry(); |
| + TargetEntryInstr* normal_entry = graph_entry->normal_entry(); |
| + BlockBuilder builder(flow_graph, normal_entry); |
| + |
| + return BuildInvokeMathCFunction(&builder, |
| + MethodRecognizer::kDoubleMod, |
| + /* num_parameters = */ 2); |
| +} |
| + |
| + |
| +bool Intrinsifier::Build_DoubleCeil(FlowGraph* flow_graph) { |
| + if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false; |
| + |
| + GraphEntryInstr* graph_entry = flow_graph->graph_entry(); |
| + TargetEntryInstr* normal_entry = graph_entry->normal_entry(); |
| + BlockBuilder builder(flow_graph, normal_entry); |
| + |
| + return BuildInvokeMathCFunction(&builder, |
| + MethodRecognizer::kDoubleCeil); |
| +} |
| + |
| + |
| +bool Intrinsifier::Build_DoubleFloor(FlowGraph* flow_graph) { |
| + if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false; |
| + |
| + GraphEntryInstr* graph_entry = flow_graph->graph_entry(); |
| + TargetEntryInstr* normal_entry = graph_entry->normal_entry(); |
| + BlockBuilder builder(flow_graph, normal_entry); |
| + |
| + return BuildInvokeMathCFunction(&builder, |
| + MethodRecognizer::kDoubleFloor); |
| +} |
| + |
| + |
| +bool Intrinsifier::Build_DoubleTruncate(FlowGraph* flow_graph) { |
| + if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false; |
| + |
| + GraphEntryInstr* graph_entry = flow_graph->graph_entry(); |
| + TargetEntryInstr* normal_entry = graph_entry->normal_entry(); |
| + BlockBuilder builder(flow_graph, normal_entry); |
| + |
| + return BuildInvokeMathCFunction(&builder, |
| + MethodRecognizer::kDoubleTruncate); |
| +} |
| + |
| + |
| +bool Intrinsifier::Build_DoubleRound(FlowGraph* flow_graph) { |
| + if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false; |
| + |
| + GraphEntryInstr* graph_entry = flow_graph->graph_entry(); |
| + TargetEntryInstr* normal_entry = graph_entry->normal_entry(); |
| + BlockBuilder builder(flow_graph, normal_entry); |
| + |
| + return BuildInvokeMathCFunction(&builder, |
| + MethodRecognizer::kDoubleRound); |
| +} |
| + |
| } // namespace dart |