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

Unified Diff: runtime/vm/intermediate_language_x64.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_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 5ae112aa976848944fce7ef3a7bcf9fd4eed24cf..67d6d8e8283740354ee08edf4e58fd9d10324049 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -253,6 +253,7 @@ LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Isolate* isolate,
void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ ASSERT(representation_ == kUnboxedDouble);
// The register allocator drops constant definitions that have no uses.
if (!locs()->out(0).IsInvalid()) {
XmmRegister result = locs()->out(0).fpu_reg();
@@ -970,13 +971,11 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary(Isolate* isolate,
// tagged (for all element sizes > 1).
if (index_scale() == 1) {
locs->set_in(1, CanBeImmediateIndex(index(), class_id())
- ? Location::Constant(
- index()->definition()->AsConstant()->value())
+ ? Location::Constant(index()->definition()->AsConstant())
: Location::WritableRegister());
} else {
locs->set_in(1, CanBeImmediateIndex(index(), class_id())
- ? Location::Constant(
- index()->definition()->AsConstant()->value())
+ ? Location::Constant(index()->definition()->AsConstant())
: Location::RequiresRegister());
}
if ((representation() == kUnboxedDouble) ||
@@ -1113,13 +1112,11 @@ LocationSummary* StoreIndexedInstr::MakeLocationSummary(Isolate* isolate,
// tagged (for all element sizes > 1).
if (index_scale() == 1) {
locs->set_in(1, CanBeImmediateIndex(index(), class_id())
- ? Location::Constant(
- index()->definition()->AsConstant()->value())
+ ? Location::Constant(index()->definition()->AsConstant())
: Location::WritableRegister());
} else {
locs->set_in(1, CanBeImmediateIndex(index(), class_id())
- ? Location::Constant(
- index()->definition()->AsConstant()->value())
+ ? Location::Constant(index()->definition()->AsConstant())
: Location::RequiresRegister());
}
switch (class_id()) {
@@ -2653,7 +2650,7 @@ LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Isolate* isolate,
LocationSummary* summary = new(isolate) LocationSummary(
isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
summary->set_in(0, Location::RequiresRegister());
- summary->set_in(1, Location::Constant(right_constant->value()));
+ summary->set_in(1, Location::Constant(right_constant));
summary->set_out(0, Location::SameAsFirstInput());
return summary;
}
@@ -2665,7 +2662,7 @@ LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Isolate* isolate,
if (RightIsPowerOfTwoConstant()) {
summary->set_in(0, Location::RequiresRegister());
ConstantInstr* right_constant = right()->definition()->AsConstant();
- summary->set_in(1, Location::Constant(right_constant->value()));
+ summary->set_in(1, Location::Constant(right_constant));
summary->set_temp(0, Location::RequiresRegister());
summary->set_out(0, Location::SameAsFirstInput());
} else {
@@ -4625,6 +4622,9 @@ void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+DEFINE_UNIMPLEMENTED_INSTRUCTION(Int32ToDoubleInstr)
+
+
LocationSummary* SmiToDoubleInstr::MakeLocationSummary(Isolate* isolate,
bool opt) const {
const intptr_t kNumInputs = 1;
@@ -5512,50 +5512,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,
@@ -5587,30 +5551,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