Fast compiler: support moving an int32 constant in an int64 register.
Shift operations on longs take an int for the shift value, and handling
it this way simplifies the implementation.
Test: test.py
Flag: com.android.art.flags.fast_baseline_compiler
Change-Id: I3673bc55c4d4eace71804b944ce7af6bdd252a62
diff --git a/compiler/optimizing/fast_compiler_arm64.cc b/compiler/optimizing/fast_compiler_arm64.cc
index adee867..4866a4d 100644
--- a/compiler/optimizing/fast_compiler_arm64.cc
+++ b/compiler/optimizing/fast_compiler_arm64.cc
@@ -610,7 +610,7 @@
}
if (source.IsConstant()) {
if (source.GetConstant()->IsIntConstant()) {
- DCHECK_NE(dst_type, DataType::Type::kInt64);
+ // Note: the destination may be 64bits, but that's ok.
__ Mov(dst, source.GetConstant()->AsIntConstant()->GetValue());
return true;
} else if (source.GetConstant()->IsLongConstant()) {