[foreign-abi] RFR: Fix wrong ret_addr_offset value for some native calls.

Jorn Vernee jvernee at openjdk.java.net
Tue Jul 28 15:10:23 UTC 2020


Hi,

This patch fixes a problem observed when running some of the jextract samples with intrinsics enabled.

The problem is that safepoint information is stored based on code offsets in C2, and for native calls, the code offset
was wrong sometimes due to the assembler emitting different code for near and far calls.

The fix is to force the emission of a far call, so that the code offset is always correct. This follows what currently
happens for normal runtime calls as well.

The patch also adds an assertion to verify that the given code offset is correct when emitting code. The assertion
correctly fires on the current intrinsics tests without the fix.

Thanks,
Jorn

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

Commit messages:
 - Fix wrong code offset literal

Changes: https://git.openjdk.java.net/panama-foreign/pull/269/files
 Webrev: https://webrevs.openjdk.java.net/panama-foreign/269/webrev.00
  Stats: 6 lines in 2 files changed: 3 ins; 2 del; 1 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/269.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/269/head:pull/269

PR: https://git.openjdk.java.net/panama-foreign/pull/269


More information about the panama-dev mailing list