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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 21004011: Implements the two argument shuffle SIMD instruction for ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/disassembler_arm.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm.cc
===================================================================
--- runtime/vm/intermediate_language_arm.cc (revision 25620)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -3342,13 +3342,52 @@
LocationSummary* Float32x4TwoArgShuffleInstr::MakeLocationSummary() const {
- UNIMPLEMENTED();
- return NULL;
+ 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 Float32x4TwoArgShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
+ QRegister left = locs()->in(0).fpu_reg();
+ QRegister right = locs()->in(1).fpu_reg();
+ QRegister result = locs()->out().fpu_reg();
+
+ ASSERT(result == left);
+
+ DRegister dleft0 = EvenDRegisterOf(left);
+ DRegister dleft1 = OddDRegisterOf(left);
+ DRegister dright0 = EvenDRegisterOf(right);
+ DRegister dright1 = OddDRegisterOf(right);
+
+ switch (op_kind()) {
+ case MethodRecognizer::kFloat32x4WithZWInXY:
+ __ vmovd(dleft0, dright1);
+ break;
+ case MethodRecognizer::kFloat32x4InterleaveXY:
+ __ vmovq(QTMP, right);
+ __ vzipqw(left, QTMP);
+ break;
+ case MethodRecognizer::kFloat32x4InterleaveZW:
+ __ vmovq(QTMP, right);
+ __ vzipqw(left, QTMP);
+ __ vmovq(left, QTMP);
+ break;
+ case MethodRecognizer::kFloat32x4InterleaveXYPairs:
+ __ vmovd(dleft1, dright0);
+ break;
+ case MethodRecognizer::kFloat32x4InterleaveZWPairs:
+ __ vmovq(QTMP, right);
+ __ vmovd(EvenDRegisterOf(QTMP), dleft1);
+ __ vmovq(result, QTMP);
+ break;
+ default: UNREACHABLE();
+ }
}
« no previous file with comments | « runtime/vm/disassembler_arm.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698