harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-5078) [drlvm][jni] a stress test org.apache.harmony.test.stress.jni.arguments.ArgumentsTest fails
Date Thu, 13 Dec 2007 17:18:43 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Gregory Shimansky updated HARMONY-5078:

    Attachment: HARMONY-5078.patch

I found the cause of the bug. LIL stub uses a temporary register to move data from stack to
stack for called function. For this LIL should use xmm8 since xmm0-xmm7 are used for passing

But when LIL tries to use xmm8 instead encoder encodes it as xmm0. This happens because encoder
has to specify REX.R (0x44) prefix in generated instruction. The function needs_rex_r checks
for this. It happened that register passed to needs_rex_r had its RegName value 0x8080018
which is out of range for RegName_XMM8D (0x8080000) - RegName_XMM15D (0x808000f) constants.
This happened because XMM registers index is always shifted by 0x10 in this function.

In function add_xmm generated RegName used get_idx() as an offset for RegName_XMM0D, but this
offset has to begin with 0. Instead get_idx() returned value starting with 16 (or 8 on x86),
so it is necessary to subtract xmm0_reg from the index to get the correct register. Attached
patch does this. I also added a check in needs_rex_r for 128-bit XMM registers.

I need JIT team to review this patch. With it attached and the original tests pass.

> [drlvm][jni] a stress test org.apache.harmony.test.stress.jni.arguments.ArgumentsTest
> -------------------------------------------------------------------------------------------
>                 Key: HARMONY-5078
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5078
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64
>            Reporter: Alexei Fedotov
>         Attachments: HARMONY-5078.patch, Test.c, Test.java
> The stress test fails while passing arguments to the native function.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message