From c89b047ed85cfabbdc79a7b76be413fb366b501a Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 23 Jun 2015 23:28:59 -0700 Subject: [PATCH] ART: Fix arm32 instrumentation exit stub Properly store, pass and restore floating point result. Bug: 22047833 (cherry picked from commit 844fb67a8b5638c4e195dbbe510dc1626824a16c) Change-Id: If5d9efbe63334c9b6353f76ce6e4fe519602482a --- runtime/arch/arm/quick_entrypoints_arm.S | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/arch/arm/quick_entrypoints_arm.S b/runtime/arch/arm/quick_entrypoints_arm.S index b06d2cac1..ca3ca1d24 100644 --- a/runtime/arch/arm/quick_entrypoints_arm.S +++ b/runtime/arch/arm/quick_entrypoints_arm.S @@ -1050,9 +1050,12 @@ art_quick_instrumentation_exit: .cfi_adjust_cfa_offset 8 .cfi_rel_offset r0, 0 .cfi_rel_offset r1, 4 - sub sp, #8 @ space for return value argument + vpush {d0} @ save fp return value .cfi_adjust_cfa_offset 8 - strd r0, [sp] @ r0/r1 -> [sp] for fpr_res + sub sp, #8 @ space for return value argument. Note: AAPCS stack alignment is 8B, no + @ need to align by 16. + .cfi_adjust_cfa_offset 8 + vstr d0, [sp] @ d0 -> [sp] for fpr_res mov r2, r0 @ pass return value as gpr_res mov r3, r1 mov r0, r9 @ pass Thread::Current @@ -1063,6 +1066,8 @@ art_quick_instrumentation_exit: mov r2, r0 @ link register saved by instrumentation mov lr, r1 @ r1 is holding link register if we're to bounce to deoptimize + vpop {d0} @ restore fp return value + .cfi_adjust_cfa_offset -8 pop {r0, r1} @ restore return value .cfi_adjust_cfa_offset -8 .cfi_restore r0 -- 2.11.0