summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2022-10-06 13:46:55 +0200
committer VladimĂ­r Marko <vmarko@google.com> 2022-10-06 15:02:53 +0000
commit8c5e881904c30de5dbc03536ea67bbe2d48088fd (patch)
treeb0bbf7c5120d7894d21131478640e6f7b8761975 /compiler/optimizing
parente1b8877890147b8572809266653677084e1a5112 (diff)
Remove `CompiledCode::CodePointer()`.
And clean up some related test helpers in preparation for moving `CompiledMethod` to dex2oat/. Test: m test-art-host-gtest Test: run-gtests.sh Change-Id: I13b42bfb4f6ee3a7f7f22bbc8d22203c5d56e00b
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/codegen_test_utils.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/optimizing/codegen_test_utils.h b/compiler/optimizing/codegen_test_utils.h
index 95cb548905..8e93f4d55a 100644
--- a/compiler/optimizing/codegen_test_utils.h
+++ b/compiler/optimizing/codegen_test_utils.h
@@ -254,15 +254,11 @@ static void Run(const InternalCodeAllocator& allocator,
Runtime* GetRuntime() override { return nullptr; }
};
CodeHolder code_holder;
- const void* code_ptr =
+ const void* method_code =
code_holder.MakeExecutable(allocator.GetMemory(), ArrayRef<const uint8_t>(), target_isa);
using fptr = Expected (*)();
- fptr f = reinterpret_cast<fptr>(reinterpret_cast<uintptr_t>(code_ptr));
- if (target_isa == InstructionSet::kThumb2) {
- // For thumb we need the bottom bit set.
- f = reinterpret_cast<fptr>(reinterpret_cast<uintptr_t>(f) + 1);
- }
+ fptr f = reinterpret_cast<fptr>(reinterpret_cast<uintptr_t>(method_code));
VerifyGeneratedCode(target_isa, f, has_result, expected);
}