Commit a15d036
committed
cmd/internal/obj/riscv: implement better bit pattern encoding
Replace the extractBitAndShift function with an encodeBitPattern function.
This allows the caller to specify a slice of bits that are to be extracted
and encoded, rather than making multiple function calls and combining the
results.
Change-Id: I3d51caa10ecf714f2ad2fb66d38376202c4e0628
Reviewed-on: https://go-review.googlesource.com/c/go/+/702397
Reviewed-by: Junyang Shao <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Mark Ryan <[email protected]>
Reviewed-by: Meng Zhuo <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>1 parent abb241a commit a15d036
1 file changed
+12
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1422 | 1422 | | |
1423 | 1423 | | |
1424 | 1424 | | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
1429 | 1435 | | |
1430 | 1436 | | |
1431 | 1437 | | |
| |||
1650 | 1656 | | |
1651 | 1657 | | |
1652 | 1658 | | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
1658 | | - | |
1659 | | - | |
1660 | | - | |
| 1659 | + | |
1661 | 1660 | | |
1662 | 1661 | | |
1663 | 1662 | | |
1664 | 1663 | | |
1665 | 1664 | | |
1666 | 1665 | | |
1667 | | - | |
1668 | | - | |
1669 | | - | |
1670 | | - | |
1671 | | - | |
1672 | | - | |
1673 | | - | |
1674 | | - | |
1675 | | - | |
1676 | | - | |
1677 | | - | |
| 1666 | + | |
1678 | 1667 | | |
1679 | 1668 | | |
1680 | 1669 | | |
| |||
0 commit comments