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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 193183003: Inline Float64x2 methods that take 1 argument (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_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index a5288bccbdf2970a04b916d9437645cb3b99e4b7..c587f1f2142176ba7604552f5fad483813040993 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -4028,6 +4028,59 @@ void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+LocationSummary* Float64x2OneArgInstr::MakeLocationSummary(bool opt) const {
+ const intptr_t kNumInputs = 2;
+ const intptr_t kNumTemps = 0;
+ LocationSummary* summary =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+ summary->set_in(0, Location::RequiresFpuRegister());
+ summary->set_in(1, Location::RequiresFpuRegister());
+ summary->set_out(Location::SameAsFirstInput());
+ return summary;
+}
+
+
+void Float64x2OneArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ XmmRegister left = locs()->in(0).fpu_reg();
+ XmmRegister right = locs()->in(1).fpu_reg();
+ ASSERT((locs()->out().fpu_reg() == left));
+
+ switch (op_kind()) {
+ case MethodRecognizer::kFloat64x2Scale:
+ __ shufpd(right, right, Immediate(0x00));
+ __ mulpd(left, right);
+ break;
+ case MethodRecognizer::kFloat64x2WithX:
+ __ subl(ESP, Immediate(16));
+ // Move value to stack.
+ __ movups(Address(ESP, 0), left);
+ // Write over X value.
+ __ movsd(Address(ESP, 0), right);
+ // Move updated value into output register.
+ __ movups(left, Address(ESP, 0));
+ __ addl(ESP, Immediate(16));
+ break;
+ case MethodRecognizer::kFloat64x2WithY:
+ __ subl(ESP, Immediate(16));
+ // Move value to stack.
+ __ movups(Address(ESP, 0), left);
+ // Write over Y value.
+ __ movsd(Address(ESP, 8), right);
+ // Move updated value into output register.
+ __ movups(left, Address(ESP, 0));
+ __ addl(ESP, Immediate(16));
+ break;
+ case MethodRecognizer::kFloat64x2Min:
+ __ minpd(left, right);
+ break;
+ case MethodRecognizer::kFloat64x2Max:
+ __ maxpd(left, right);
+ break;
+ default: UNREACHABLE();
+ }
+}
+
+
LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary(
bool opt) const {
const intptr_t kNumInputs = 4;
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698