RFR: 8292867: RISC-V: Simplify weak CAS return value handling

Aleksey Shipilev shade at openjdk.org
Wed Aug 24 19:30:51 UTC 2022


I see that current weak CAS implementations in `macroAssembler_riscv.cpp` return `0` on success, and then invert it in `riscv.ad` to match the Java's `boolean` result. I think we can just return the final value from `MacroAssembler`.

Additional testing:
 - [ ] Linux RISC-V fastdebug `java/lang/invoke/VarHandles/`
 - [ ] Linux RISC-V fastdebug `compiler/unsafe`

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

Commit messages:
 - Fix

Changes: https://git.openjdk.org/jdk/pull/10006/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10006&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8292867
  Stats: 39 lines in 2 files changed: 2 ins; 13 del; 24 mod
  Patch: https://git.openjdk.org/jdk/pull/10006.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10006/head:pull/10006

PR: https://git.openjdk.org/jdk/pull/10006


More information about the hotspot-dev mailing list