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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 11043020: Add fast 64-bit bitwise negation to the IA32 optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed bug in the optimizer that prevented optimization Created 8 years, 2 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_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 13214)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -2201,7 +2201,7 @@
__ SmiTag(value); // Restore input register.
} else {
Register temp = locs()->temp(0).reg();
- Label* deopt = compiler->AddDeoptStub(deopt_id_, kDeoptBinaryDoubleOp);
+ Label* deopt = compiler->AddDeoptStub(deopt_id_, kDeoptUnboxInteger);
Label is_smi, done;
__ testl(value, Immediate(kSmiTagMask));
__ j(ZERO, &is_smi);
@@ -2380,6 +2380,27 @@
}
}
+
+LocationSummary* UnboxedMintUnaryOpInstr::MakeLocationSummary() const {
+ const intptr_t kNumInputs = 1;
+ const intptr_t kNumTemps = 0;
+ LocationSummary* summary =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+ summary->set_in(0, Location::RequiresXmmRegister());
+ summary->set_out(Location::SameAsFirstInput());
+ return summary;
+}
+
+
+void UnboxedMintUnaryOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ ASSERT(op_kind() == Token::kBIT_NOT);
+ XmmRegister value = locs()->in(0).xmm_reg();
+ ASSERT(value == locs()->out().xmm_reg());
+ __ pcmpeqq(XMM0, XMM0); // Generate all 1's.
+ __ pxor(value, XMM0);
+}
+
+
} // namespace dart
#undef __

Powered by Google App Engine
This is Rietveld 408576698