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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 267793005: Use xorps xmm1, xmm1 to creat a 0.0 cconstant. Add to utils a bitwise double test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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_builder.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm.cc
===================================================================
--- runtime/vm/intermediate_language_arm.cc (revision 35714)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -290,9 +290,14 @@
void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// The register allocator drops constant definitions that have no uses.
if (!locs()->out(0).IsInvalid()) {
- DRegister dst = EvenDRegisterOf(locs()->out(0).fpu_reg());
- Register temp = locs()->temp(0).reg();
- __ LoadDImmediate(dst, Double::Cast(value()).value(), temp);
+ if (Utils::DoublesBitEqual(Double::Cast(value()).value(), 0.0)) {
+ QRegister dst = locs()->out(0).fpu_reg();
+ __ veorq(dst, dst, dst);
+ } else {
+ DRegister dst = EvenDRegisterOf(locs()->out(0).fpu_reg());
+ Register temp = locs()->temp(0).reg();
+ __ LoadDImmediate(dst, Double::Cast(value()).value(), temp);
+ }
}
}
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698