Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Jun 25, 2024
1 parent 77e5d85 commit ea57c42
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/hotspot/cpu/riscv/compiledIC_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ int CompiledDirectCall::to_interp_stub_size() {
}

int CompiledDirectCall::to_trampoline_stub_size() {
// Somewhat pessimistically, we count 4 instructions here (although
// there are only 3) because we sometimes emit an alignment nop.
// We count instructions and an additional alignment nop.
// Trampoline stubs are always word aligned.
return MacroAssembler::max_patchable_far_call_stub_size();
}
Expand Down
11 changes: 11 additions & 0 deletions src/hotspot/cpu/riscv/nativeInst_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ bool NativeInstruction::is_call_at(address addr) {

//-----------------------------------------------------------------------------
// NativeShortCallTrampoline
//
// Implements the trampoline part of patchable far call - trampoline call.

class NativeShortCall;

class NativeShortCallTrampolineStub : public NativeInstruction {
Expand Down Expand Up @@ -106,6 +109,10 @@ NativeShortCallTrampolineStub* NativeShortCallTrampolineStub::at(address addr) {

//-----------------------------------------------------------------------------
// NativeShortCall
//
// Implements the trampoline call, a short call with a trampoline, version of patchable far call.
// Enabled by setting the experimental UseTrampolines to true.

class NativeShortCall: private NativeInstruction {
public:
enum RISCV_specific_constants {
Expand Down Expand Up @@ -294,6 +301,10 @@ bool NativeShortCall::is_call_before(address return_address) {

//-----------------------------------------------------------------------------
// NativeFarCall
//
// Implements direct far calling loading an address from the stub section version of patchable far call.
// This is the default (experimental flag UseTrampolines, default false).

class NativeFarCall: public NativeInstruction {
public:
enum RISCV_specific_constants {
Expand Down

0 comments on commit ea57c42

Please sign in to comment.