diff options
| -rw-r--r-- | runtime/arch/x86/quick_entrypoints_x86.S | 16 | ||||
| -rw-r--r-- | runtime/generated/asm_support_gen.h | 4 | ||||
| -rw-r--r-- | tools/cpp-define-generator/constant_dexcache.def | 2 |
3 files changed, 10 insertions, 12 deletions
diff --git a/runtime/arch/x86/quick_entrypoints_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S index 67df081456..9c22245e0d 100644 --- a/runtime/arch/x86/quick_entrypoints_x86.S +++ b/runtime/arch/x86/quick_entrypoints_x86.S @@ -1100,18 +1100,15 @@ DEFINE_FUNCTION art_quick_alloc_object_region_tlab END_FUNCTION art_quick_alloc_object_region_tlab DEFINE_FUNCTION art_quick_resolve_string - SETUP_SAVE_REFS_ONLY_FRAME ebx, ebx - movl FRAME_SIZE_SAVE_REFS_ONLY(%esp), %ecx // get referrer + movl 4(%esp), %ecx // get referrer movl ART_METHOD_DECLARING_CLASS_OFFSET(%ecx), %ecx // get declaring class movl DECLARING_CLASS_DEX_CACHE_STRINGS_OFFSET(%ecx), %ecx // get string dex cache movl LITERAL(STRING_DEX_CACHE_SIZE_MINUS_ONE), %edx andl %eax, %edx - shl LITERAL(STRING_DEX_CACHE_ELEMENT_SIZE_SHIFT), %edx - addl %ecx, %edx - movlps (%edx), %xmm0 // load string idx and pointer to xmm0 - movd %xmm0, %ecx // extract pointer - pshufd LITERAL(0x55), %xmm0, %xmm0 // shuffle index into lowest bits - movd %xmm0, %edx // extract index + movlps (%ecx, %edx, STRING_DEX_CACHE_ELEMENT_SIZE), %xmm0 // load string idx and ptr to xmm0 + movd %xmm0, %ecx // extract pointer + pshufd LITERAL(0x55), %xmm0, %xmm0 // shuffle index into lowest bits + movd %xmm0, %edx // extract index cmp %edx, %eax jne .Lart_quick_resolve_string_slow_path movl %ecx, %eax @@ -1119,10 +1116,10 @@ DEFINE_FUNCTION art_quick_resolve_string cmpl LITERAL(0), %fs:THREAD_IS_GC_MARKING_OFFSET jne .Lart_quick_resolve_string_marking #endif - RESTORE_SAVE_REFS_ONLY_FRAME ret .Lart_quick_resolve_string_slow_path: // Outgoing argument set up + SETUP_SAVE_REFS_ONLY_FRAME ebx, ebx subl LITERAL(8), %esp // push padding CFI_ADJUST_CFA_OFFSET(8) pushl %fs:THREAD_SELF_OFFSET // pass Thread::Current() @@ -1134,6 +1131,7 @@ DEFINE_FUNCTION art_quick_resolve_string RESTORE_SAVE_REFS_ONLY_FRAME RETURN_IF_RESULT_IS_NON_ZERO_OR_DELIVER .Lart_quick_resolve_string_marking: + SETUP_SAVE_REFS_ONLY_FRAME ebx, ebx testl LITERAL(LOCK_WORD_MARK_BIT_MASK_SHIFTED), MIRROR_OBJECT_LOCK_WORD_OFFSET(%eax) jnz .Lart_quick_resolve_string_no_rb subl LITERAL(12), %esp // alignment padding diff --git a/runtime/generated/asm_support_gen.h b/runtime/generated/asm_support_gen.h index 5c98ea6114..03f5bf6dd4 100644 --- a/runtime/generated/asm_support_gen.h +++ b/runtime/generated/asm_support_gen.h @@ -80,8 +80,8 @@ DEFINE_CHECK_EQ(static_cast<int32_t>(STRING_DEX_CACHE_ELEMENT_SIZE_SHIFT), (stat DEFINE_CHECK_EQ(static_cast<int32_t>(STRING_DEX_CACHE_SIZE_MINUS_ONE), (static_cast<int32_t>(art::mirror::DexCache::kDexCacheStringCacheSize - 1))) #define STRING_DEX_CACHE_HASH_BITS 10 DEFINE_CHECK_EQ(static_cast<int32_t>(STRING_DEX_CACHE_HASH_BITS), (static_cast<int32_t>(art::LeastSignificantBit(art::mirror::DexCache::kDexCacheStringCacheSize)))) -#define STRING_DEX_CACHE_ELEMENT_SIZE 0x8 -DEFINE_CHECK_EQ(static_cast<size_t>(STRING_DEX_CACHE_ELEMENT_SIZE), (static_cast<size_t>(sizeof(art::mirror::StringDexCachePair)))) +#define STRING_DEX_CACHE_ELEMENT_SIZE 8 +DEFINE_CHECK_EQ(static_cast<int32_t>(STRING_DEX_CACHE_ELEMENT_SIZE), (static_cast<int32_t>(sizeof(art::mirror::StringDexCachePair)))) #define MIN_LARGE_OBJECT_THRESHOLD 0x3000 DEFINE_CHECK_EQ(static_cast<size_t>(MIN_LARGE_OBJECT_THRESHOLD), (static_cast<size_t>(art::gc::Heap::kMinLargeObjectThreshold))) #define LOCK_WORD_STATE_SHIFT 30 diff --git a/tools/cpp-define-generator/constant_dexcache.def b/tools/cpp-define-generator/constant_dexcache.def index d10ca1eed2..ede16d2108 100644 --- a/tools/cpp-define-generator/constant_dexcache.def +++ b/tools/cpp-define-generator/constant_dexcache.def @@ -24,5 +24,5 @@ DEFINE_EXPR(STRING_DEX_CACHE_SIZE_MINUS_ONE, int32_t, art::mirror::DexCache::kDexCacheStringCacheSize - 1) DEFINE_EXPR(STRING_DEX_CACHE_HASH_BITS, int32_t, art::LeastSignificantBit(art::mirror::DexCache::kDexCacheStringCacheSize)) -DEFINE_EXPR(STRING_DEX_CACHE_ELEMENT_SIZE, size_t, +DEFINE_EXPR(STRING_DEX_CACHE_ELEMENT_SIZE, int32_t, sizeof(art::mirror::StringDexCachePair))
\ No newline at end of file |