RFR: JDK-8310020: MacroAssembler::call_VM(_leaf) doesn't consistently check for conflict with C calling convention. [v2]

Damon Fenacci duke at openjdk.org
Thu Jun 15 07:20:29 UTC 2023


> # Issue
> The `MacroAssembler::call_VM` and `MacroAssembler::call_VM_leaf` methods don't include asserts to check if the passed arguments collide with the C calling convention registers **consistently**. Some versions omit them completely (e.g. aarch64 `MacroAssembler::call_VM_leaf`), other ones use regular asserts (where the `assert_different_registers` function should be used).
> 
> # Solution
> We use `assert_different_registers` across all `MacroAssembler::call_VM` and `MacroAssembler::call_VM_leaf` where a  check is needed (except for the arm implementation, which doesn't change as it uses fixed registers).
> 
> # Testing
> This fix includes changes for x86_32/64 and aarch64, which I could test thoroughly but also for **ppc,** **riscv**, and **s390** for which I would **need some help with testing**.

Damon Fenacci has updated the pull request incrementally with one additional commit since the last revision:

  Update src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
  
  Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14470/files
  - new: https://git.openjdk.org/jdk/pull/14470/files/a9dea0c5..841f0181

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14470&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14470&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/14470.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14470/head:pull/14470

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


More information about the hotspot-dev mailing list