Project

General

Profile

Actions

Bug #10004

closed

java.lang.IllegalStateException: Boolean data is not convertible to BitVector (Не ясно где тут BitVector)

Added by Alexander Protsenko almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
nML Translator
Target version:
Start date:
12/23/2019
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:
2.5.0-beta-191226

Description

Код с ошибкой:

--> if coerce(card(3), ArchitectureRevision) >= coerce(card(3), 0x2) && C0_SRSCTL_HSS > coerce(card(4), 0x0) && C0_STATUS_BEV == coerce(BIT, 0x0) then

  C0_SRSCTL_CSS = C0_SRSCTL_PSS;
endif;

...
TRANSLATE: nML -> MIR: ei.decode
TRANSLATE: nML -> MIR: ei2.action
TRANSLATE: nML -> MIR: ei2.init
TRANSLATE: nML -> MIR: ei2.decode
TRANSLATE: nML -> MIR: eret.action
********************************************************************************
ATTENTION! An unexpected error has occurred:
java.lang.IllegalStateException: Boolean data is not convertible to BitVector.

The program will be terminated. Please contact us at: 
microtesk-support@ispras.ru
We are sorry for the inconvenience.

Exception stack:

java.lang.IllegalStateException: Boolean data is not convertible to BitVector.
    at ru.ispras.fortress.data.Data.checkConvertibleTo(Data.java:528)
    at ru.ispras.fortress.data.Data.getBitVector(Data.java:417)
    at ru.ispras.fortress.expression.NodeValue.getBitVector(NodeValue.java:324)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans.newConstant(NmlIrTrans.java:324)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans.access$300(NmlIrTrans.java:43)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans$TransRvalue.lookUp(NmlIrTrans.java:499)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans$TransRvalue.translateMapping(NmlIrTrans.java:420)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans$TransRvalue.onOperationEnd(NmlIrTrans.java:357)
    at ru.ispras.fortress.expression.ExprTreeWalker.visitOperation(ExprTreeWalker.java:173)
    at ru.ispras.fortress.expression.ExprTreeWalker.visitNode(ExprTreeWalker.java:123)
    at ru.ispras.fortress.expression.ExprTreeWalker.visitOperation(ExprTreeWalker.java:160)
    at ru.ispras.fortress.expression.ExprTreeWalker.visitNode(ExprTreeWalker.java:123)
    at ru.ispras.fortress.expression.ExprTreeWalker.visit(ExprTreeWalker.java:93)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans.translate(NmlIrTrans.java:307)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans.translate(NmlIrTrans.java:793)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans.translate(NmlIrTrans.java:178)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans.translate(NmlIrTrans.java:800)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans.translate(NmlIrTrans.java:178)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans.translate(NmlIrTrans.java:95)
    at ru.ispras.microtesk.translator.mir.NmlIrTrans.translate(NmlIrTrans.java:52)
    at ru.ispras.microtesk.translator.mir.MirTransHandler.processIr(MirTransHandler.java:49)
    at ru.ispras.microtesk.translator.mir.MirTransHandler.processIr(MirTransHandler.java:30)
    at ru.ispras.microtesk.translator.Translator.processIr(Translator.java:84)
    at ru.ispras.microtesk.translator.nml.NmlTranslator.start(NmlTranslator.java:133)
    at ru.ispras.microtesk.translator.Translator.translate(Translator.java:201)
    at ru.ispras.microtesk.MicroTESK.translate(MicroTESK.java:168)
    at ru.ispras.microtesk.MicroTESK.runTask(MicroTESK.java:141)
    at ru.ispras.microtesk.MicroTESK.main(MicroTESK.java:79)

********************************************************************************
:translateMips64 FAILED

Заменен на вариант:

      if coerce(card(3), ArchitectureRevision) >= coerce(card(3), 0x2) then
        if C0_SRSCTL_HSS > coerce(card(4), 0x0) then
          if C0_STATUS_BEV == coerce(BIT, 0x0) then
            C0_SRSCTL_CSS = C0_SRSCTL_PSS;
          endif;
        endif;
      endif;

Так же исправлено в операции MIPS: rotr, rotrv

Actions #1

Updated by Alexander Protsenko almost 5 years ago

В архитектуре ARMv8 ругается на это:

inline calls
PASS: inline 'general_rev_op_32.action'
PASS: inline call 'REG_32.read'
PASS: inline call 'general_rev.action'
********************************************************************************
ATTENTION! An unexpected error has occurred:
java.lang.IllegalArgumentException: Bit vector sizes do not match: 1 != 6.

The program will be terminated. Please contact us at: 
microtesk-support@ispras.ru
We are sorry for the inconvenience.

Exception stack:

java.lang.IllegalArgumentException: Bit vector sizes do not match: 1 != 6.
    at ru.ispras.fortress.data.types.bitvector.BitVectorMath.checkEqualSize(BitVectorMath.java:926)
    at ru.ispras.fortress.data.types.bitvector.BitVectorMath.transform(BitVectorMath.java:902)
    at ru.ispras.fortress.data.types.bitvector.BitVectorMath.add(BitVectorMath.java:682)
    at ru.ispras.microtesk.translator.mir.BvOpcode$1.evalBitVector(Instruction.java:412)
    at ru.ispras.microtesk.translator.mir.BvOpcode.evalConst(Instruction.java:512)
    at ru.ispras.microtesk.translator.mir.EvalContext.visit(EvalContext.java:74)
    at ru.ispras.microtesk.translator.mir.Instruction$Assignment.accept(Instruction.java:30)
    at ru.ispras.microtesk.translator.mir.EvalContext.eval(EvalContext.java:59)
    at ru.ispras.microtesk.translator.mir.InlinePass.apply(InlinePass.java:28)
    at ru.ispras.microtesk.translator.mir.MirPassDriver.apply(MirPassDriver.java:46)
    at ru.ispras.microtesk.translator.mir.MirPassDriver.run(MirPassDriver.java:56)
    at ru.ispras.microtesk.translator.mir.MirTransHandler.processIr(MirTransHandler.java:72)
    at ru.ispras.microtesk.translator.mir.MirTransHandler.processIr(MirTransHandler.java:30)
    at ru.ispras.microtesk.translator.Translator.processIr(Translator.java:84)
    at ru.ispras.microtesk.translator.nml.NmlTranslator.start(NmlTranslator.java:133)
    at ru.ispras.microtesk.translator.Translator.translate(Translator.java:201)
    at ru.ispras.microtesk.MicroTESK.translate(MicroTESK.java:168)
    at ru.ispras.microtesk.MicroTESK.runTask(MicroTESK.java:141)
    at ru.ispras.microtesk.MicroTESK.main(MicroTESK.java:79)

var V_var[card(6)]

internal op general_rev (x: DWORD, rev_op: card(2), size: BIT)
  action = {
    if   rev_op == RevOp_REV16 then V_var = 0b001000;
    elif rev_op == RevOp_REV32 then V_var = 0b011000;
    elif rev_op == RevOp_REV64 then V_var = 0b111000;
    elif rev_op == RevOp_RBIT then
--->      V_var = if size == 0 then coerce(card(6), 0b111111) else coerce(card(6), 0b011111) endif;
    endif;

Actions #2

Updated by Alexander Protsenko almost 5 years ago

  • Status changed from New to Resolved

Задача из комментария перешла сюда: #10011

Проблем с && больше нет.

Actions #3

Updated by Alexander Kamkin almost 5 years ago

  • Status changed from Resolved to Closed
  • Published in build set to 2.5.0-beta-191226
Actions

Also available in: Atom PDF