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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 13872020: Inline Float32x4 Getters (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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') | tests/lib/typed_data/float32x4_unbox_regress_test.dart » ('j') | 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 206514d287da828b91e24c4abddc6493030f7b52..7e22db3fc614a1833a70741d73973f090ac5d592 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -2860,6 +2860,56 @@ void BinaryFloat32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+LocationSummary* Float32x4ShuffleInstr::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::RequiresFpuRegister());
+ summary->set_out(Location::SameAsFirstInput());
+ return summary;
+}
+
+
+void Float32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ XmmRegister value = locs()->in(0).fpu_reg();
+
+ ASSERT(locs()->out().fpu_reg() == value);
+
+ switch (op_kind()) {
+ case MethodRecognizer::kFloat32x4ShuffleXXXX:
+ __ shufps(value, value, Immediate(0x00));
+ break;
+ case MethodRecognizer::kFloat32x4ShuffleYYYY:
+ __ shufps(value, value, Immediate(0x55));
+ break;
+ case MethodRecognizer::kFloat32x4ShuffleZZZZ:
+ __ shufps(value, value, Immediate(0xAA));
+ break;
+ case MethodRecognizer::kFloat32x4ShuffleWWWW:
+ __ shufps(value, value, Immediate(0xFF));
+ break;
+ case MethodRecognizer::kFloat32x4ShuffleX:
+ __ shufps(value, value, Immediate(0x00));
+ __ cvtss2sd(value, value);
+ break;
+ case MethodRecognizer::kFloat32x4ShuffleY:
+ __ shufps(value, value, Immediate(0x55));
+ __ cvtss2sd(value, value);
+ break;
+ case MethodRecognizer::kFloat32x4ShuffleZ:
+ __ shufps(value, value, Immediate(0xAA));
+ __ cvtss2sd(value, value);
+ break;
+ case MethodRecognizer::kFloat32x4ShuffleW:
+ __ shufps(value, value, Immediate(0xFF));
+ __ cvtss2sd(value, value);
+ break;
+ default: UNREACHABLE();
+ }
+}
+
+
LocationSummary* MathSqrtInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 1;
const intptr_t kNumTemps = 0;
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | tests/lib/typed_data/float32x4_unbox_regress_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698