Following two tests fail with debug build on linux-riscv64 platform:
TEST: compiler/sharedstubs/SharedStubToInterpTest.java
TEST: compiler/sharedstubs/SharedTrampolineTest.java
A bit about the change history. https://bugs.openjdk.org/browse/JDK-8293011 shared stubs to interpreter for static calls.
And https://bugs.openjdk.org/browse/JDK-8293770 reused runtime call trampolines.
So we have `static constexpr bool supports_shared_stubs() { return true; }` in file src/hotspot/cpu/riscv/codeBuffer_riscv.hpp.
And both cases are handled in `CodeBuffer::pd_finalize_stubs` in file src/hotspot/cpu/riscv/codeBuffer_riscv.cpp.
```
bool CodeBuffer::pd_finalize_stubs() {
return emit_shared_stubs_to_interp<MacroAssembler>(this, _shared_stub_to_interp_requests)
&& emit_shared_trampolines(this, _shared_trampoline_requests);
}
```
Then https://bugs.openjdk.org/browse/JDK-8332689 turned off uses of trampolines for far calls and changed this function into:
`static bool supports_shared_stubs() { return UseTrampolines; }`. This will cause the two test failures as option `UseTrampolines`
is off by default. Further, https://bugs.openjdk.org/browse/JDK-8343430 removed old trampoline call and option `UseTrampolines`.
So now we have `static bool supports_shared_stubs() { return false; }` and a simplified `CodeBuffer::pd_finalize_stubs`.
```
bool CodeBuffer::pd_finalize_stubs() {
return emit_shared_stubs_to_interp<MacroAssembler>(this, _shared_stub_to_interp_requests);
}
```
But JDK-8332689 should only make the runtime call trampolines reuse feature depend on option `UseTrampolines`. It should not
affect the use of shared stubs to interpreter for static calls.