add reprod examples for issues

This commit is contained in:
2025-10-10 13:56:49 +02:00
parent 25c93b8a73
commit f9649d4c5d
18 changed files with 431 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
// When substracting from an unsigned value, the result cannot auto-cast to the same unsigned type (e.g. "value of UI<32> - 1" gives a SI<33>, cannot be cast to UI<32>)
InstructionSet Zbb {
architectural_state {
unsigned int XLEN=32;
const register unsigned<32> XLEN_R = 32;
register unsigned<XLEN> X[32] [[is_main_reg]];
}
instructions {
TEST {
encoding: 12'b011000000000 :: rs1[4:0] :: 3'b001 :: rd[4:0] :: 7'b0010011;
assembly: "{name(rd)}, {name(rs1)}";
behavior: {
unsigned int test = XLEN_R - 1;
//unsigned int test = (unsigned int)(XLEN_R - 1);
X[rd] = test;
}
}
}
}