From 69c15d340e7e76821bbc5d4494d4cef383774dee Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 13 Jan 2015 11:42:13 +0000 Subject: Skip r1 on arm if first parameter is a long. Change-Id: I16d927ee0a0b55031ade4c92c0095fd74e18ed5b --- compiler/jni/quick/arm/calling_convention_arm.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/jni') diff --git a/compiler/jni/quick/arm/calling_convention_arm.cc b/compiler/jni/quick/arm/calling_convention_arm.cc index fd207150f7..669c3bb716 100644 --- a/compiler/jni/quick/arm/calling_convention_arm.cc +++ b/compiler/jni/quick/arm/calling_convention_arm.cc @@ -168,6 +168,13 @@ const ManagedRegisterEntrySpills& ArmManagedRuntimeCallingConvention::EntrySpill } else { // FIXME: Pointer this returns as both reference and long. if (IsCurrentParamALong() && !IsCurrentParamAReference()) { // Long. + if (gpr_index < arraysize(kHFCoreArgumentRegisters) - 1) { + // Skip R1, and use R2_R3 if the long is the first parameter. + if (gpr_index == 1) { + gpr_index++; + } + } + // If it spans register and memory, we must use the value in memory. if (gpr_index < arraysize(kHFCoreArgumentRegisters) - 1) { entry_spills_.push_back( -- cgit v1.2.3