Skip to content

Commit

Permalink
Minor review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Jun 20, 2024
1 parent 0dfa4c8 commit e47f245
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/cpu/riscv/codeBuffer_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static bool emit_shared_trampolines(CodeBuffer* cb, CodeBuffer::SharedTrampoline
MacroAssembler masm(cb);

auto emit = [&](address dest, const CodeBuffer::Offsets &offsets) {
assert(cb->stubs()->remaining() >= MacroAssembler::max_patchable_far_call_stub_size(), "pre-allocated trampolines");
assert(cb->stubs()->remaining() >= MacroAssembler::NativeShortCall::trampoline_size, "pre-allocated trampolines");
LinkedListIterator<int> it(offsets.head());
int offset = *it.next();
address stub = __ emit_trampoline_stub(offset, dest);
Expand All @@ -71,7 +71,7 @@ static bool emit_shared_trampolines(CodeBuffer* cb, CodeBuffer::SharedTrampoline
};

assert(requests->number_of_entries() >= 1, "at least one");
const int total_requested_size = MacroAssembler::max_patchable_far_call_stub_size() * requests->number_of_entries();
const int total_requested_size = MacroAssembler::NativeShortCall::trampoline_size * requests->number_of_entries();
if (cb->stubs()->maybe_expand_to_ensure_remaining(total_requested_size) && cb->blob() == nullptr) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3928,7 +3928,7 @@ int MacroAssembler::max_patchable_far_call_stub_size() {
if (UseTrampolines) {
return instruction_size + MacroAssembler::NativeShortCall::trampoline_size;
}
return 2 * wordSize;
return instruction_size + wordSize;
}

int MacroAssembler::static_call_stub_size() {
Expand Down

0 comments on commit e47f245

Please sign in to comment.