Project

General

Profile

Bug #9440

Bit field expressions must be statically calculated constants

Added by Alexander Protsenko almost 2 years ago. Updated 9 months ago.

Status:
New
Priority:
Normal
Category:
MMU Plugin
Target version:
Start date:
01/21/2019
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

Code

    temp_address = a + va.value<31-(1-i)*10..22-(1-i)*10> * PTESIZE;

Error:

riscv.mmu 154:25 ERROR (SEMANTIC): "Bit field expressions must be statically calculated constants." 
java.lang.IllegalArgumentException
    at ru.ispras.fortress.util.InvariantChecks.checkTrue(InvariantChecks.java:53)
    at ru.ispras.fortress.util.InvariantChecks.checkTrue(InvariantChecks.java:38)
    at ru.ispras.fortress.util.InvariantChecks.checkNotNull(InvariantChecks.java:95)
    at ru.ispras.fortress.expression.ExprUtils.isVariable(ExprUtils.java:213)
    at ru.ispras.microtesk.mmu.translator.ConstantPropagator.get(ConstantPropagator.java:61)
    at ru.ispras.microtesk.mmu.translator.MmuTreeWalkerBase.newExpression(MmuTreeWalkerBase.java:1478)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.binaryExpr(MmuTreeWalker.java:3010)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.expr(MmuTreeWalker.java:2283)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.binaryExpr(MmuTreeWalker.java:2915)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.expr(MmuTreeWalker.java:2283)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.assignmentStmt(MmuTreeWalker.java:1651)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.statement(MmuTreeWalker.java:1504)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.sequence(MmuTreeWalker.java:1401)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.functionDef(MmuTreeWalker.java:3700)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.declaration(MmuTreeWalker.java:412)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.startRule(MmuTreeWalker.java:250)
    at ru.ispras.microtesk.mmu.translator.MmuTranslator.start(MmuTranslator.java:123)
    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)

History

#1

Updated by Alexander Kamkin 9 months ago

  • Target version set to 2.5
  • Category changed from MMU Plugin to 47

Also available in: Atom PDF