add reprod examples for issues
This commit is contained in:
24
reprod/6_precalc_fixed.core_desc
Normal file
24
reprod/6_precalc_fixed.core_desc
Normal file
@@ -0,0 +1,24 @@
|
||||
// The compiler does not seem to precalculate fixed expressions
|
||||
// This can be seen e.g. as it breaks loop unrolling (see also dynamic_loop)
|
||||
|
||||
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 count = XLEN_R;
|
||||
for(int i=0; i<=32-1; i++){
|
||||
//for(int i=0; i<=31; i++){
|
||||
count = 1;
|
||||
}
|
||||
X[rd] = count;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user