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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 22947006: Add signMask getter to Float32x4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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_arm.cc
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 04edbc16f79d8fdf060814c75a69fa3ae8a4d0ac..9cc159160cb70a5c19401711198c68441a94df81 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -3030,6 +3030,46 @@ void Float32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+LocationSummary* Simd32x4GetSignMaskInstr::MakeLocationSummary() const {
+ const intptr_t kNumInputs = 1;
+ const intptr_t kNumTemps = 1;
+ LocationSummary* summary =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+ summary->set_in(0, Location::FpuRegisterLocation(Q5));
+ summary->set_temp(0, Location::RequiresRegister());
+ summary->set_out(Location::RequiresRegister());
+ return summary;
+}
+
+
+void Simd32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ QRegister value = locs()->in(0).fpu_reg();
+ DRegister dvalue0 = EvenDRegisterOf(value);
+ DRegister dvalue1 = OddDRegisterOf(value);
+
+ Register out = locs()->out().reg();
+ Register temp = locs()->temp(0).reg();
+
+ // X lane.
+ __ vmovrs(out, EvenSRegisterOf(dvalue0));
+ __ Lsr(out, out, 31);
+ // Y lane.
+ __ vmovrs(temp, OddSRegisterOf(dvalue0));
+ __ Lsr(temp, temp, 31);
+ __ orr(out, out, ShifterOperand(temp, LSL, 1));
+ // Z lane.
+ __ vmovrs(temp, EvenSRegisterOf(dvalue1));
+ __ Lsr(temp, temp, 31);
+ __ orr(out, out, ShifterOperand(temp, LSL, 2));
+ // W lane.
+ __ vmovrs(temp, OddSRegisterOf(dvalue1));
+ __ Lsr(temp, temp, 31);
+ __ orr(out, out, ShifterOperand(temp, LSL, 3));
+ // Tag.
+ __ SmiTag(out);
+}
+
+
LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 4;
const intptr_t kNumTemps = 0;

Powered by Google App Engine
This is Rietveld 408576698