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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 266633007: Merge ConstantInstr -> UnboxDouble to UnboxedConstant. Reduces register usage and allows for variou… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/intermediate_language_arm.cc
===================================================================
--- runtime/vm/intermediate_language_arm.cc (revision 35632)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -276,6 +276,27 @@
}
+LocationSummary* UnboxedConstantInstr::MakeLocationSummary(bool opt) const {
+ const intptr_t kNumInputs = 0;
+ const intptr_t kNumTemps = 1;
+ LocationSummary* locs =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+ locs->set_out(0, Location::RequiresFpuRegister());
+ locs->set_temp(0, Location::RequiresRegister());
+ return locs;
+}
+
+
+void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ // The register allocator drops constant definitions that have no uses.
+ if (!locs()->out(0).IsInvalid()) {
+ DRegister dst = EvenDRegisterOf(locs()->out(0).fpu_reg());
+ Register temp = locs()->temp(0).reg();
+ __ LoadDImmediate(dst, Double::Cast(value()).value(), temp);
+ }
+}
+
+
LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const {
const intptr_t kNumInputs = 3;
const intptr_t kNumTemps = 0;

Powered by Google App Engine
This is Rietveld 408576698