Fixes: https://bugs.libre-soc.org/show_bug.cgi?id=1161
```
if extra3_mode:
spec = EXTRA3
- else:
- spec = EXTRA2 << 1 # same as EXTRA3, shifted
+ elif EXTRA2[0]: # vector mode, can express even registers in r0-126
+ spec = EXTRA2 << 1 # same as EXTRA3, shifted
+ else: # scalar mode, can express registers in r0-63
+ spec = (EXTRA2[0] << 2) | EXTRA2[1]
if spec[0]: # vector
return (RA << 2) | spec[1:2]
else: # scalar
```
if extra3_mode:
spec = EXTRA3
- else:
- spec = EXTRA2<<1 | 0b0
+ elif EXTRA2[0]: # vector mode
+ spec = EXTRA2 << 1 # same as EXTRA3, shifted
+ else: # scalar mode
+ spec = (EXTRA2[0] << 2) | EXTRA2[1]
if spec[0]:
# vector constructs "BA[0:2] spec[1:2] 00 BA[3:4]"
return ((BA >> 2)<<6) | # hi 3 bits shifted up