Skip to content

Commit bbb027a

Browse files
liamappelbecommit-bot@chromium.org
authored andcommitted
[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: #36839 Change-Id: I98fef568c5eeee1391aa0e6299fb21890eebb396 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107827 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Liam Appelbe <liama@google.com>
1 parent 1db0b44 commit bbb027a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

runtime/vm/compiler/relocation.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,9 @@ void CodeRelocator::ScanCallTargets(const Code& code,
275275

276276
offset_into_target += (entry_point - destination_payload);
277277

278-
const intptr_t text_offset =
279-
code_text_offset + Instructions::HeaderSize() + offset;
278+
const intptr_t text_offset = code_text_offset +
279+
compiler::target::Instructions::HeaderSize() +
280+
offset;
280281
UnresolvedCall unresolved_call(code.raw(), offset, text_offset,
281282
destination_.raw(), offset_into_target);
282283
if (!TryResolveBackwardsCall(&unresolved_call)) {
@@ -502,7 +503,8 @@ intptr_t CodeRelocator::FindDestinationInText(
502503
const RawInstructions* destination,
503504
intptr_t offset_into_target) {
504505
auto destination_offset = text_offsets_.LookupValue(destination);
505-
return destination_offset + Instructions::HeaderSize() + offset_into_target;
506+
return destination_offset + compiler::target::Instructions::HeaderSize() +
507+
offset_into_target;
506508
}
507509

508510
#endif // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) && \

0 commit comments

Comments
 (0)