… | |
… | |
233 | x *= 0x01010101; |
233 | x *= 0x01010101; |
234 | |
234 | |
235 | return x >> 24; |
235 | return x >> 24; |
236 | } |
236 | } |
237 | |
237 | |
238 | /* you have the choice beetween something with a table lookup, */ |
|
|
239 | /* something using lots of bit arithmetic and a simple loop */ |
|
|
240 | /* we went for the loop */ |
|
|
241 | ecb_function_ int ecb_ld32 (uint32_t x) ecb_const; |
238 | ecb_function_ int ecb_ld32 (uint32_t x) ecb_const; |
242 | ecb_function_ int ecb_ld32 (uint32_t x) |
239 | ecb_function_ int ecb_ld32 (uint32_t x) |
243 | { |
240 | { |
244 | int r = 0; |
241 | int r = 0; |
245 | |
242 | |