Revert^2 "Cleanup the code to determine instrumentation level"
This reverts commit cb8f8c12872d36304dbac80fbd08d8400a757fe5.
Reason for revert: Reland commit 21ef5a80704da06bdb2945be1c735ca86e8f1860 with fixes
Fixes:
In JITed code when we compare a bool variable
(instrumentation_stubs_installed_) we should use cmpb and not cmpw. This
wasn't caught earlier because the next three variables are bool which
are related to instrumentation are false when instrumentation is disabled.
Test: testrunner.py --host --redefine-stress -t 421-large-frame,
testrunner.py --host --redefine-stress -t 545-tracing-and-jit
Change-Id: Iba363fb62d0cb41bcbc86af202eae73a833ba267
diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc
index fe97c7f..2cf2571 100644
--- a/compiler/optimizing/code_generator_arm64.cc
+++ b/compiler/optimizing/code_generator_arm64.cc
@@ -1159,7 +1159,7 @@
uint64_t address = reinterpret_cast64<uint64_t>(Runtime::Current()->GetInstrumentation());
int offset = instrumentation::Instrumentation::NeedsEntryExitHooksOffset().Int32Value();
__ Mov(temp, address + offset);
- __ Ldrh(value, MemOperand(temp, 0));
+ __ Ldrb(value, MemOperand(temp, 0));
__ Cbnz(value, slow_path->GetEntryLabel());
__ Bind(slow_path->GetExitLabel());
}