summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-06-27 15:42:27 -0700
committerAndreas Gampe <agampe@google.com>2015-06-29 14:02:33 -0700
commite7d876adcfc1977800264ab7540aa488c1568b48 (patch)
tree3e8531d9822fd08022466d5d5970dad585f40ca7 /runtime
parentd735c41e95a5d89cc9dad0c78d7d052579d8bd41 (diff)
downloadart-e7d876adcfc1977800264ab7540aa488c1568b48.zip
art-e7d876adcfc1977800264ab7540aa488c1568b48.tar.gz
art-e7d876adcfc1977800264ab7540aa488c1568b48.tar.bz2
ART: Fix CFI annotation for art_quick_aput_obj
Fix the CFI state after an early return. Bug: 22014525 (cherry picked from commit 2738639bcd30b908d825725169b7497ed047debb) Change-Id: I56b9ba8cf8c47d70a642f064e59c7e04a476dd2f
Diffstat (limited to 'runtime')
-rw-r--r--runtime/arch/arm64/quick_entrypoints_arm64.S1
-rw-r--r--runtime/arch/x86/quick_entrypoints_x86.S5
-rw-r--r--runtime/arch/x86_64/quick_entrypoints_x86_64.S1
3 files changed, 5 insertions, 2 deletions
diff --git a/runtime/arch/arm64/quick_entrypoints_arm64.S b/runtime/arch/arm64/quick_entrypoints_arm64.S
index f90a6b0..fce5f23 100644
--- a/runtime/arch/arm64/quick_entrypoints_arm64.S
+++ b/runtime/arch/arm64/quick_entrypoints_arm64.S
@@ -1239,6 +1239,7 @@ ENTRY art_quick_aput_obj
lsr x0, x0, #7
strb w3, [x3, x0]
ret
+ .cfi_adjust_cfa_offset 32 // 4 restores after cbz for unwinding.
.Lthrow_array_store_exception:
ldp x0, x1, [sp]
.cfi_restore x0
diff --git a/runtime/arch/x86/quick_entrypoints_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S
index 17778e9..870a747 100644
--- a/runtime/arch/x86/quick_entrypoints_x86.S
+++ b/runtime/arch/x86/quick_entrypoints_x86.S
@@ -1168,9 +1168,9 @@ DEFINE_FUNCTION art_quick_aput_obj
CFI_ADJUST_CFA_OFFSET(8)
pushl MIRROR_OBJECT_CLASS_OFFSET(%edx) // pass arg2 - type of the value to be stored
CFI_ADJUST_CFA_OFFSET(4)
- PUSH ebx // pass arg1 - component type of the array
+ PUSH ebx // pass arg1 - component type of the array
call SYMBOL(artIsAssignableFromCode) // (Class* a, Class* b)
- addl LITERAL(16), %esp // pop arguments
+ addl LITERAL(16), %esp // pop arguments
CFI_ADJUST_CFA_OFFSET(-16)
testl %eax, %eax
jz .Lthrow_array_store_exception
@@ -1182,6 +1182,7 @@ DEFINE_FUNCTION art_quick_aput_obj
shrl LITERAL(7), %eax
movb %dl, (%edx, %eax)
ret
+ CFI_ADJUST_CFA_OFFSET(12) // 3 POP after the jz for unwinding.
.Lthrow_array_store_exception:
POP edx
POP ecx
diff --git a/runtime/arch/x86_64/quick_entrypoints_x86_64.S b/runtime/arch/x86_64/quick_entrypoints_x86_64.S
index 62eebd4..f11eb06 100644
--- a/runtime/arch/x86_64/quick_entrypoints_x86_64.S
+++ b/runtime/arch/x86_64/quick_entrypoints_x86_64.S
@@ -1243,6 +1243,7 @@ DEFINE_FUNCTION art_quick_aput_obj
movb %dl, (%rdx, %rdi) // Note: this assumes that top 32b of %rdi are zero
// movb %dl, (%rdx, %rdi)
ret
+ CFI_ADJUST_CFA_OFFSET(32 + 4 * 8) // Reset unwind info so following code unwinds.
.Lthrow_array_store_exception:
RESTORE_FP_CALLEE_SAVE_FRAME
// Restore arguments.