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

Unified Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 10536086: Add stack check in loops so that loops can be stopped. Optimize relational operations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_ia32.cc
===================================================================
--- runtime/vm/flow_graph_compiler_ia32.cc (revision 8493)
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy)
@@ -985,6 +985,27 @@
__ Bind(&is_ok);
}
+
+void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result,
+ Register reg,
+ Register temp,
+ Label* not_double_or_smi) {
+ Label is_smi, done;
+ __ testl(reg, Immediate(kSmiTagMask));
+ __ j(ZERO, &is_smi);
+ __ LoadClassId(temp, reg);
+ __ cmpl(temp, Immediate(kDouble));
+ __ j(NOT_EQUAL, not_double_or_smi);
+ __ movsd(result, FieldAddress(reg, Double::value_offset()));
+ __ jmp(&done);
+ __ Bind(&is_smi);
+ __ movl(temp, reg);
+ __ SmiUntag(temp);
+ __ cvtsi2sd(result, temp);
+ __ Bind(&done);
+}
+
+
#undef __
} // namespace dart
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698