From 0048ea1218720eb218fef914e42ec3a83ae9c939 Mon Sep 17 00:00:00 2001 From: Robbin Ehn Date: Wed, 22 May 2024 20:23:58 +0200 Subject: [PATCH] More review comments --- src/hotspot/cpu/riscv/nativeInst_riscv.cpp | 2 +- src/hotspot/cpu/riscv/nativeInst_riscv.hpp | 8 +------- src/hotspot/cpu/riscv/riscv.ad | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/hotspot/cpu/riscv/nativeInst_riscv.cpp b/src/hotspot/cpu/riscv/nativeInst_riscv.cpp index 6206175fc0f26..79d6d8c89e9fc 100644 --- a/src/hotspot/cpu/riscv/nativeInst_riscv.cpp +++ b/src/hotspot/cpu/riscv/nativeInst_riscv.cpp @@ -93,7 +93,7 @@ bool NativeInstruction::is_movptr1_at(address instr) { (is_addi_at(instr + instruction_size * 5) || is_jalr_at(instr + instruction_size * 5) || is_load_at(instr + instruction_size * 5)) && // Addi/Jalr/Load - check_movptr_data_dependency(instr); + check_movptr1_data_dependency(instr); } bool NativeInstruction::is_movptr2_at(address instr) { diff --git a/src/hotspot/cpu/riscv/nativeInst_riscv.hpp b/src/hotspot/cpu/riscv/nativeInst_riscv.hpp index b64bcd83422d5..1feab0cd62fbf 100644 --- a/src/hotspot/cpu/riscv/nativeInst_riscv.hpp +++ b/src/hotspot/cpu/riscv/nativeInst_riscv.hpp @@ -114,7 +114,7 @@ class NativeInstruction { // addi // slli // addi/jalr/load - static bool check_movptr_data_dependency(address instr) { + static bool check_movptr1_data_dependency(address instr) { address lui = instr; address addi1 = lui + instruction_size; address slli1 = addi1 + instruction_size; @@ -416,12 +416,6 @@ class NativeMovConstReg: public NativeInstruction { intptr_t data() const; void set_data(intptr_t x); - void flush() { - if (!maybe_cpool_ref(instruction_address())) { - ICache::invalidate_range(instruction_address(), movptr1_instruction_size /* > movptr2_instruction_size */); - } - } - void verify(); void print(); diff --git a/src/hotspot/cpu/riscv/riscv.ad b/src/hotspot/cpu/riscv/riscv.ad index 57e8bbba9744e..8b28ec88efddf 100644 --- a/src/hotspot/cpu/riscv/riscv.ad +++ b/src/hotspot/cpu/riscv/riscv.ad @@ -1286,7 +1286,7 @@ int CallStaticJavaDirectNode::compute_padding(int current_offset) const int CallDynamicJavaDirectNode::compute_padding(int current_offset) const { // skip the movptr2 in MacroAssembler::ic_call(): - // lui + addi + slli + addi + slli + addi + // lui, lui, slli, add, addi // Though movptr2() has already 4-byte aligned with or without RVC, // We need to prevent from further changes by explicitly calculating the size. current_offset += NativeMovConstReg::movptr2_instruction_size;