Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,11 @@ address MacroAssembler::ic_call(address entry, jint method_index) {
}

int MacroAssembler::ic_check_size() {
return NativeInstruction::instruction_size * 7;
if (target_needs_far_branch(CAST_FROM_FN_PTR(address, SharedRuntime::get_ic_miss_stub()))) {
return NativeInstruction::instruction_size * 7;
} else {
return NativeInstruction::instruction_size * 5;
}
}

int MacroAssembler::ic_check(int end_alignment) {
Expand Down Expand Up @@ -1137,6 +1141,8 @@ void MacroAssembler::align(int modulus) {
align(modulus, offset());
}

// Ensure that the code at target bytes offset from the current offset() is aligned
// according to modulus.
void MacroAssembler::align(int modulus, int target) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to document what this extra align function does.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I wrote a comment.

int delta = target - offset();
while ((offset() + delta) % modulus != 0) nop();
Expand Down