diff options
author | Jeff Hao <jeffhao@google.com> | 2014-01-15 13:49:50 -0800 |
---|---|---|
committer | Jeff Hao <jeffhao@google.com> | 2015-04-27 18:54:52 -0700 |
commit | 848f70a3d73833fc1bf3032a9ff6812e429661d9 (patch) | |
tree | b0349b3a40aab5a915af491b100659a5ca9fbbf6 /runtime/arch/arm | |
parent | d14438f0c5071962be7fab572b54687d32d9d087 (diff) | |
download | art-848f70a3d73833fc1bf3032a9ff6812e429661d9.zip art-848f70a3d73833fc1bf3032a9ff6812e429661d9.tar.gz art-848f70a3d73833fc1bf3032a9ff6812e429661d9.tar.bz2 |
Replace String CharArray with internal uint16_t array.
Summary of high level changes:
- Adds compiler inliner support to identify string init methods
- Adds compiler support (quick & optimizing) with new invoke code path
that calls method off the thread pointer
- Adds thread entrypoints for all string init methods
- Adds map to verifier to log when receiver of string init has been
copied to other registers. used by compiler and interpreter
Change-Id: I797b992a8feb566f9ad73060011ab6f51eb7ce01
Diffstat (limited to 'runtime/arch/arm')
-rw-r--r-- | runtime/arch/arm/quick_entrypoints_arm.S | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/runtime/arch/arm/quick_entrypoints_arm.S b/runtime/arch/arm/quick_entrypoints_arm.S index 599c22a..7488578 100644 --- a/runtime/arch/arm/quick_entrypoints_arm.S +++ b/runtime/arch/arm/quick_entrypoints_arm.S @@ -705,6 +705,22 @@ ENTRY \name END \name .endm +// Macro to facilitate adding new allocation entrypoints. +.macro FOUR_ARG_DOWNCALL name, entrypoint, return + .extern \entrypoint +ENTRY \name + SETUP_REFS_ONLY_CALLEE_SAVE_FRAME r3, r12 @ save callee saves in case of GC + str r9, [sp, #-16]! @ expand the frame and pass Thread::Current + .pad #16 + .cfi_adjust_cfa_offset 16 + bl \entrypoint + add sp, #16 @ strip the extra frame + .cfi_adjust_cfa_offset -16 + RESTORE_REFS_ONLY_CALLEE_SAVE_FRAME + \return +END \name +.endm + ONE_ARG_DOWNCALL art_quick_initialize_static_storage, artInitializeStaticStorageFromCode, RETURN_IF_RESULT_IS_NON_ZERO_OR_DELIVER ONE_ARG_DOWNCALL art_quick_initialize_type, artInitializeTypeFromCode, RETURN_IF_RESULT_IS_NON_ZERO_OR_DELIVER ONE_ARG_DOWNCALL art_quick_initialize_type_and_verify_access, artInitializeTypeAndVerifyAccessFromCode, RETURN_IF_RESULT_IS_NON_ZERO_OR_DELIVER @@ -1188,8 +1204,7 @@ ENTRY art_quick_indexof .cfi_rel_offset r11, 8 .cfi_rel_offset lr, 12 ldr r3, [r0, #MIRROR_STRING_COUNT_OFFSET] - ldr r12, [r0, #MIRROR_STRING_OFFSET_OFFSET] - ldr r0, [r0, #MIRROR_STRING_VALUE_OFFSET] + add r0, #MIRROR_STRING_VALUE_OFFSET /* Clamp start to [0..count] */ cmp r2, #0 @@ -1199,10 +1214,6 @@ ENTRY art_quick_indexof it gt movgt r2, r3 - /* Build a pointer to the start of string data */ - add r0, #MIRROR_CHAR_ARRAY_DATA_OFFSET - add r0, r0, r12, lsl #1 - /* Save a copy in r12 to later compute result */ mov r12, r0 @@ -1308,12 +1319,10 @@ ENTRY art_quick_string_compareto .cfi_rel_offset r12, 24 .cfi_rel_offset lr, 28 - ldr r4, [r2, #MIRROR_STRING_OFFSET_OFFSET] - ldr r9, [r1, #MIRROR_STRING_OFFSET_OFFSET] ldr r7, [r2, #MIRROR_STRING_COUNT_OFFSET] ldr r10, [r1, #MIRROR_STRING_COUNT_OFFSET] - ldr r2, [r2, #MIRROR_STRING_VALUE_OFFSET] - ldr r1, [r1, #MIRROR_STRING_VALUE_OFFSET] + add r2, #MIRROR_STRING_VALUE_OFFSET + add r1, #MIRROR_STRING_VALUE_OFFSET /* * At this point, we have: @@ -1328,15 +1337,12 @@ ENTRY art_quick_string_compareto it ls movls r10, r7 - /* Now, build pointers to the string data */ - add r2, r2, r4, lsl #1 - add r1, r1, r9, lsl #1 /* * Note: data pointers point to previous element so we can use pre-index * mode with base writeback. */ - add r2, #MIRROR_CHAR_ARRAY_DATA_OFFSET-2 @ offset to contents[-1] - add r1, #MIRROR_CHAR_ARRAY_DATA_OFFSET-2 @ offset to contents[-1] + subs r2, #2 @ offset to contents[-1] + subs r1, #2 @ offset to contents[-1] /* * At this point we have: |