}
```
-bitmask extract with reverse
+bitmask extract with reverse. can be done by bitinverting all of RA and getting bits of RA from the opposite end.
```
msb = rb[5:0];
rev[0:msb] = ra[msb:0];
rt = ZE(rev[msb:0]);
+
+uint_xlen_t bmextrev(RA, RB, sh)
+{
+ int shamt = (RB & (XLEN - 1));
+ shamt = (XLEN-1)-shamt; # shift other end
+ bra = bitreverse(RA) # swap LSB-MSB
+ mask = (2<<sh)-1;
+ return mask & (bra >> shamt);
+}
```
| 0.5|6.10|11.15|16.20|21.26| 27..30 |31| name |