[jdk17u-dev] RFR: 8291550: RISC-V: jdk uses misaligned memory access when AvoidUnalignedAccess enabled
Vladimir Kempik
vkempik at openjdk.org
Fri Oct 6 14:44:29 UTC 2023
On Fri, 6 Oct 2023 12:22:20 GMT, Olga Mikhaltsova <omikhaltcova at openjdk.org> wrote:
> I'd like to backport JDK-8291550 to jdk17u.
>
> The patch applies not cleanly. It differs from the original one in the following:
>
> **1.** **src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp**
>
> `#undef VFCVT_SAFE` was removed because there is no `#define VFCVT_SAFE(VFLOATCVT)` (JDK-8306966)
>
> **2.** **src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp**
>
> The difference is in context due to method signature change by JDK-8299229
> `void NativeNMethodBarrier::verify() const {..`
> `bool NativeNMethodBarrier::check_barrier(err_msg& msg) const {..`
>
> `msg.print(..)` was replaced with `tty->print_cr(..)`
>
> **3.** **src/hotspot/cpu/riscv/interp_masm_riscv.cpp**
>
> The changes were not applied to
> `void InterpreterMacroAssembler::load_resolved_indy_entry(Register cache, Register index) {`
> This method doesn't exist, it was added by JDK-8301995.
>
> **4.** **src/hotspot/cpu/riscv/macroAssembler_riscv.cpp**
>
> The difference is in context due to the method signature change by JDK-8298075
> `address MacroAssembler::get_target_of_li32(address insn_addr) {`
> `static address get_target_of_li32(address insn_addr) `{
>
> `NULL` was replaced with `nullptr` by JDK-8301496.
>
> **5.** **src/hotspot/cpu/riscv/nativeInst_riscv.cpp**
> **src/hotspot/cpu/riscv/nativeInst_riscv.hpp**
>
> `NULL` was replaced with `nullptr` by JDK-8301496
Changes requested by vkempik (Reviewer).
Marked as reviewed by vkempik (Reviewer).
Marked as reviewed by vkempik (Reviewer).
src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 4102:
> 4100: // base: Address of a buffer to be zeroed, 8 bytes aligned.
> 4101: // cnt: Immediate count in HeapWords.
> 4102: void MacroAssembler::zero_words(Register base, u_int64_t cnt) {
looks like this edit was accidentially added to the backport, other than that - looks good
-------------
PR Review: https://git.openjdk.org/jdk17u-dev/pull/1852#pullrequestreview-1661913601
PR Review: https://git.openjdk.org/jdk17u-dev/pull/1852#pullrequestreview-1661991845
PR Review: https://git.openjdk.org/jdk17u-dev/pull/1852#pullrequestreview-1662018309
PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/1852#discussion_r1348751842
More information about the jdk-updates-dev
mailing list