diff options
author | Elliott Hughes <enh@google.com> | 2014-12-11 14:34:28 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-12-12 09:33:34 -0800 |
commit | 956af0f0cb05422e38c1d22cbef309d16b8a1a12 (patch) | |
tree | b558c804d206dad8da648b815750f1b3c97610ae /runtime/arch/x86 | |
parent | 407d77f344cfbdbbfb50531c5f0766bc0892e2fe (diff) | |
download | art-956af0f0cb05422e38c1d22cbef309d16b8a1a12.zip art-956af0f0cb05422e38c1d22cbef309d16b8a1a12.tar.gz art-956af0f0cb05422e38c1d22cbef309d16b8a1a12.tar.bz2 |
Remove portable.
Change-Id: I3bf3250fa866fd2265f1b115d52fa5dedc48a7fc
Diffstat (limited to 'runtime/arch/x86')
-rw-r--r-- | runtime/arch/x86/entrypoints_init_x86.cc | 7 | ||||
-rw-r--r-- | runtime/arch/x86/portable_entrypoints_x86.S | 131 |
2 files changed, 1 insertions, 137 deletions
diff --git a/runtime/arch/x86/entrypoints_init_x86.cc b/runtime/arch/x86/entrypoints_init_x86.cc index a121542..2ac5279 100644 --- a/runtime/arch/x86/entrypoints_init_x86.cc +++ b/runtime/arch/x86/entrypoints_init_x86.cc @@ -16,7 +16,6 @@ #include "entrypoints/interpreter/interpreter_entrypoints.h" #include "entrypoints/jni/jni_entrypoints.h" -#include "entrypoints/portable/portable_entrypoints.h" #include "entrypoints/quick/quick_alloc_entrypoints.h" #include "entrypoints/quick/quick_default_externs.h" #include "entrypoints/quick/quick_entrypoints.h" @@ -34,7 +33,7 @@ extern "C" double art_quick_fmod(double, double); extern "C" float art_quick_fmodf(float, float); void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, - PortableEntryPoints* ppoints, QuickEntryPoints* qpoints) { + QuickEntryPoints* qpoints) { // Interpreter ipoints->pInterpreterToInterpreterBridge = artInterpreterToInterpreterBridge; ipoints->pInterpreterToCompiledCodeBridge = artInterpreterToCompiledCodeBridge; @@ -42,10 +41,6 @@ void InitEntryPoints(InterpreterEntryPoints* ipoints, JniEntryPoints* jpoints, // JNI jpoints->pDlsymLookup = art_jni_dlsym_lookup_stub; - // Portable - ppoints->pPortableResolutionTrampoline = art_portable_resolution_trampoline; - ppoints->pPortableToInterpreterBridge = art_portable_to_interpreter_bridge; - // Alloc ResetQuickAllocEntryPoints(qpoints); diff --git a/runtime/arch/x86/portable_entrypoints_x86.S b/runtime/arch/x86/portable_entrypoints_x86.S deleted file mode 100644 index 1f0900e..0000000 --- a/runtime/arch/x86/portable_entrypoints_x86.S +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "asm_support_x86.S" - - /* - * Portable invocation stub. - * On entry: - * [sp] = return address - * [sp + 4] = method pointer - * [sp + 8] = argument array or NULL for no argument methods - * [sp + 12] = size of argument array in bytes - * [sp + 16] = (managed) thread pointer - * [sp + 20] = JValue* result - * [sp + 24] = result type char - */ -DEFINE_FUNCTION art_portable_invoke_stub - PUSH ebp // save ebp - PUSH ebx // save ebx - mov %esp, %ebp // copy value of stack pointer into base pointer - CFI_DEF_CFA_REGISTER(ebp) - mov 20(%ebp), %ebx // get arg array size - addl LITERAL(28), %ebx // reserve space for return addr, method*, ebx, and ebp in frame - andl LITERAL(0xFFFFFFF0), %ebx // align frame size to 16 bytes - subl LITERAL(12), %ebx // remove space for return address, ebx, and ebp - subl %ebx, %esp // reserve stack space for argument array - SETUP_GOT_NOSAVE ebx // reset ebx to GOT table - lea 4(%esp), %eax // use stack pointer + method ptr as dest for memcpy - pushl 20(%ebp) // push size of region to memcpy - pushl 16(%ebp) // push arg array as source of memcpy - pushl %eax // push stack pointer as destination of memcpy - call PLT_SYMBOL(memcpy) // (void*, const void*, size_t) - addl LITERAL(12), %esp // pop arguments to memcpy - mov 12(%ebp), %eax // move method pointer into eax - mov %eax, (%esp) // push method pointer onto stack - call *MIRROR_ART_METHOD_PORTABLE_CODE_OFFSET_32(%eax) // call the method - mov %ebp, %esp // restore stack pointer - POP ebx // pop ebx - POP ebp // pop ebp - mov 20(%esp), %ecx // get result pointer - cmpl LITERAL(68), 24(%esp) // test if result type char == 'D' - je .Lreturn_double_portable - cmpl LITERAL(70), 24(%esp) // test if result type char == 'F' - je .Lreturn_float_portable - mov %eax, (%ecx) // store the result - mov %edx, 4(%ecx) // store the other half of the result - ret -.Lreturn_double_portable: - fstpl (%ecx) // store the floating point result as double - ret -.Lreturn_float_portable: - fstps (%ecx) // store the floating point result as float - ret -END_FUNCTION art_portable_invoke_stub - -DEFINE_FUNCTION art_portable_proxy_invoke_handler - PUSH ebp // Set up frame. - movl %esp, %ebp - CFI_DEF_CFA_REGISTER(%ebp) - subl LITERAL(8), %esp // Align stack - leal 8(%ebp), %edx // %edx = ArtMethod** called_addr - movl 12(%ebp), %ecx // %ecx = receiver - movl 0(%edx), %eax // %eax = ArtMethod* called - pushl %edx // Pass called_addr. - pushl %fs:THREAD_SELF_OFFSET // Pass thread. - pushl %ecx // Pass receiver. - pushl %eax // Pass called. - call SYMBOL(artPortableProxyInvokeHandler) // (called, receiver, Thread*, &called) - leave - CFI_RESTORE(%ebp) - CFI_DEF_CFA(%esp, 4) - movd %eax, %xmm0 // Place return value also into floating point return value. - movd %edx, %xmm1 - punpckldq %xmm1, %xmm0 - ret -END_FUNCTION art_portable_proxy_invoke_handler - -DEFINE_FUNCTION art_portable_resolution_trampoline - PUSH ebp // Set up frame. - movl %esp, %ebp - CFI_DEF_CFA_REGISTER(%ebp) - subl LITERAL(8), %esp // Align stack - leal 8(%ebp), %edx // %edx = ArtMethod** called_addr - movl 12(%ebp), %ecx // %ecx = receiver - movl 0(%edx), %eax // %eax = ArtMethod* called - pushl %edx // Pass called_addr. - pushl %fs:THREAD_SELF_OFFSET // Pass thread. - pushl %ecx // Pass receiver. - pushl %eax // Pass called. - call SYMBOL(artPortableResolutionTrampoline) // (called, receiver, Thread*, &called) - leave - CFI_RESTORE(%ebp) - CFI_DEF_CFA(%esp, 4) - testl %eax, %eax - jz .Lresolve_fail - jmp * %eax -.Lresolve_fail: // Resolution failed, return with exception pending. - ret -END_FUNCTION art_portable_resolution_trampoline - -DEFINE_FUNCTION art_portable_to_interpreter_bridge - PUSH ebp // Set up frame. - movl %esp, %ebp - CFI_DEF_CFA_REGISTER(%ebp) - subl LITERAL(12), %esp // Align stack - leal 8(%ebp), %edx // %edx = ArtMethod** called_addr - movl 0(%edx), %eax // %eax = ArtMethod* called - pushl %edx // Pass called_addr. - pushl %fs:THREAD_SELF_OFFSET // Pass thread. - pushl %eax // Pass called. - call SYMBOL(artPortableToInterpreterBridge) // (called, Thread*, &called) - leave - CFI_RESTORE(%ebp) - CFI_DEF_CFA(%esp, 4) - ret -END_FUNCTION art_portable_to_interpreter_bridge - -UNIMPLEMENTED art_portable_imt_conflict_trampoline |