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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 192573008: Inline Float64x2 methods with zero arguments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 9f79d0715a6eacb9e18289c5d60f39f030dd5a1a..f987d8a715afc81d8e7c3416d774d1ea57208fed 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -3850,6 +3850,48 @@ void Float32x4ToFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+LocationSummary* Float64x2ZeroArgInstr::MakeLocationSummary(bool opt) const {
+ const intptr_t kNumInputs = 1;
+ const intptr_t kNumTemps = 0;
+ LocationSummary* summary =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+ summary->set_in(0, Location::RequiresFpuRegister());
+ if (representation() == kTagged) {
+ ASSERT(op_kind() == MethodRecognizer::kFloat64x2GetSignMask);
+ summary->set_out(Location::RequiresRegister());
+ } else {
+ ASSERT(representation() == kUnboxedFloat64x2);
+ summary->set_out(Location::SameAsFirstInput());
+ }
+ return summary;
+}
+
+
+void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ XmmRegister left = locs()->in(0).fpu_reg();
+
+ ASSERT((op_kind() == MethodRecognizer::kFloat64x2GetSignMask) ||
+ (locs()->out().fpu_reg() == left));
+
+ switch (op_kind()) {
+ case MethodRecognizer::kFloat64x2Negate:
+ __ negatepd(left);
+ break;
+ case MethodRecognizer::kFloat64x2Abs:
+ __ abspd(left);
+ break;
+ case MethodRecognizer::kFloat64x2Sqrt:
+ __ sqrtpd(left);
+ break;
+ case MethodRecognizer::kFloat64x2GetSignMask:
+ __ movmskpd(locs()->out().reg(), left);
+ __ SmiTag(locs()->out().reg());
+ break;
+ default: UNREACHABLE();
+ }
+}
+
+
LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary(
bool opt) const {
const intptr_t kNumInputs = 4;
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698