RFR: 8339466: Enumerate shared stubs and define static fields and names via declarations [v2]
Fei Yang
fyang at openjdk.org
Wed Sep 4 02:47:24 UTC 2024
On Tue, 3 Sep 2024 10:51:53 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> Systematize handling of SharedRuntime stubs. Generate enum ids, static fields and names from declarations using template macros. Systematically reference stubs and stub names using ids.
>
> Andrew Dinn has updated the pull request incrementally with one additional commit since the last revision:
>
> fix errors in ppc generator
Hi Andrew:
I just checked riscv-specific changes and seems that we are lacking following small change.
Could you please add it? I did a release build and ran tier1 test on linux-riscv64 platform.
diff --git a/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp b/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
index 2e8362814de..0481bc3483b 100644
--- a/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
+++ b/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
@@ -2447,7 +2447,8 @@ SafepointBlob* SharedRuntime::generate_handler_blob(sharedStubId id, address cal
OopMap* map = nullptr;
// Allocate space for the code. Setup code generation tools.
- CodeBuffer buffer("handler_blob", 2048, 1024);
+ const char *name = SharedRuntime::stub_name(id);
+ CodeBuffer buffer(name, 2048, 1024);
MacroAssembler* masm = new MacroAssembler(&buffer);
assert_cond(masm != nullptr);
@@ -2455,7 +2456,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(sharedStubId id, address cal
address call_pc = nullptr;
int frame_size_in_words = -1;
bool cause_return = (id == sharedStubId::polling_page_return_handler_id);
- RegisterSaver reg_save(id == sharedStubId::polling_page_vectors_safepoint_handler_id /* save_vectors */);
+ RegisterSaver reg_saver(id == sharedStubId::polling_page_vectors_safepoint_handler_id /* save_vectors */);
// Save Integer and Float registers.
map = reg_saver.save_live_registers(masm, 0, &frame_size_in_words);
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20832#issuecomment-2327806460
More information about the hotspot-dev
mailing list