From cf4035a4c41ccfcc3e89a0cee25f5218a11b0705 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 28 May 2014 22:43:01 -0700 Subject: ART: Use StackReference in Quick Stack Frame The method reference at the bottom of a quick frame is a stack reference and not a native pointer. This is important for 64b architectures, where the notions do not coincide. Change key methods to have StackReference* parameter instead of mirror::ArtMethod**. Make changes to invoke stubs for 64b archs, change the frame setup for JNI code (both generic JNI and compilers), tie up loose ends. Tested on x86 and x86-64 with host tests. On x86-64, tests succeed with jni compiler activated. x86-64 QCG was not tested. Tested on ARM32 with device tests. Fix ARM64 not saving x19 (used for wSUSPEND) on upcalls. Tested on ARM64 in interpreter-only + generic-jni mode. Fix ARM64 JNI Compiler to work with the CL. Tested on ARM64 in interpreter-only + jni compiler. Change-Id: I77931a0cbadd04d163b3eb8d6f6a6f8740578f13 --- runtime/quick_exception_handler.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/quick_exception_handler.h') diff --git a/runtime/quick_exception_handler.h b/runtime/quick_exception_handler.h index ef3766c0a6..2597ebd5c7 100644 --- a/runtime/quick_exception_handler.h +++ b/runtime/quick_exception_handler.h @@ -19,6 +19,7 @@ #include "base/logging.h" #include "base/mutex.h" +#include "stack.h" // StackReference namespace art { @@ -50,7 +51,7 @@ class QuickExceptionHandler { void UpdateInstrumentationStack() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); void DoLongJump() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - void SetHandlerQuickFrame(mirror::ArtMethod** handler_quick_frame) { + void SetHandlerQuickFrame(StackReference* handler_quick_frame) { handler_quick_frame_ = handler_quick_frame; } @@ -77,7 +78,7 @@ class QuickExceptionHandler { // Is method tracing active? const bool method_tracing_active_; // Quick frame with found handler or last frame if no handler found. - mirror::ArtMethod** handler_quick_frame_; + StackReference* handler_quick_frame_; // PC to branch to for the handler. uintptr_t handler_quick_frame_pc_; // Associated dex PC. -- cgit v1.2.3