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

Jorn Vernee jvernee at openjdk.java.net
Tue Jul 28 15:58:40 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

This pull request has now been integrated.

Changeset: f8ca84b2
Author:    Jorn Vernee <jvernee at openjdk.org>
URL:       https://git.openjdk.java.net/panama-foreign/commit/f8ca84b2
Stats:     6 lines in 2 files changed: 2 ins; 3 del; 1 mod

Fix wrong ret_addr_offset value for some native calls.

Reviewed-by: mcimadamore

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

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


More information about the panama-dev mailing list