File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
src/cmd/compile/internal/ssa Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -480,18 +480,10 @@ func nto(x int64) int64 {
480
480
481
481
// logX returns logarithm of n base 2.
482
482
// n must be a positive power of 2 (isPowerOfTwoX returns true).
483
- func log8 (n int8 ) int64 {
484
- return int64 (bits .Len8 (uint8 (n ))) - 1
485
- }
486
- func log16 (n int16 ) int64 {
487
- return int64 (bits .Len16 (uint16 (n ))) - 1
488
- }
489
- func log32 (n int32 ) int64 {
490
- return int64 (bits .Len32 (uint32 (n ))) - 1
491
- }
492
- func log64 (n int64 ) int64 {
493
- return int64 (bits .Len64 (uint64 (n ))) - 1
494
- }
483
+ func log8 (n int8 ) int64 { return log8u (uint8 (n )) }
484
+ func log16 (n int16 ) int64 { return log16u (uint16 (n )) }
485
+ func log32 (n int32 ) int64 { return log32u (uint32 (n )) }
486
+ func log64 (n int64 ) int64 { return log64u (uint64 (n )) }
495
487
496
488
// logXu returns the logarithm of n base 2.
497
489
// n must be a power of 2 (isUnsignedPowerOfTwo returns true)
You can’t perform that action at this time.
0 commit comments