You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Afremov (JIRA)" <ji...@apache.org> on 2007/12/21 15:32:43 UTC

[jira] Updated: (HARMONY-5335) [drlvm][jit][jet] Switch improvement

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

Pavel Afremov updated HARMONY-5335:
-----------------------------------

    Attachment: switch_improvement.patch

> [drlvm][jit][jet] Switch improvement
> ------------------------------------
>
>                 Key: HARMONY-5335
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5335
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: switch_improvement.patch
>
>
> During fixing HARMONY-5309 wrong / non optimal check was found in the JET. More correct / optimal patch was provided. To avoid missing of the correction this JIRA was created.
> In file vm/jitrino/src/jet/cg_br.cpp(line 237) Check 
>     int tmp = -jinst.low();
>     const int LO_BOUND = INT_MIN/(int)sizeof(void*);
>     const int UP_BOUND = INT_MAX/(int)sizeof(void*);
>     if (!(LO_BOUND<=tmp && tmp<=UP_BOUND))
> has no sense on x86-32, because operation 
>     ld(jobj, gr_tabl, gr_tabl, -jinst.low()*sizeof(void*), 
>     val.reg(), sizeof(void*));
> always is correct because of 32 bit overflow.
> Also sx(Opnd(i64, val.reg()), Opnd(i32, val.reg())); has sense on x86-64 for small negative values of  jinst.low (INT_MIN/8,0) only. In other case this operation is useless.
> So from my point of view optimal patch should looks like switch_improvement.patch.

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