Changeset a35b458 in mainline for kernel/generic/include/bitops.h
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/bitops.h
r3061bc1 ra35b458 54 54 { 55 55 uint8_t n = 0; 56 56 57 57 if (arg >> 16) { 58 58 arg >>= 16; 59 59 n += 16; 60 60 } 61 61 62 62 if (arg >> 8) { 63 63 arg >>= 8; 64 64 n += 8; 65 65 } 66 66 67 67 if (arg >> 4) { 68 68 arg >>= 4; 69 69 n += 4; 70 70 } 71 71 72 72 if (arg >> 2) { 73 73 arg >>= 2; 74 74 n += 2; 75 75 } 76 76 77 77 if (arg >> 1) 78 78 n += 1; 79 79 80 80 return n; 81 81 } … … 89 89 { 90 90 uint8_t n = 0; 91 91 92 92 if (arg >> 32) { 93 93 arg >>= 32; 94 94 n += 32; 95 95 } 96 96 97 97 return n + fnzb32((uint32_t) arg); 98 98 }
Note:
See TracChangeset
for help on using the changeset viewer.