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

Unified Diff: runtime/vm/flow_graph_compiler_arm.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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_arm.cc
===================================================================
--- runtime/vm/flow_graph_compiler_arm.cc (revision 38628)
+++ runtime/vm/flow_graph_compiler_arm.cc (working copy)
@@ -1609,14 +1609,25 @@
__ LoadObject(destination.reg(), constant);
} else if (destination.IsFpuRegister()) {
const DRegister dst = EvenDRegisterOf(destination.fpu_reg());
- __ LoadObject(TMP, constant);
- __ AddImmediate(TMP, TMP, Double::value_offset() - kHeapObjectTag);
- __ vldrd(dst, Address(TMP, 0));
+ if (Utils::DoublesBitEqual(Double::Cast(constant).value(), 0.0) &&
+ TargetCPUFeatures::neon_supported()) {
+ QRegister qdst = destination.fpu_reg();
+ __ veorq(qdst, qdst, qdst);
regis 2014/07/29 21:43:17 Why not veord? Mmm, it looks like Zach did not imp
+ } else {
+ __ LoadObject(TMP, constant);
+ __ AddImmediate(TMP, TMP, Double::value_offset() - kHeapObjectTag);
+ __ vldrd(dst, Address(TMP, 0));
+ }
} else if (destination.IsDoubleStackSlot()) {
+ if (Utils::DoublesBitEqual(Double::Cast(constant).value(), 0.0) &&
+ TargetCPUFeatures::neon_supported()) {
+ __ veorq(QTMP, QTMP, QTMP);
+ } else {
+ __ LoadObject(TMP, constant);
+ __ AddImmediate(TMP, TMP, Double::value_offset() - kHeapObjectTag);
+ __ vldrd(DTMP, Address(TMP, 0));
+ }
const intptr_t dest_offset = destination.ToStackSlotOffset();
- __ LoadObject(TMP, constant);
- __ AddImmediate(TMP, TMP, Double::value_offset() - kHeapObjectTag);
- __ vldrd(DTMP, Address(TMP, 0));
__ StoreDToOffset(DTMP, FP, dest_offset);
} else {
ASSERT(destination.IsStackSlot());
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698