Closed AtomCrafty closed 1 year ago
The specification should be extended by stating that unspecified bits are filled with zero.
You mean if we have something like ... :: imm[20:10] :: ... :: imm[4:0] :: ...
, then imm[9:5] = 5'b00000
, right? Yeah, that makes sense.
imm[10:5] :: imm[7:3]
should be an error.
I'll add that to the spec.
You mean if we have something like
... :: imm[20:10] :: ... :: imm[4:0] :: ...
, thenimm[9:5] = 5'b00000
, right?
Yes, and that isn't even hypothetical. For example the LUI
instruction's encoding only specifies the upper 20 bits.
The specification currently doesn't define what happens to operand bits not covered by any encoding fields' bit range or covered by multiple overlapping ranges.