[jdk17u-dev] RFR: 8291550: RISC-V: jdk uses misaligned memory access when AvoidUnalignedAccess enabled

Olga Mikhaltsova omikhaltcova at openjdk.org
Fri Oct 6 14:44:27 UTC 2023


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

-------------

Commit messages:
 - Removed the line break inserted by mistake
 - Backport 37093441661c26f333aac00d16aea00c3341d314

Changes: https://git.openjdk.org/jdk17u-dev/pull/1852/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=1852&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8291550
  Stats: 234 lines in 12 files changed: 148 ins; 0 del; 86 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/1852.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/1852/head:pull/1852

PR: https://git.openjdk.org/jdk17u-dev/pull/1852


More information about the jdk-updates-dev mailing list