8362284: RISC-V: cleanup NativeMovRegMem

Reviewed-by: fyang, luhenry
This commit is contained in:
Hamlin Li 2025-07-17 10:45:46 +00:00
parent 18190519e7
commit 3fd89be6d1
2 changed files with 7 additions and 40 deletions

View File

@ -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() { }

View File

@ -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 {