Refactor quick entrypoints
Remove FinishCalleeSaveFrameSetup.
Assembly routines write down anchor into TLS as well as placing runtime
method in callee save frame.
Simplify artSet64InstanceFromCode by not computing the referrer from the
stack in the C++ code.
Move assembly offset tests next to constant declaration and tidy arch_test.
Change-Id: Iededeebc05e54a1e2bb7bb3572b8ba012cffa1c8
diff --git a/runtime/entrypoints/quick/quick_lock_entrypoints.cc b/runtime/entrypoints/quick/quick_lock_entrypoints.cc
index 92c0841..8ceac97 100644
--- a/runtime/entrypoints/quick/quick_lock_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_lock_entrypoints.cc
@@ -20,12 +20,11 @@
namespace art {
-extern "C" int artLockObjectFromCode(mirror::Object* obj, Thread* self,
- StackReference<mirror::ArtMethod>* sp)
+extern "C" int artLockObjectFromCode(mirror::Object* obj, Thread* self)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
NO_THREAD_SAFETY_ANALYSIS /* EXCLUSIVE_LOCK_FUNCTION(Monitor::monitor_lock_) */ {
- FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
- if (UNLIKELY(obj == NULL)) {
+ ScopedQuickEntrypointChecks sqec(self);
+ if (UNLIKELY(obj == nullptr)) {
ThrowLocation throw_location(self->GetCurrentLocationForThrow());
ThrowNullPointerException(&throw_location,
"Null reference used for synchronization (monitor-enter)");
@@ -43,12 +42,11 @@
}
}
-extern "C" int artUnlockObjectFromCode(mirror::Object* obj, Thread* self,
- StackReference<mirror::ArtMethod>* sp)
+extern "C" int artUnlockObjectFromCode(mirror::Object* obj, Thread* self)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
NO_THREAD_SAFETY_ANALYSIS /* UNLOCK_FUNCTION(Monitor::monitor_lock_) */ {
- FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
- if (UNLIKELY(obj == NULL)) {
+ ScopedQuickEntrypointChecks sqec(self);
+ if (UNLIKELY(obj == nullptr)) {
ThrowLocation throw_location(self->GetCurrentLocationForThrow());
ThrowNullPointerException(&throw_location,
"Null reference used for synchronization (monitor-exit)");