Add a GTest for Assembly Stubs, Add some ARM64 and X86-64 Stubs
This GTest adds some runtime testing for the stubs that does not
rely on the compiler. This should allow to add or update the stubs
and do testing, especially on architectures without working compiler.
This test is a bit dangerous: if it doesn't know how to handle an
architecture, it will only log a warning. This is so that testing
does not break at the moment. The warning is forced to stdout, too,
so that it is always visible.
Add art_quick_check_cast to ARM64 and X86-64. Add art_quick_memcpy
to X86-64. The latter should be removed in a good compiler, as it is
practically only overhead. Add minor CFI information in ARM.
Change-Id: Ia9c6d0f4035eb1527c12b5f6067dece59e25528d
diff --git a/runtime/arch/arm/quick_entrypoints_arm.S b/runtime/arch/arm/quick_entrypoints_arm.S
index 4903732..7cc8da8 100644
--- a/runtime/arch/arm/quick_entrypoints_arm.S
+++ b/runtime/arch/arm/quick_entrypoints_arm.S
@@ -492,11 +492,22 @@
blx lr
.Lcheck_assignability:
push {r0-r2, lr} @ save arguments
+ .save {r0-r2, lr}
+ .cfi_adjust_cfa_offset 16
+ .cfi_rel_offset r0, 0
+ .cfi_rel_offset r1, 4
+ .cfi_rel_offset r2, 8
+ .cfi_rel_offset lr, 12
mov r1, ip
mov r0, r3
bl artIsAssignableFromCode
cbz r0, .Lthrow_array_store_exception
pop {r0-r2, lr}
+ .cfi_restore r0
+ .cfi_restore r1
+ .cfi_restore r2
+ .cfi_restore lr
+ .cfi_adjust_cfa_offset -16
add r3, r0, #OBJECT_ARRAY_DATA_OFFSET
str r2, [r3, r1, lsl #2]
ldr r3, [r9, #THREAD_CARD_TABLE_OFFSET]
@@ -505,6 +516,11 @@
blx lr
.Lthrow_array_store_exception:
pop {r0-r2, lr}
+ .cfi_restore r0
+ .cfi_restore r1
+ .cfi_restore r2
+ .cfi_restore lr
+ .cfi_adjust_cfa_offset -16
SETUP_SAVE_ALL_CALLEE_SAVE_FRAME
mov r1, r2
mov r2, r9 @ pass Thread::Current