diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/calling_convention.h | 2 | ||||
| -rw-r--r-- | src/calling_convention_arm.cc | 2 | ||||
| -rw-r--r-- | src/calling_convention_arm.h | 2 | ||||
| -rw-r--r-- | src/calling_convention_x86.cc | 2 | ||||
| -rw-r--r-- | src/calling_convention_x86.h | 2 | ||||
| -rw-r--r-- | src/context_arm.cc | 1 | ||||
| -rw-r--r-- | src/context_x86.cc | 4 | ||||
| -rw-r--r-- | src/jni_compiler.cc | 2 | ||||
| -rw-r--r-- | src/runtime_support.S | 1 | ||||
| -rw-r--r-- | src/runtime_support.h | 8 | ||||
| -rw-r--r-- | src/thread.cc | 7 |
11 files changed, 16 insertions, 17 deletions
diff --git a/src/calling_convention.h b/src/calling_convention.h index a1d1b32151..8f2a79c4f5 100644 --- a/src/calling_convention.h +++ b/src/calling_convention.h @@ -141,7 +141,7 @@ class JniCallingConvention : public CallingConvention { // Returns true if the method register will have been clobbered during argument // set up - virtual bool IsMethodRegisterCrushedPreCall() = 0; + virtual bool IsMethodRegisterClobberedPreCall() = 0; // Iterator interface bool HasNext(); diff --git a/src/calling_convention_arm.cc b/src/calling_convention_arm.cc index 6e664ca6ed..ed876f0dc6 100644 --- a/src/calling_convention_arm.cc +++ b/src/calling_convention_arm.cc @@ -171,7 +171,7 @@ size_t ArmJniCallingConvention::ReturnPcOffset() { } // Will reg be crushed by an outgoing argument? -bool ArmJniCallingConvention::IsMethodRegisterCrushedPreCall() { +bool ArmJniCallingConvention::IsMethodRegisterClobberedPreCall() { return true; // The method register R0 is always clobbered by the JNIEnv } diff --git a/src/calling_convention_arm.h b/src/calling_convention_arm.h index 4415254466..3d513fedbe 100644 --- a/src/calling_convention_arm.h +++ b/src/calling_convention_arm.h @@ -46,7 +46,7 @@ class ArmJniCallingConvention : public JniCallingConvention { virtual uint32_t FpSpillMask() const { return 0; // Floats aren't spilled in JNI down call } - virtual bool IsMethodRegisterCrushedPreCall(); + virtual bool IsMethodRegisterClobberedPreCall(); virtual bool IsCurrentParamInRegister(); virtual bool IsCurrentParamOnStack(); virtual ManagedRegister CurrentParamRegister(); diff --git a/src/calling_convention_x86.cc b/src/calling_convention_x86.cc index a8f5778ce4..9598647462 100644 --- a/src/calling_convention_x86.cc +++ b/src/calling_convention_x86.cc @@ -86,7 +86,7 @@ size_t X86JniCallingConvention::ReturnPcOffset() { return FrameSize() - kPointerSize; } -bool X86JniCallingConvention::IsMethodRegisterCrushedPreCall() { +bool X86JniCallingConvention::IsMethodRegisterClobberedPreCall() { return GetMethod()->IsSynchronized(); // Monitor enter crushes the method register } diff --git a/src/calling_convention_x86.h b/src/calling_convention_x86.h index 8c55472e52..c3bdc40f0d 100644 --- a/src/calling_convention_x86.h +++ b/src/calling_convention_x86.h @@ -49,7 +49,7 @@ class X86JniCallingConvention : public JniCallingConvention { virtual uint32_t FpSpillMask() const { return 0; } - virtual bool IsMethodRegisterCrushedPreCall(); + virtual bool IsMethodRegisterClobberedPreCall(); virtual bool IsCurrentParamInRegister(); virtual bool IsCurrentParamOnStack(); virtual ManagedRegister CurrentParamRegister(); diff --git a/src/context_arm.cc b/src/context_arm.cc index 85ada9d7f8..0d25278adc 100644 --- a/src/context_arm.cc +++ b/src/context_arm.cc @@ -9,6 +9,7 @@ namespace arm { ArmContext::ArmContext() { #ifndef NDEBUG + // Initialize registers with easy to spot debug values for (int i=0; i < 16; i++) { gprs_[i] = 0xEBAD6070+i; } diff --git a/src/context_x86.cc b/src/context_x86.cc index 04976a52fe..479b950b65 100644 --- a/src/context_x86.cc +++ b/src/context_x86.cc @@ -8,9 +8,13 @@ namespace art { namespace x86 { X86Context::X86Context() { +#ifndef NDEBUG + // Initialize registers with easy to spot debug values for (int i=0; i < 8; i++) { gprs_[i] = 0xEBAD6070+i; } + eip_ = 0xEBAD601F; +#endif } void X86Context::FillCalleeSaves(const Frame& fr) { diff --git a/src/jni_compiler.cc b/src/jni_compiler.cc index 9624246c82..4d454cfb46 100644 --- a/src/jni_compiler.cc +++ b/src/jni_compiler.cc @@ -273,7 +273,7 @@ void JniCompiler::Compile(Method* native_method) { } // 9. Plant call to native code associated with method - if (!jni_conv->IsMethodRegisterCrushedPreCall()) { + if (!jni_conv->IsMethodRegisterClobberedPreCall()) { // Method register shouldn't have been crushed by setting up outgoing // arguments __ Call(mr_conv->MethodRegister(), Method::NativeMethodOffset(), diff --git a/src/runtime_support.S b/src/runtime_support.S index 8b904b8ea4..5372742f7c 100644 --- a/src/runtime_support.S +++ b/src/runtime_support.S @@ -127,7 +127,6 @@ art_ushr_long: .global art_deliver_exception .extern artDeliverExceptionHelper - .extern _ZN3art6Thread5self_E /* * Called by managed code, saves callee saves and then calls artThrowExceptionHelper * that will place a mock Method* at the bottom of the stack. diff --git a/src/runtime_support.h b/src/runtime_support.h index 49153148f4..1f8da9154f 100644 --- a/src/runtime_support.h +++ b/src/runtime_support.h @@ -3,13 +3,15 @@ #ifndef ART_SRC_RUNTIME_SUPPORT_H_ #define ART_SRC_RUNTIME_SUPPORT_H_ +/* Helper for both JNI and regular compiled code */ +extern "C" void art_deliver_exception(void*); + #if defined(__arm__) /* Compiler helpers */ extern "C" uint64_t art_shl_long(uint64_t, uint32_t); extern "C" uint64_t art_shr_long(uint64_t, uint32_t); extern "C" uint64_t art_ushr_long(uint64_t, uint32_t); extern "C" void art_invoke_interface_trampoline(void*, void*, void*, void*); - extern "C" void art_deliver_exception(void*); /* Conversions */ extern "C" float __aeabi_i2f(int op1); // OP_INT_TO_FLOAT @@ -45,8 +47,4 @@ extern "C" long long __aeabi_lmul(long long op1, long long op2); #endif -#if defined(__i386__) -extern "C" void art_deliver_exception(void*); -#endif - #endif // ART_SRC_RUNTIME_SUPPORT_H_ diff --git a/src/thread.cc b/src/thread.cc index 92b3d4fd6c..69fb3ba1c1 100644 --- a/src/thread.cc +++ b/src/thread.cc @@ -312,11 +312,8 @@ void Thread::InitFunctionPointers() { pLdivmod = __aeabi_ldivmod; pLmul = __aeabi_lmul; pInvokeInterfaceTrampoline = art_invoke_interface_trampoline; - pDeliverException = art_deliver_exception; #endif -#if defined(__i386__) pDeliverException = art_deliver_exception; -#endif pF2l = F2L; pD2l = D2L; pAllocFromCode = Array::AllocFromCode; @@ -1304,8 +1301,8 @@ void Thread::DeliverException(Throwable* exception) { if (catch_finder.native_method_count_ == 1) { PopSirt(); } else { - // We only expect the stack crawl to have passed 1 native method as its terminated - // by a up call + // We only expect the stack crawl to have passed 1 native method as it's terminated + // by an up call DCHECK_EQ(catch_finder.native_method_count_, 0u); } long_jump_context->SetSP(reinterpret_cast<intptr_t>(catch_finder.handler_frame_.GetSP())); |