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

Unified Diff: runtime/vm/intermediate_language_arm.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.h ('k') | runtime/vm/intermediate_language_ia32.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
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 499244f5543875935b8a9a1778f420b7c89ac6a1..dcd110e3926bb77706105329322c82fef1f394d6 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -4026,6 +4026,73 @@ 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);
+
+ if (representation() == kTagged) {
+ ASSERT(op_kind() == MethodRecognizer::kFloat64x2GetSignMask);
+ // Grabbing the S components means we need a low (< 7) Q.
+ summary->set_in(0, Location::FpuRegisterLocation(Q6));
+ summary->set_out(Location::RequiresRegister());
+ summary->AddTemp(Location::RequiresRegister());
+ } else {
+ summary->set_in(0, Location::RequiresFpuRegister());
+ summary->set_out(Location::RequiresFpuRegister());
+ }
+ return summary;
+}
+
+
+void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ QRegister q = locs()->in(0).fpu_reg();
+
+ if ((op_kind() == MethodRecognizer::kFloat64x2GetSignMask)) {
+ DRegister dvalue0 = EvenDRegisterOf(q);
+ DRegister dvalue1 = OddDRegisterOf(q);
+
+ Register out = locs()->out().reg();
+ Register temp = locs()->temp(0).reg();
+
+ // Upper 32-bits of X lane.
+ __ vmovrs(out, OddSRegisterOf(dvalue0));
+ __ Lsr(out, out, 31);
+ // Upper 32-bits of Y lane.
+ __ vmovrs(temp, OddSRegisterOf(dvalue1));
+ __ Lsr(temp, temp, 31);
+ __ orr(out, out, ShifterOperand(temp, LSL, 1));
+ // Tag.
+ __ SmiTag(out);
+ return;
+ }
+ ASSERT(representation() == kUnboxedFloat64x2);
+ QRegister r = locs()->out().fpu_reg();
+
+ DRegister dvalue0 = EvenDRegisterOf(q);
+ DRegister dvalue1 = OddDRegisterOf(q);
+ DRegister dresult0 = EvenDRegisterOf(r);
+ DRegister dresult1 = OddDRegisterOf(r);
+
+ switch (op_kind()) {
+ case MethodRecognizer::kFloat64x2Negate:
+ __ vnegd(dresult0, dvalue0);
+ __ vnegd(dresult1, dvalue1);
+ break;
+ case MethodRecognizer::kFloat64x2Abs:
+ __ vabsd(dresult0, dvalue0);
+ __ vabsd(dresult1, dvalue1);
+ break;
+ case MethodRecognizer::kFloat64x2Sqrt:
+ __ vsqrtd(dresult0, dvalue0);
+ __ vsqrtd(dresult1, dvalue1);
+ break;
+ default: UNREACHABLE();
+ }
+}
+
+
LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary(
bool opt) const {
const intptr_t kNumInputs = 4;
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698