summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/common_arm64.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-03-04 10:28:04 +0000
committerNicolas Geoffray <ngeoffray@google.com>2015-03-04 10:28:04 +0000
commitde0eb6f59853f08d94fe42088d959b88f8448123 (patch)
treef3756060991a216202201890f11cb63bfd2ec205 /compiler/optimizing/common_arm64.h
parent44d95a22b2d9127f9b803a70dbe00d0816e922ad (diff)
downloadart-de0eb6f59853f08d94fe42088d959b88f8448123.zip
art-de0eb6f59853f08d94fe42088d959b88f8448123.tar.gz
art-de0eb6f59853f08d94fe42088d959b88f8448123.tar.bz2
Fix arm64 build.
Change-Id: Ib6babc1c6e8f2e78badc93cfcf89950e53f71bbb
Diffstat (limited to 'compiler/optimizing/common_arm64.h')
-rw-r--r--compiler/optimizing/common_arm64.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/optimizing/common_arm64.h b/compiler/optimizing/common_arm64.h
index 007324e..9447d3b 100644
--- a/compiler/optimizing/common_arm64.h
+++ b/compiler/optimizing/common_arm64.h
@@ -118,8 +118,14 @@ static inline vixl::CPURegister InputCPURegisterAt(HInstruction* instr, int inde
static inline int64_t Int64ConstantFrom(Location location) {
HConstant* instr = location.GetConstant();
- return instr->IsIntConstant() ? instr->AsIntConstant()->GetValue()
- : instr->AsLongConstant()->GetValue();
+ if (instr->IsIntConstant()) {
+ return instr->AsIntConstant()->GetValue();
+ } else if (instr->IsNullConstant()) {
+ return 0;
+ } else {
+ DCHECK(instr->IsLongConstant());
+ return instr->AsLongConstant()->GetValue();
+ }
}
static inline vixl::Operand OperandFrom(Location location, Primitive::Type type) {