Skip to content

Commit 487bddf

Browse files
committed
fixes missing partial analysis handling for prefix expressions
1 parent f11eacc commit 487bddf

File tree

3 files changed

+3062
-3065
lines changed

3 files changed

+3062
-3065
lines changed

com.minres.coredsl.tests/src/com/minres/coredsl/tests/CoreDslParsingTest.xtend

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,29 @@ class CoreDslParsingTest {
257257
assertTrue(issues.filter[it.severity == Severity.ERROR].isEmpty())
258258
assertTrue(issues.size == 1)
259259
}
260+
@Test
261+
def void unaryExpressionFromIndexed() {
262+
val content = '''
263+
InstructionSet TestISA {
264+
architectural_state {
265+
unsigned int XLEN;
266+
register unsigned<XLEN> X[32];
267+
}
268+
instructions {
269+
FOO {
270+
encoding: 0b0000000 :: rs2[4:0] :: rs1[4:0] :: 0b000 :: rd[4:0] :: 0b1111011;
271+
behavior: {
272+
if (rd != 0) {
273+
X[rd][15: 0] = (unsigned<16>)(-X[rs1][15: 0]);
274+
}
275+
}
276+
}
277+
}
278+
}
279+
'''.parse
280+
val issues = validator.validate(content)
281+
for (iss : issues) println(iss)
282+
assertTrue(issues.filter[it.severity == Severity.ERROR].isEmpty())
283+
assertTrue(issues.size == 0)
284+
}
260285
}

0 commit comments

Comments
 (0)