Introduce a ranged index operator for CoreDSL (currently, this is only supported for bit ranges, and with constant indices!)
X[rd] = MEM[base+3:base];
Make loads as wide as the assignment target, and stores as wide as the value to be written. This would be the first context-sensitive type rule in the language, and hence doesn't fit well into the overall semantics.
Problem
We currently define the main memory address space as: https://github.com/Minres/RISCV_ISA_CoreDSL/blob/28abf7c055fd58ea33853a083c9a098135182467/RISCVBase.core_desc#L48
Then, a single index expression like in here: https://github.com/Minres/RISCV_ISA_CoreDSL/blob/28abf7c055fd58ea33853a083c9a098135182467/RV32I.core_desc#L129-L137 ... would only yield a
char
result (as declared), which is then wrongly sign-extended to 32-bits.Possible solutions