summaryrefslogtreecommitdiff
path: root/compiler/compiled_method.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2022-09-30 12:28:49 +0200
committer VladimĂ­r Marko <vmarko@google.com> 2022-10-03 07:06:53 +0000
commit467d570d3f4aceed70a66136814b965f48b3e4db (patch)
treeb118a5fc49a863a7e53a4b5ebc365bc2d5355856 /compiler/compiled_method.cc
parent1abcef8f7be84ea933bb1f61de01693babdcf549 (diff)
Refactor Thumb2 entrypoint adjustment handling.
Reduce dependencies on `compiled_method.h` in preparation for moving it to dex2oat/. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: run-gtests.sh Test: testrunner.py --target --optimizing Change-Id: I55ff807e0c7d729142b1a64a3a0b6c6267027dc3
Diffstat (limited to 'compiler/compiled_method.cc')
-rw-r--r--compiler/compiled_method.cc21
1 files changed, 2 insertions, 19 deletions
diff --git a/compiler/compiled_method.cc b/compiler/compiled_method.cc
index e7cdd6eec5..21d5ed927f 100644
--- a/compiler/compiled_method.cc
+++ b/compiler/compiled_method.cc
@@ -54,25 +54,8 @@ size_t CompiledCode::AlignCode(size_t offset, InstructionSet instruction_set) {
return RoundUp(offset, GetInstructionSetCodeAlignment(instruction_set));
}
-size_t CompiledCode::CodeDelta() const {
- return CodeDelta(GetInstructionSet());
-}
-
-size_t CompiledCode::CodeDelta(InstructionSet instruction_set) {
- switch (instruction_set) {
- case InstructionSet::kArm:
- case InstructionSet::kArm64:
- case InstructionSet::kX86:
- case InstructionSet::kX86_64:
- return 0;
- case InstructionSet::kThumb2: {
- // +1 to set the low-order bit so a BLX will switch to Thumb mode
- return 1;
- }
- default:
- LOG(FATAL) << "Unknown InstructionSet: " << instruction_set;
- UNREACHABLE();
- }
+size_t CompiledCode::GetEntryPointAdjustment() const {
+ return GetInstructionSetEntryPointAdjustment(GetInstructionSet());
}
const void* CompiledCode::CodePointer(const void* code_pointer, InstructionSet instruction_set) {