summaryrefslogtreecommitdiffstats
path: root/compiler/jni
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-01-13 11:42:13 +0000
committerNicolas Geoffray <ngeoffray@google.com>2015-01-13 18:11:24 +0000
commit69c15d340e7e76821bbc5d4494d4cef383774dee (patch)
treeafea69c321ffa55e0af63a83be62eedd2b378d2f /compiler/jni
parent603104b5b5c3759b0bc2733bda2f972686a775a3 (diff)
downloadandroid_art-69c15d340e7e76821bbc5d4494d4cef383774dee.tar.gz
android_art-69c15d340e7e76821bbc5d4494d4cef383774dee.tar.bz2
android_art-69c15d340e7e76821bbc5d4494d4cef383774dee.zip
Skip r1 on arm if first parameter is a long.
Change-Id: I16d927ee0a0b55031ade4c92c0095fd74e18ed5b
Diffstat (limited to 'compiler/jni')
-rw-r--r--compiler/jni/quick/arm/calling_convention_arm.cc7
1 files changed, 7 insertions, 0 deletions
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(