diff options
Diffstat (limited to 'runtime/arch')
20 files changed, 55 insertions, 136 deletions
diff --git a/runtime/arch/arm/asm_support_arm.S b/runtime/arch/arm/asm_support_arm.S index a3e3b21..fb6458c 100644 --- a/runtime/arch/arm/asm_support_arm.S +++ b/runtime/arch/arm/asm_support_arm.S @@ -42,18 +42,6 @@ .fnstart .endm -.macro ENTRY_NO_HIDE name - .thumb_func - .type \name, #function - .global \name - /* Cache alignment for function entry */ - .balign 16 -\name: - .cfi_startproc - .fnstart -.endm - - .macro ARM_ENTRY name .arm .type \name, #function @@ -68,19 +56,6 @@ .fnstart .endm -.macro ARM_ENTRY_NO_HIDE name - .arm - .type \name, #function - .global \name - /* Cache alignment for function entry */ - .balign 16 -\name: - .cfi_startproc - /* Ensure we get a sane starting CFA. */ - .cfi_def_cfa sp,0 - .fnstart -.endm - .macro END name .fnend .cfi_endproc diff --git a/runtime/arch/arm/entrypoints_init_arm.cc b/runtime/arch/arm/entrypoints_init_arm.cc index 2780d1b..ff0eb4a 100644 --- a/runtime/arch/arm/entrypoints_init_arm.cc +++ b/runtime/arch/arm/entrypoints_init_arm.cc @@ -21,17 +21,11 @@ #include "entrypoints/quick/quick_entrypoints.h" #include "entrypoints/entrypoint_utils.h" #include "entrypoints/math_entrypoints.h" +#include "entrypoints/runtime_asm_entrypoints.h" +#include "interpreter/interpreter.h" namespace art { -// Interpreter entrypoints. -extern "C" void artInterpreterToInterpreterBridge(Thread* self, MethodHelper& mh, - const DexFile::CodeItem* code_item, - ShadowFrame* shadow_frame, JValue* result); -extern "C" void artInterpreterToCompiledCodeBridge(Thread* self, MethodHelper& mh, - const DexFile::CodeItem* code_item, - ShadowFrame* shadow_frame, JValue* result); - // Portable entrypoints. extern "C" void art_portable_resolution_trampoline(mirror::ArtMethod*); extern "C" void art_portable_to_interpreter_bridge(mirror::ArtMethod*); diff --git a/runtime/arch/arm/arm_sdiv.S b/runtime/arch/arm/instruction_set_features_arm.S index babdbf5..c26f2cd 100644 --- a/runtime/arch/arm/arm_sdiv.S +++ b/runtime/arch/arm/instruction_set_features_arm.S @@ -1,15 +1,29 @@ +/* + * Copyright (C) 2014 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_arm.S" + +.section .text // This function is used to check for the CPU's support for the sdiv // instruction at runtime. It will either return the value 1 or // will cause an invalid instruction trap (SIGILL signal). The // caller must arrange for the signal handler to set the r0 // register to 0 and move the pc forward by 4 bytes (to skip // the invalid instruction). - - -#include "asm_support_arm.S" - -.section .text -ENTRY_NO_HIDE CheckForARMSDIVInstruction +ENTRY artCheckForARMSDIVInstruction mov r1,#1 // depending on the architecture, the assembler will not allow an // sdiv instruction, so we will have to output the bytes directly. @@ -21,4 +35,4 @@ ENTRY_NO_HIDE CheckForARMSDIVInstruction // It will have 0 otherwise (set by the signal handler) // the value is just returned from this function. bx lr - END CheckForARMSDIVInstruction +END artCheckForARMSDIVInstruction diff --git a/runtime/arch/arm/portable_entrypoints_arm.S b/runtime/arch/arm/portable_entrypoints_arm.S index 3491c18..a34db6c 100644 --- a/runtime/arch/arm/portable_entrypoints_arm.S +++ b/runtime/arch/arm/portable_entrypoints_arm.S @@ -138,7 +138,7 @@ ENTRY art_portable_resolution_trampoline END art_portable_resolution_trampoline .extern artPortableToInterpreterBridge -ENTRY_NO_HIDE art_portable_to_interpreter_bridge +ENTRY art_portable_to_interpreter_bridge @ Fake callee save ref and args frame set up, note portable doesn't use callee save frames. @ TODO: just save the registers that are needed in artPortableToInterpreterBridge. push {r1-r3, r5-r8, r10-r11, lr} @ 10 words of callee saves @@ -165,3 +165,5 @@ ENTRY_NO_HIDE art_portable_to_interpreter_bridge .cfi_adjust_cfa_offset -48 bx lr @ return END art_portable_to_interpreter_bridge + +UNIMPLEMENTED art_portable_imt_conflict_trampoline diff --git a/runtime/arch/arm/quick_entrypoints_arm.S b/runtime/arch/arm/quick_entrypoints_arm.S index 466e9eb..3d619be 100644 --- a/runtime/arch/arm/quick_entrypoints_arm.S +++ b/runtime/arch/arm/quick_entrypoints_arm.S @@ -919,7 +919,7 @@ END art_quick_resolution_trampoline /* * Called to do a generic JNI down-call */ -ENTRY_NO_HIDE art_quick_generic_jni_trampoline +ENTRY art_quick_generic_jni_trampoline SETUP_REF_AND_ARGS_CALLEE_SAVE_FRAME str r0, [sp, #0] // Store native ArtMethod* to bottom of stack. @@ -1014,7 +1014,7 @@ ENTRY_NO_HIDE art_quick_generic_jni_trampoline END art_quick_generic_jni_trampoline .extern artQuickToInterpreterBridge -ENTRY_NO_HIDE art_quick_to_interpreter_bridge +ENTRY art_quick_to_interpreter_bridge SETUP_REF_AND_ARGS_CALLEE_SAVE_FRAME mov r1, r9 @ pass Thread::Current mov r2, sp @ pass SP diff --git a/runtime/arch/arm64/asm_support_arm64.S b/runtime/arch/arm64/asm_support_arm64.S index fb49460..b3e9242 100644 --- a/runtime/arch/arm64/asm_support_arm64.S +++ b/runtime/arch/arm64/asm_support_arm64.S @@ -52,15 +52,6 @@ .cfi_startproc .endm -.macro ENTRY_NO_HIDE name - .type \name, #function - .global \name - /* Cache alignment for function entry */ - .balign 16 -\name: - .cfi_startproc -.endm - .macro END name .cfi_endproc .size \name, .-\name @@ -72,10 +63,4 @@ END \name .endm -.macro UNIMPLEMENTED_NO_HIDE name - ENTRY_NO_HIDE \name - brk 0 - END \name -.endm - #endif // ART_RUNTIME_ARCH_ARM64_ASM_SUPPORT_ARM64_S_ diff --git a/runtime/arch/arm64/entrypoints_init_arm64.cc b/runtime/arch/arm64/entrypoints_init_arm64.cc index 70e93b3..871e1d1 100644 --- a/runtime/arch/arm64/entrypoints_init_arm64.cc +++ b/runtime/arch/arm64/entrypoints_init_arm64.cc @@ -20,17 +20,11 @@ #include "entrypoints/quick/quick_entrypoints.h" #include "entrypoints/entrypoint_utils.h" #include "entrypoints/math_entrypoints.h" +#include "entrypoints/runtime_asm_entrypoints.h" +#include "interpreter/interpreter.h" namespace art { -// Interpreter entrypoints. -extern "C" void artInterpreterToInterpreterBridge(Thread* self, MethodHelper& mh, - const DexFile::CodeItem* code_item, - ShadowFrame* shadow_frame, JValue* result); -extern "C" void artInterpreterToCompiledCodeBridge(Thread* self, MethodHelper& mh, - const DexFile::CodeItem* code_item, - ShadowFrame* shadow_frame, JValue* result); - // Portable entrypoints. extern "C" void art_portable_resolution_trampoline(mirror::ArtMethod*); extern "C" void art_portable_to_interpreter_bridge(mirror::ArtMethod*); diff --git a/runtime/arch/arm64/portable_entrypoints_arm64.S b/runtime/arch/arm64/portable_entrypoints_arm64.S index 41711b5..9e2c030 100644 --- a/runtime/arch/arm64/portable_entrypoints_arm64.S +++ b/runtime/arch/arm64/portable_entrypoints_arm64.S @@ -25,4 +25,6 @@ UNIMPLEMENTED art_portable_proxy_invoke_handler UNIMPLEMENTED art_portable_resolution_trampoline -UNIMPLEMENTED_NO_HIDE art_portable_to_interpreter_bridge +UNIMPLEMENTED art_portable_to_interpreter_bridge + +UNIMPLEMENTED art_portable_imt_conflict_trampoline diff --git a/runtime/arch/arm64/quick_entrypoints_arm64.S b/runtime/arch/arm64/quick_entrypoints_arm64.S index 52a2a88..ab9bf2d 100644 --- a/runtime/arch/arm64/quick_entrypoints_arm64.S +++ b/runtime/arch/arm64/quick_entrypoints_arm64.S @@ -1438,7 +1438,7 @@ END art_quick_resolution_trampoline /* * Called to do a generic JNI down-call */ -ENTRY_NO_HIDE art_quick_generic_jni_trampoline +ENTRY art_quick_generic_jni_trampoline SETUP_REF_AND_ARGS_CALLEE_SAVE_FRAME_INTERNAL str x0, [sp, #0] // Store native ArtMethod* to bottom of stack. @@ -1534,7 +1534,7 @@ END art_quick_generic_jni_trampoline * x0 = method being called/to bridge to. * x1..x7, d0..d7 = arguments to that method. */ -ENTRY_NO_HIDE art_quick_to_interpreter_bridge +ENTRY art_quick_to_interpreter_bridge SETUP_REF_AND_ARGS_CALLEE_SAVE_FRAME // Set up frame and save arguments. // x0 will contain mirror::ArtMethod* method. diff --git a/runtime/arch/mips/entrypoints_init_mips.cc b/runtime/arch/mips/entrypoints_init_mips.cc index 25e911d..db0f71f 100644 --- a/runtime/arch/mips/entrypoints_init_mips.cc +++ b/runtime/arch/mips/entrypoints_init_mips.cc @@ -14,6 +14,7 @@ * limitations under the License. */ +#include "atomic.h" #include "entrypoints/interpreter/interpreter_entrypoints.h" #include "entrypoints/jni/jni_entrypoints.h" #include "entrypoints/portable/portable_entrypoints.h" @@ -21,18 +22,11 @@ #include "entrypoints/quick/quick_entrypoints.h" #include "entrypoints/entrypoint_utils.h" #include "entrypoints/math_entrypoints.h" -#include "atomic.h" +#include "entrypoints/runtime_asm_entrypoints.h" +#include "interpreter/interpreter.h" namespace art { -// Interpreter entrypoints. -extern "C" void artInterpreterToInterpreterBridge(Thread* self, MethodHelper& mh, - const DexFile::CodeItem* code_item, - ShadowFrame* shadow_frame, JValue* result); -extern "C" void artInterpreterToCompiledCodeBridge(Thread* self, MethodHelper& mh, - const DexFile::CodeItem* code_item, - ShadowFrame* shadow_frame, JValue* result); - // Portable entrypoints. extern "C" void art_portable_resolution_trampoline(mirror::ArtMethod*); extern "C" void art_portable_to_interpreter_bridge(mirror::ArtMethod*); diff --git a/runtime/arch/mips/portable_entrypoints_mips.S b/runtime/arch/mips/portable_entrypoints_mips.S index 7545ce0..a171a1d 100644 --- a/runtime/arch/mips/portable_entrypoints_mips.S +++ b/runtime/arch/mips/portable_entrypoints_mips.S @@ -131,3 +131,4 @@ END art_portable_invoke_stub UNIMPLEMENTED art_portable_resolution_trampoline UNIMPLEMENTED art_portable_to_interpreter_bridge +UNIMPLEMENTED art_portable_imt_conflict_trampoline diff --git a/runtime/arch/stub_test.cc b/runtime/arch/stub_test.cc index 6b74a1b..c9b9f04 100644 --- a/runtime/arch/stub_test.cc +++ b/runtime/arch/stub_test.cc @@ -260,7 +260,7 @@ class StubTest : public CommonRuntimeTest { "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31", "memory"); // clobber. -#elif defined(__x86_64__) && !defined(__APPLE__) +#elif defined(__x86_64__) && !defined(__APPLE__) && defined(__clang__) // Note: Uses the native convention // TODO: Set the thread? __asm__ __volatile__( @@ -485,7 +485,7 @@ class StubTest : public CommonRuntimeTest { "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31", "memory"); // clobber. -#elif defined(__x86_64__) && !defined(__APPLE__) +#elif defined(__x86_64__) && !defined(__APPLE__) && defined(__clang__) // Note: Uses the native convention // TODO: Set the thread? __asm__ __volatile__( diff --git a/runtime/arch/x86/asm_support_x86.S b/runtime/arch/x86/asm_support_x86.S index efbbfb3..78b97e5 100644 --- a/runtime/arch/x86/asm_support_x86.S +++ b/runtime/arch/x86/asm_support_x86.S @@ -135,16 +135,6 @@ VAR(c_name, 0): CFI_DEF_CFA(esp, 4) END_MACRO -MACRO1(DEFINE_FUNCTION_NO_HIDE, c_name) - FUNCTION_TYPE(\c_name, 0) - .globl VAR(c_name, 0) - ALIGN_FUNCTION_ENTRY -VAR(c_name, 0): - CFI_STARTPROC - // Ensure we get a sane starting CFA. - CFI_DEF_CFA(esp, 4) -END_MACRO - MACRO1(END_FUNCTION, c_name) CFI_ENDPROC SIZE(\c_name, 0) diff --git a/runtime/arch/x86/entrypoints_init_x86.cc b/runtime/arch/x86/entrypoints_init_x86.cc index 682c502..f2b91cd 100644 --- a/runtime/arch/x86/entrypoints_init_x86.cc +++ b/runtime/arch/x86/entrypoints_init_x86.cc @@ -19,18 +19,11 @@ #include "entrypoints/portable/portable_entrypoints.h" #include "entrypoints/quick/quick_alloc_entrypoints.h" #include "entrypoints/quick/quick_entrypoints.h" -#include "entrypoints/entrypoint_utils.h" +#include "entrypoints/runtime_asm_entrypoints.h" +#include "interpreter/interpreter.h" namespace art { -// Interpreter entrypoints. -extern "C" void artInterpreterToInterpreterBridge(Thread* self, MethodHelper& mh, - const DexFile::CodeItem* code_item, - ShadowFrame* shadow_frame, JValue* result); -extern "C" void artInterpreterToCompiledCodeBridge(Thread* self, MethodHelper& mh, - const DexFile::CodeItem* code_item, - ShadowFrame* shadow_frame, JValue* result); - // Portable entrypoints. extern "C" void art_portable_resolution_trampoline(mirror::ArtMethod*); extern "C" void art_portable_to_interpreter_bridge(mirror::ArtMethod*); diff --git a/runtime/arch/x86/portable_entrypoints_x86.S b/runtime/arch/x86/portable_entrypoints_x86.S index f5fe869..70c0ae2 100644 --- a/runtime/arch/x86/portable_entrypoints_x86.S +++ b/runtime/arch/x86/portable_entrypoints_x86.S @@ -111,7 +111,7 @@ DEFINE_FUNCTION art_portable_resolution_trampoline ret END_FUNCTION art_portable_resolution_trampoline -DEFINE_FUNCTION_NO_HIDE art_portable_to_interpreter_bridge +DEFINE_FUNCTION art_portable_to_interpreter_bridge PUSH ebp // Set up frame. movl %esp, %ebp CFI_DEF_CFA_REGISTER(%ebp) @@ -127,3 +127,5 @@ DEFINE_FUNCTION_NO_HIDE art_portable_to_interpreter_bridge CFI_DEF_CFA(%esp, 4) ret END_FUNCTION art_portable_to_interpreter_bridge + +UNIMPLEMENTED art_portable_imt_conflict_trampoline diff --git a/runtime/arch/x86/quick_entrypoints_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S index 411d273..a158e6d 100644 --- a/runtime/arch/x86/quick_entrypoints_x86.S +++ b/runtime/arch/x86/quick_entrypoints_x86.S @@ -1140,7 +1140,7 @@ DEFINE_FUNCTION art_quick_resolution_trampoline DELIVER_PENDING_EXCEPTION END_FUNCTION art_quick_resolution_trampoline -DEFINE_FUNCTION_NO_HIDE art_quick_generic_jni_trampoline +DEFINE_FUNCTION art_quick_generic_jni_trampoline SETUP_REF_AND_ARGS_CALLEE_SAVE_FRAME // This also stores the native ArtMethod reference at the bottom of the stack. @@ -1220,7 +1220,7 @@ DEFINE_FUNCTION_NO_HIDE art_quick_generic_jni_trampoline DELIVER_PENDING_EXCEPTION END_FUNCTION art_quick_generic_jni_trampoline -DEFINE_FUNCTION_NO_HIDE art_quick_to_interpreter_bridge +DEFINE_FUNCTION art_quick_to_interpreter_bridge SETUP_REF_AND_ARGS_CALLEE_SAVE_FRAME // save frame mov %esp, %edx // remember SP PUSH eax // alignment padding diff --git a/runtime/arch/x86_64/asm_support_x86_64.S b/runtime/arch/x86_64/asm_support_x86_64.S index 4ae61a2..5964314 100644 --- a/runtime/arch/x86_64/asm_support_x86_64.S +++ b/runtime/arch/x86_64/asm_support_x86_64.S @@ -132,16 +132,6 @@ VAR(c_name, 0): CFI_DEF_CFA(rsp, 8) END_MACRO -MACRO1(DEFINE_FUNCTION_NO_HIDE, c_name) - FUNCTION_TYPE(\c_name, 0) - .globl VAR(c_name, 0) - ALIGN_FUNCTION_ENTRY -VAR(c_name, 0): - CFI_STARTPROC - // Ensure we get a sane starting CFA. - CFI_DEF_CFA(rsp, 8) -END_MACRO - MACRO1(END_FUNCTION, c_name) CFI_ENDPROC SIZE(\c_name, 0) @@ -172,18 +162,6 @@ VAR(name, 0): SIZE(\name, 0) END_MACRO -MACRO1(UNIMPLEMENTED_NO_HIDE,name) - FUNCTION_TYPE(\name, 0) - .globl VAR(name, 0) - ALIGN_FUNCTION_ENTRY -VAR(name, 0): - CFI_STARTPROC - int3 - int3 - CFI_ENDPROC - SIZE(\name, 0) -END_MACRO - MACRO0(UNREACHABLE) int3 END_MACRO diff --git a/runtime/arch/x86_64/entrypoints_init_x86_64.cc b/runtime/arch/x86_64/entrypoints_init_x86_64.cc index c9028e1..be73594 100644 --- a/runtime/arch/x86_64/entrypoints_init_x86_64.cc +++ b/runtime/arch/x86_64/entrypoints_init_x86_64.cc @@ -19,19 +19,12 @@ #include "entrypoints/portable/portable_entrypoints.h" #include "entrypoints/quick/quick_alloc_entrypoints.h" #include "entrypoints/quick/quick_entrypoints.h" -#include "entrypoints/entrypoint_utils.h" #include "entrypoints/math_entrypoints.h" +#include "entrypoints/runtime_asm_entrypoints.h" +#include "interpreter/interpreter.h" namespace art { -// Interpreter entrypoints. -extern "C" void artInterpreterToInterpreterBridge(Thread* self, MethodHelper& mh, - const DexFile::CodeItem* code_item, - ShadowFrame* shadow_frame, JValue* result); -extern "C" void artInterpreterToCompiledCodeBridge(Thread* self, MethodHelper& mh, - const DexFile::CodeItem* code_item, - ShadowFrame* shadow_frame, JValue* result); - // Portable entrypoints. extern "C" void art_portable_resolution_trampoline(mirror::ArtMethod*); extern "C" void art_portable_to_interpreter_bridge(mirror::ArtMethod*); diff --git a/runtime/arch/x86_64/portable_entrypoints_x86_64.S b/runtime/arch/x86_64/portable_entrypoints_x86_64.S index 7b84d17..3a54005 100644 --- a/runtime/arch/x86_64/portable_entrypoints_x86_64.S +++ b/runtime/arch/x86_64/portable_entrypoints_x86_64.S @@ -25,4 +25,6 @@ UNIMPLEMENTED art_portable_proxy_invoke_handler UNIMPLEMENTED art_portable_resolution_trampoline -UNIMPLEMENTED_NO_HIDE art_portable_to_interpreter_bridge +UNIMPLEMENTED art_portable_to_interpreter_bridge + +UNIMPLEMENTED art_portable_imt_conflict_trampoline diff --git a/runtime/arch/x86_64/quick_entrypoints_x86_64.S b/runtime/arch/x86_64/quick_entrypoints_x86_64.S index ca9c0bf..648a99a 100644 --- a/runtime/arch/x86_64/quick_entrypoints_x86_64.S +++ b/runtime/arch/x86_64/quick_entrypoints_x86_64.S @@ -1266,7 +1266,7 @@ END_FUNCTION art_quick_resolution_trampoline /* * Called to do a generic JNI down-call */ -DEFINE_FUNCTION_NO_HIDE art_quick_generic_jni_trampoline +DEFINE_FUNCTION art_quick_generic_jni_trampoline // Save callee and GPR args, mixed together to agree with core spills bitmap. PUSH r15 // Callee save. PUSH r14 // Callee save. @@ -1453,7 +1453,7 @@ END_FUNCTION art_quick_generic_jni_trampoline * RDI = method being called / to bridge to. * RSI, RDX, RCX, R8, R9 are arguments to that method. */ -DEFINE_FUNCTION_NO_HIDE art_quick_to_interpreter_bridge +DEFINE_FUNCTION art_quick_to_interpreter_bridge SETUP_REF_AND_ARGS_CALLEE_SAVE_FRAME // Set up frame and save arguments. movq %gs:THREAD_SELF_OFFSET, %rsi // RSI := Thread::Current() movq %rsp, %rdx // RDX := sp |