Handle the range of the immediate shift and extract instructions
Created by: melonedo
As per discussion in openhwgroup/corev-gcc#71, these instructions have an immediate whose range is not the full range, [0, 63], is there special care needed to be taken for these instructions?
Note that
cv.sll/sra/srl.b/h
only uses the lower 3 or 4 bits since each element of the vector is 8 or 16 bits long.The assembler handles this. However, no errors or warnings are generated if the input to the immediate is larger than 4 bits.
Also,
cv.extract/extractu.b/h
only uses the lower 1 or 2 bits since the length of the vectors is 2 or 4.Same for
cv.extract/extractu.b/h
.
Originally posted by @MaryBennett
in https://github.com/openhwgroup/corev-gcc/issues/71#issuecomment-1708218272