You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2007/10/25 15:01:55 UTC

[jira] Created: (HARMONY-5022) [drlvm][jit][opt] incorrect codegeneration of compressed obj arithmetics

[drlvm][jit][opt] incorrect codegeneration of compressed obj arithmetics
------------------------------------------------------------------------

                 Key: HARMONY-5022
                 URL: https://issues.apache.org/jira/browse/HARMONY-5022
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: x86_64
            Reporter: Alexey Varlamov


Codeselector of Jitrino.OPT always (except ldind) handles heap base as 64-bit immediate operand for SUB/ADD/CMP instructions, while CPU only supports imm32 for these instruction group:
working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1305):        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)VMInterface::getHeapBase() : 0));
working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1324):        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)VMInterface::getHeapBase() : 0));
working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1479):        return irManager.newImmOpnd(typeManager.getNullObjectType(), (POINTER_SIZE_INT)VMInterface::getHeapBase());
working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1939):        Opnd * heap_base = irManager.newImmOpnd(typeManager.getIntPtrType(), (POINTER_SIZE_INT)VMInterface::getHeapBase());
working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(2205):        copyOpnd(base, irManager.newImmOpnd(base->getType(), (POINTER_SIZE_INT)VMInterface::getHeapBase()));

However encoder silently truncates such operands to 32 bit - that is separate issue, I'll dig into it.

In fact the heap base must be loaded to reg64 first.

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


[jira] Commented: (HARMONY-5022) [drlvm][jit][opt] incorrect codegeneration of compressed obj arithmetics

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

Alexey Varlamov commented on HARMONY-5022:
------------------------------------------

ldnull() still looks suspicous, but generally this does not block HARMONY-5037 anymore so I don't mind closing.

> [drlvm][jit][opt] incorrect codegeneration of compressed obj arithmetics
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5022
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5022
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: x86_64
>            Reporter: Alexey Varlamov
>            Assignee: Mikhail Fursov
>
> Codeselector of Jitrino.OPT always (except ldind) handles heap base as 64-bit immediate operand for SUB/ADD/CMP instructions, while CPU only supports imm32 for these instruction group:
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1305):        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)VMInterface::getHeapBase() : 0));
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1324):        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)VMInterface::getHeapBase() : 0));
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1479):        return irManager.newImmOpnd(typeManager.getNullObjectType(), (POINTER_SIZE_INT)VMInterface::getHeapBase());
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1939):        Opnd * heap_base = irManager.newImmOpnd(typeManager.getIntPtrType(), (POINTER_SIZE_INT)VMInterface::getHeapBase());
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(2205):        copyOpnd(base, irManager.newImmOpnd(base->getType(), (POINTER_SIZE_INT)VMInterface::getHeapBase()));
> However encoder silently truncates such operands to 32 bit - that is separate issue, I'll dig into it.
> In fact the heap base must be loaded to reg64 first.

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


[jira] Assigned: (HARMONY-5022) [drlvm][jit][opt] incorrect codegeneration of compressed obj arithmetics

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

Mikhail Fursov reassigned HARMONY-5022:
---------------------------------------

    Assignee: Mikhail Fursov

> [drlvm][jit][opt] incorrect codegeneration of compressed obj arithmetics
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5022
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5022
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: x86_64
>            Reporter: Alexey Varlamov
>            Assignee: Mikhail Fursov
>
> Codeselector of Jitrino.OPT always (except ldind) handles heap base as 64-bit immediate operand for SUB/ADD/CMP instructions, while CPU only supports imm32 for these instruction group:
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1305):        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)VMInterface::getHeapBase() : 0));
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1324):        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)VMInterface::getHeapBase() : 0));
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1479):        return irManager.newImmOpnd(typeManager.getNullObjectType(), (POINTER_SIZE_INT)VMInterface::getHeapBase());
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1939):        Opnd * heap_base = irManager.newImmOpnd(typeManager.getIntPtrType(), (POINTER_SIZE_INT)VMInterface::getHeapBase());
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(2205):        copyOpnd(base, irManager.newImmOpnd(base->getType(), (POINTER_SIZE_INT)VMInterface::getHeapBase()));
> However encoder silently truncates such operands to 32 bit - that is separate issue, I'll dig into it.
> In fact the heap base must be loaded to reg64 first.

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


[jira] Commented: (HARMONY-5022) [drlvm][jit][opt] incorrect codegeneration of compressed obj arithmetics

Posted by "Xiaoming Gu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671037#action_12671037 ] 

Xiaoming Gu commented on HARMONY-5022:
--------------------------------------

I read the code about heap base address in Ia32InstCodeSelector.cpp and checked the operands created by those parts of code with a simple test case on a Windows64 machine. The code itself and the practical results both show all related operands created in HIR2LIR pass are in 64-bit size. The bug is gone and I'll close this JIRA.

> [drlvm][jit][opt] incorrect codegeneration of compressed obj arithmetics
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5022
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5022
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: x86_64
>            Reporter: Alexey Varlamov
>            Assignee: Mikhail Fursov
>
> Codeselector of Jitrino.OPT always (except ldind) handles heap base as 64-bit immediate operand for SUB/ADD/CMP instructions, while CPU only supports imm32 for these instruction group:
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1305):        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)VMInterface::getHeapBase() : 0));
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1324):        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)VMInterface::getHeapBase() : 0));
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1479):        return irManager.newImmOpnd(typeManager.getNullObjectType(), (POINTER_SIZE_INT)VMInterface::getHeapBase());
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(1939):        Opnd * heap_base = irManager.newImmOpnd(typeManager.getIntPtrType(), (POINTER_SIZE_INT)VMInterface::getHeapBase());
> working_vm\vm\jitrino\src\codegenerator\ia32\Ia32InstCodeSelector.cpp(2205):        copyOpnd(base, irManager.newImmOpnd(base->getType(), (POINTER_SIZE_INT)VMInterface::getHeapBase()));
> However encoder silently truncates such operands to 32 bit - that is separate issue, I'll dig into it.
> In fact the heap base must be loaded to reg64 first.

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