Skip to content

Commit

Permalink
Missed in merge-fixes, minor revert
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Jun 24, 2024
1 parent ea013d0 commit 77e5d85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 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::NativeShortCall::trampoline_size, "pre-allocated trampolines");
assert(cb->stubs()->remaining() >= MacroAssembler::max_patchable_far_call_stub_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::NativeShortCall::trampoline_size * requests->number_of_entries();
const int total_requested_size = MacroAssembler::max_patchable_far_call_stub_size() * requests->number_of_entries();
if (cb->stubs()->maybe_expand_to_ensure_remaining(total_requested_size) && cb->blob() == nullptr) {
return false;
}
Expand Down
10 changes: 1 addition & 9 deletions src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3715,15 +3715,7 @@ bool MacroAssembler::lookup_secondary_supers_table(Register r_sub_klass,
// The next slot to be inspected, by the stub we're about to call,
// is secondary_supers[r_array_index]. Bits 0 and 1 in the bitmap
// have been checked.
Address stub = RuntimeAddress(StubRoutines::lookup_secondary_supers_table_slow_path_stub());
if (stub_is_near) {
jump_link(stub, t0);
} else {
address call = trampoline_call(stub);
if (call == nullptr) {
return false; // trampoline allocation failed
}
}
rt_call(StubRoutines::lookup_secondary_supers_table_slow_path_stub());

BLOCK_COMMENT("} lookup_secondary_supers_table");

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/riscv/riscv.ad
Original file line number Diff line number Diff line change
Expand Up @@ -10127,7 +10127,7 @@ instruct partialSubtypeCheckConstSuper(iRegP_R14 sub, iRegP_R10 super_reg, immP
$tmpR11$$Register, $tmpR12$$Register, $tmpR13$$Register,
$tmpR16$$Register, super_klass_slot);
} else {
address call = __ trampoline_call(RuntimeAddress(StubRoutines::lookup_secondary_supers_table_stub(super_klass_slot)));
address call = __ patchable_far_call(RuntimeAddress(StubRoutines::lookup_secondary_supers_table_stub(super_klass_slot)));
success = (call != nullptr);
}
if (!success) {
Expand Down

0 comments on commit 77e5d85

Please sign in to comment.