summaryrefslogtreecommitdiffstats
path: root/compiler/jni/quick/arm64/calling_convention_arm64.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/jni/quick/arm64/calling_convention_arm64.cc')
-rw-r--r--compiler/jni/quick/arm64/calling_convention_arm64.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/jni/quick/arm64/calling_convention_arm64.cc b/compiler/jni/quick/arm64/calling_convention_arm64.cc
index a6caff1..4344c90 100644
--- a/compiler/jni/quick/arm64/calling_convention_arm64.cc
+++ b/compiler/jni/quick/arm64/calling_convention_arm64.cc
@@ -158,7 +158,8 @@ Arm64JniCallingConvention::Arm64JniCallingConvention(bool is_static, bool is_syn
const char* shorty)
: JniCallingConvention(is_static, is_synchronized, shorty, kFramePointerSize) {
uint32_t core_spill_mask = CoreSpillMask();
- for (int x_reg = 0; x_reg < kNumberOfXRegisters; ++x_reg) {
+ DCHECK_EQ(XZR, kNumberOfXRegisters - 1); // Exclude XZR from the loop (avoid 1 << 32).
+ for (int x_reg = 0; x_reg < kNumberOfXRegisters - 1; ++x_reg) {
if (((1 << x_reg) & core_spill_mask) != 0) {
callee_save_regs_.push_back(
Arm64ManagedRegister::FromXRegister(static_cast<XRegister>(x_reg)));