diff options
author | 2022-02-10 18:32:01 -0800 | |
---|---|---|
committer | 2022-02-11 09:07:42 +0000 | |
commit | e86632457a2601bf89cd922dfc18431c674596ee (patch) | |
tree | 7c870634b056582d0165f140c7b59cd73b84f4cb | |
parent | d539f8674a7fc796f7e77b6ca72315d2cda15d13 (diff) |
Simplify GetNterpMethodHeader().
Reuse the existing function EntryPointToCodePointer() instead of
reimplementing it here.
Change-Id: If8de17428f0ff72249653c9cfb15f754a6ecd37d
-rw-r--r-- | runtime/oat_quick_method_header.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/oat_quick_method_header.cc b/runtime/oat_quick_method_header.cc index 639e9e8446..8fbf02abea 100644 --- a/runtime/oat_quick_method_header.cc +++ b/runtime/oat_quick_method_header.cc @@ -92,11 +92,9 @@ static inline OatQuickMethodHeader* GetNterpMethodHeader() { if (!interpreter::IsNterpSupported()) { return nullptr; } - uintptr_t nterp_entrypoint = reinterpret_cast<uintptr_t>(interpreter::GetNterpEntryPoint()); - uintptr_t nterp_code_pointer = (kRuntimeISA == InstructionSet::kArm) - // Remove the Thumb mode bit if present on ARM. - ? nterp_entrypoint & ~static_cast<uintptr_t>(1) - : nterp_entrypoint; + const void* nterp_entrypoint = interpreter::GetNterpEntryPoint(); + uintptr_t nterp_code_pointer = + reinterpret_cast<uintptr_t>(EntryPointToCodePointer(nterp_entrypoint)); return reinterpret_cast<OatQuickMethodHeader*>(nterp_code_pointer - sizeof(OatQuickMethodHeader)); } |