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

Vladimir Ivanov vlivanov at openjdk.java.net
Tue Jul 28 15:51:15 UTC 2020


On Tue, 28 Jul 2020 14:54:26 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> 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

Looks good.

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

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


More information about the panama-dev mailing list