From 3fd89be6d1a51b6fc99f4c0b5daba7a4bd64a08e Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Thu, 17 Jul 2025 10:45:46 +0000 Subject: [PATCH] 8362284: RISC-V: cleanup NativeMovRegMem Reviewed-by: fyang, luhenry --- src/hotspot/cpu/riscv/nativeInst_riscv.cpp | 13 --------- src/hotspot/cpu/riscv/nativeInst_riscv.hpp | 34 +++++----------------- 2 files changed, 7 insertions(+), 40 deletions(-) diff --git a/src/hotspot/cpu/riscv/nativeInst_riscv.cpp b/src/hotspot/cpu/riscv/nativeInst_riscv.cpp index e58b0cfcf76..9237749f9d9 100644 --- a/src/hotspot/cpu/riscv/nativeInst_riscv.cpp +++ b/src/hotspot/cpu/riscv/nativeInst_riscv.cpp @@ -335,19 +335,6 @@ void NativeMovConstReg::print() { p2i(instruction_address()), data()); } -//------------------------------------------------------------------- - -int NativeMovRegMem::offset() const { - Unimplemented(); - return 0; -} - -void NativeMovRegMem::set_offset(int x) { Unimplemented(); } - -void NativeMovRegMem::verify() { - Unimplemented(); -} - //-------------------------------------------------------------------------------- void NativeJump::verify() { } diff --git a/src/hotspot/cpu/riscv/nativeInst_riscv.hpp b/src/hotspot/cpu/riscv/nativeInst_riscv.hpp index a6462e6bb8e..ba2270a5f78 100644 --- a/src/hotspot/cpu/riscv/nativeInst_riscv.hpp +++ b/src/hotspot/cpu/riscv/nativeInst_riscv.hpp @@ -37,7 +37,7 @@ // - NativeInstruction // - - NativeCall // - - NativeMovConstReg -// - - NativeMovRegMem +// - - NativeMovRegMem - Unimplemented // - - NativeJump // - - NativeGeneralJump // - - NativeIllegalInstruction @@ -218,38 +218,18 @@ inline NativeMovConstReg* nativeMovConstReg_before(address addr) { // NativeMovRegMem to keep some compilers happy. class NativeMovRegMem: public NativeInstruction { public: - enum RISCV_specific_constants { - instruction_size = NativeInstruction::instruction_size, - instruction_offset = 0, - data_offset = 0, - next_instruction_offset = NativeInstruction::instruction_size - }; + int num_bytes_to_end_of_patch() const { Unimplemented(); return 0; } - int instruction_start() const { return instruction_offset; } + int offset() const { Unimplemented(); return 0; } - address instruction_address() const { return addr_at(instruction_offset); } + void set_offset(int x) { Unimplemented(); } - int num_bytes_to_end_of_patch() const { return instruction_offset + instruction_size; } - - int offset() const; - - void set_offset(int x); - - void add_offset_in_bytes(int add_offset) { - set_offset(offset() + add_offset); - } - - void verify(); - void print(); - - private: - inline friend NativeMovRegMem* nativeMovRegMem_at(address addr); + void add_offset_in_bytes(int add_offset) { Unimplemented(); } }; inline NativeMovRegMem* nativeMovRegMem_at(address addr) { - NativeMovRegMem* test = (NativeMovRegMem*)(addr - NativeMovRegMem::instruction_offset); - DEBUG_ONLY(test->verify()); - return test; + Unimplemented(); + return (NativeMovRegMem*)nullptr; } class NativeJump: public NativeInstruction {