RFR: JDK-8293676: riscv: Trampoline not created for far runtime targets outside small CodeCache

Dingli Zhang dzhang at openjdk.org
Tue Sep 13 02:47:26 UTC 2022


Follow up [JDK-8286314](https://bugs.openjdk.org/browse/JDK-8286314), this case also exists in riscv.

`relocInfo::runtime_call_type` calls can have targets inside or outside CodeCache. If offsets to the targets are not in range, trampoline calls must be used. Currently trampolines for calls are generated based on the size of CodeCache and the maximum possible branch range. If the size of CodeCache is smaller than the range, no trampoline is generated. This works well if a target is inside CodeCache. It does not work if a target is outside CodeCache and CodeCache size is smaller than the maximum possible branch range.

## Testing:

- hotspot/jdk tier1 on unmatched board

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

Commit messages:
 - Port JDK-8286314 to RISC-V

Changes: https://git.openjdk.org/jdk/pull/10246/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10246&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8293676
  Stats: 17 lines in 1 file changed: 15 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/10246.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10246/head:pull/10246

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


More information about the hotspot-dev mailing list