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

Unified Diff: runtime/vm/intermediate_language_arm64.cc

Issue 504143003: Support Int32 representation for selected binary operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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_arm64.cc
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index e275d6432ece3af07c859219a57dc4151534c74c..ca29a31615fb1d33b340a879e4cb46edb37ea330 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -296,6 +296,7 @@ LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Isolate* isolate,
void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ ASSERT(representation_ == kUnboxedDouble);
if (!locs()->out(0).IsInvalid()) {
if (Utils::DoublesBitEqual(Double::Cast(value()).value(), 0.0)) {
const VRegister dst = locs()->out(0).fpu_reg();
@@ -1017,7 +1018,7 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary(Isolate* isolate,
isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
locs->set_in(0, Location::RequiresRegister());
if (CanBeImmediateIndex(index(), class_id(), IsExternal())) {
- locs->set_in(1, Location::Constant(index()->BoundConstant()));
+ locs->set_in(1, Location::Constant(index()->definition()->AsConstant()));
} else {
locs->set_in(1, Location::RequiresRegister());
}
@@ -1156,7 +1157,7 @@ LocationSummary* StoreIndexedInstr::MakeLocationSummary(Isolate* isolate,
isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
locs->set_in(0, Location::RequiresRegister());
if (CanBeImmediateIndex(index(), class_id(), IsExternal())) {
- locs->set_in(1, Location::Constant(index()->BoundConstant()));
+ locs->set_in(1, Location::Constant(index()->definition()->AsConstant()));
} else {
locs->set_in(1, Location::WritableRegister());
}
@@ -2630,7 +2631,7 @@ LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Isolate* isolate,
summary->set_in(0, Location::RequiresRegister());
if (RightIsPowerOfTwoConstant()) {
ConstantInstr* right_constant = right()->definition()->AsConstant();
- summary->set_in(1, Location::Constant(right_constant->value()));
+ summary->set_in(1, Location::Constant(right_constant));
} else {
summary->set_in(1, Location::RequiresRegister());
}
@@ -4404,6 +4405,9 @@ void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+DEFINE_UNIMPLEMENTED_INSTRUCTION(Int32ToDoubleInstr)
+
+
LocationSummary* SmiToDoubleInstr::MakeLocationSummary(Isolate* isolate,
bool opt) const {
const intptr_t kNumInputs = 1;
@@ -5145,50 +5149,14 @@ CompileType UnaryUint32OpInstr::ComputeType() const {
}
-CompileType BoxUint32Instr::ComputeType() const {
- return CompileType::FromCid(kSmiCid);
-}
-
-
-CompileType UnboxUint32Instr::ComputeType() const {
- return CompileType::FromCid(kSmiCid);
-}
-
-
-LocationSummary* BinaryUint32OpInstr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void BinaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
-
-
-LocationSummary* ShiftUint32OpInstr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
-
-
-LocationSummary* UnaryUint32OpInstr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void UnaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
+DEFINE_UNIMPLEMENTED_INSTRUCTION(BinaryUint32OpInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(ShiftUint32OpInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(UnaryUint32OpInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(BoxInt32Instr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(UnboxInt32Instr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(BinaryInt32OpInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(BoxUint32Instr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(UnboxedIntConverterInstr)
LocationSummary* UnboxUint32Instr::MakeLocationSummary(Isolate* isolate,
@@ -5220,30 +5188,6 @@ void UnboxUint32Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
-LocationSummary* BoxUint32Instr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void BoxUint32Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
-
-
-LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
-
-
LocationSummary* ThrowInstr::MakeLocationSummary(Isolate* isolate,
bool opt) const {
return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kCall);

Powered by Google App Engine
This is Rietveld 408576698