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

Unified Diff: runtime/vm/intermediate_language_arm64.cc

Issue 425083003: Use (more) xor on FP register to load it with 0.0. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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
Index: runtime/vm/intermediate_language_arm64.cc
===================================================================
--- runtime/vm/intermediate_language_arm64.cc (revision 38628)
+++ runtime/vm/intermediate_language_arm64.cc (working copy)
@@ -296,8 +296,13 @@
void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
if (!locs()->out(0).IsInvalid()) {
- const VRegister dst = locs()->out(0).fpu_reg();
- __ LoadDImmediate(dst, Double::Cast(value()).value(), PP);
+ if (Utils::DoublesBitEqual(Double::Cast(value()).value(), 0.0)) {
+ const VRegister dst = locs()->out(0).fpu_reg();
+ __ veor(dst, dst, dst);
+ } else {
+ const VRegister dst = locs()->out(0).fpu_reg();
+ __ LoadDImmediate(dst, Double::Cast(value()).value(), PP);
+ }
}
}
« runtime/vm/flow_graph_compiler_arm.cc ('K') | « runtime/vm/flow_graph_compiler_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698