You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "George Timoshenko (JIRA)" <ji...@apache.org> on 2007/02/16 14:36:06 UTC

[jira] Created: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

[drlvm][jit][opt] code patching works incorrectly on EM64T
----------------------------------------------------------

                 Key: HARMONY-3189
                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: EM64T
            Reporter: George Timoshenko


fixing HARMONY-2881  triggered a serious problem:

code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)

there is no CALL inst with 64-bit immediate operand on EM64T.
So all direct calls are turned into:

MOV a reg, immediate target addr;
CALL the reg;

this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Updated: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Timoshenko updated HARMONY-3189:
---------------------------------------

    Attachment: HARMONY-3189-version-3-SP2.patch

here is the complete solution for patching all direct calls: immediate and register ones.

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3-SP1.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Commented: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488343 ] 

George Timoshenko commented on HARMONY-3189:
--------------------------------------------

patch SP2 updated

it successfully runs EHWA on x64

sh build.sh test, jvm98 and jbb2005 on both x64 and ia32

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3-SP1.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Updated: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Timoshenko updated HARMONY-3189:
---------------------------------------

    Attachment: HARMONY-3189-version-3-SP1.patch

this patch fixes issue 1:
- returning target address type into Int32 to cheat constraint resolver. 

with this patch:

1) at compiletime OPT generates immediate calls when offset fits 32 bits at compile time
2) at compiletime OPT generates register calls when abs(offset) is greater than 0x7FFFFFFF
3) at code patching OPT _does_not_ patch direct calls in register form (it is issue 2)
4) at code patching OPT patches immediate calls if new offset also fits into 32 bits
5) OPT _does_not_ patch immediate calls if new offset does not fit into 32 bits (it is issue 2)

Running SPECjbb2005 with 1700m heap I do not get situations like 2) and 5) at all ( so there are no calls from 3) ).
But I see them when I set heap greater than 2G.



> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3-SP1.patch, HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Updated: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Timoshenko updated HARMONY-3189:
---------------------------------------

    Attachment: HARMONY-3189-version-3-SP2.patch

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3-SP1.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Updated: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Timoshenko updated HARMONY-3189:
---------------------------------------

    Attachment: HARMONY-3189.patch

great thanks to Nikolay Sidelnikov and Alex Astapchuk for their help

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Attachments: HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Commented: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480685 ] 

George Timoshenko commented on HARMONY-3189:
--------------------------------------------

There is another approach that will fix somehow issues 2 and 3:

It is difficult to imagine that we have more than 2G of executable code at runtime.
So the problem can be solved in another way.

If it is possible VM can support and guarantee that all executable code: stubs, managed code, other - are located in the region having 2G diameter.

So even for heaps larger than 2G we will not meet situations like 2) and 5) 



> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3-SP1.patch, HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Closed: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov closed HARMONY-3189.
------------------------------------

    Resolution: Fixed

Applied at r514575

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Updated: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Timoshenko updated HARMONY-3189:
---------------------------------------

    Attachment: HARMONY-3189-version-3.patch

new version

sh build.sh test 
passed on Linux ia32 and em64t

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Commented: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486294 ] 

Alexey Varlamov commented on HARMONY-3189:
------------------------------------------

The patch has incorrect ifdefing in Ia32CodeEmitter.cpp (breaks ia32 compilation); EHWA segfaults on x64 with this patch applied.

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3-SP1.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Commented: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477925 ] 

Alexey Varlamov commented on HARMONY-3189:
------------------------------------------

Thanks George, the patch is great!
Few observations:
- please avoid intermixing code formatting with functional changes;
- initial comment might appear a bit misleading, not all control transfers are patched but only those whose offset does not fit to 32 bit.


> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Commented: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480773 ] 

Alexey Varlamov commented on HARMONY-3189:
------------------------------------------

Applied HARMONY-3189-version-3-SP1.patch at r518137 to address current performance degradation.
I suppose we should keep this issue open until full resolution.

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3-SP1.patch, HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Assigned: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov reassigned HARMONY-3189:
----------------------------------------

    Assignee: Alexey Varlamov

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Reopened: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Timoshenko reopened HARMONY-3189:
----------------------------------------

    Estimated Complexity: Advanced  (was: Guru)

in the fix version 3 I forgot to return target address operand type back into Int32.
So Jitrino continued to transform all direct calls into register form.

version-3 did not know how to patch direct calls in register form so code patching did not work at all.

there are three issues:

- returning target address type into Int32 to cheat constraint resolver.
- teaching Jitrino to patch direct calls in register form
- resolving situations when at runtime immediate call should be transformed into register form by code patching. 

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Updated: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Timoshenko updated HARMONY-3189:
---------------------------------------

    Attachment: HARMONY-3189-version-3-SP2.patch

there was one incorrect assert in v3-SP2

the patch is updated


> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3-SP1.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Updated: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Timoshenko updated HARMONY-3189:
---------------------------------------

    Attachment: HARMONY-3189-version-3-SP2.patch

that assert was not the only problem :(

code compactor removed additional nops inserted before callInst if the callInst was the only instruction in the basic block

so one (the first) of the additional nops is now the "real" instruction in the CFG inserted before callInst

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3-SP1.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Resolved: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov resolved HARMONY-3189.
--------------------------------------

    Resolution: Fixed

Applied at r528408, thanks!

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189-version-3-SP1.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3-SP2.patch, HARMONY-3189-version-3.patch, HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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


[jira] Commented: (HARMONY-3189) [drlvm][jit][opt] code patching works incorrectly on EM64T

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474427 ] 

Alexey Varlamov commented on HARMONY-3189:
------------------------------------------

The patch breaks OPT on ia32 (tested on SLES10).

> [drlvm][jit][opt] code patching works incorrectly on EM64T
> ----------------------------------------------------------
>
>                 Key: HARMONY-3189
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3189
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: EM64T
>            Reporter: George Timoshenko
>         Assigned To: Alexey Varlamov
>         Attachments: HARMONY-3189.patch
>
>
> fixing HARMONY-2881  triggered a serious problem:
> code patching mecanizm can not work when the target addres of call instruction is 64 bit long. (such addresses appeares after fixing 2881)
> there is no CALL inst with 64-bit immediate operand on EM64T.
> So all direct calls are turned into:
> MOV a reg, immediate target addr;
> CALL the reg;
> this issue devoted to fixing code patching mecanizm on EM64T

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