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

Unified Diff: runtime/vm/flow_graph_compiler_mips.cc

Issue 712993005: Infer range for BIT_XOR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_mips.cc
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index c0ac35d1caee4abf4d698c17a104e82c963f841e..ab5fe5fade5379c067688610f0fc0b795b0f0828 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -1650,7 +1650,12 @@ void ParallelMoveResolver::EmitMove(int index) {
ASSERT(source.IsConstant());
const Object& constant = source.constant();
if (destination.IsRegister()) {
- __ LoadObject(destination.reg(), constant);
+ if (constant.IsSmi() &&
+ (source.constant_instruction()->representation() == kUnboxedInt32)) {
+ __ LoadImmediate(destination.reg(), Smi::Cast(constant).Value());
+ } else {
+ __ LoadObject(destination.reg(), constant);
+ }
} else if (destination.IsFpuRegister()) {
__ LoadObject(TMP, constant);
__ LoadDFromOffset(destination.fpu_reg(), TMP,
@@ -1664,7 +1669,12 @@ void ParallelMoveResolver::EmitMove(int index) {
ASSERT(destination.IsStackSlot());
const intptr_t dest_offset = destination.ToStackSlotOffset();
ScratchRegisterScope tmp(this, kNoRegister);
- __ LoadObject(tmp.reg(), constant);
+ if (constant.IsSmi() &&
+ (source.constant_instruction()->representation() == kUnboxedInt32)) {
+ __ LoadImmediate(tmp.reg(), Smi::Cast(constant).Value());
+ } else {
+ __ LoadObject(tmp.reg(), constant);
+ }
__ StoreToOffset(tmp.reg(), destination.base_reg(), dest_offset);
}
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698