| Age | Commit message (Collapse) | Author | Files | Lines |
|
Add log2_exact() to get the base 2 logarithm of a value known
to be a power of 2.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
Add is_power_of_2() to test if a value is a power of 2.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
Zero & sign-extensions are relatively common operations
which are currently open-coded at each use.
Define helpers for doing these operations.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|