From bbb027aa2ac4ebbb0023227347c3e2d33661b80e Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 1 Jul 2019 21:54:39 +0000 Subject: [PATCH] [vm] Fix offset that was breaking bare_instructions_trampolines_test This was the last remaining test that differed between simarm and simarm_x64. All tests now produce the same results. Bug: https://github.com/dart-lang/sdk/issues/36839 Change-Id: I98fef568c5eeee1391aa0e6299fb21890eebb396 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107827 Reviewed-by: Siva Annamalai Commit-Queue: Liam Appelbe --- runtime/vm/compiler/relocation.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/vm/compiler/relocation.cc b/runtime/vm/compiler/relocation.cc index aec5b3e6d9b..af363e62ad5 100644 --- a/runtime/vm/compiler/relocation.cc +++ b/runtime/vm/compiler/relocation.cc @@ -275,8 +275,9 @@ void CodeRelocator::ScanCallTargets(const Code& code, offset_into_target += (entry_point - destination_payload); - const intptr_t text_offset = - code_text_offset + Instructions::HeaderSize() + offset; + const intptr_t text_offset = code_text_offset + + compiler::target::Instructions::HeaderSize() + + offset; UnresolvedCall unresolved_call(code.raw(), offset, text_offset, destination_.raw(), offset_into_target); if (!TryResolveBackwardsCall(&unresolved_call)) { @@ -502,7 +503,8 @@ intptr_t CodeRelocator::FindDestinationInText( const RawInstructions* destination, intptr_t offset_into_target) { auto destination_offset = text_offsets_.LookupValue(destination); - return destination_offset + Instructions::HeaderSize() + offset_into_target; + return destination_offset + compiler::target::Instructions::HeaderSize() + + offset_into_target; } #endif // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) && \