mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-30 19:05:33 +00:00
Change the return type of function fls and clz as uint16_t; When the input is zero, INVALID_BIT_INDEX is returned; Update temporary variable type and return value check of caller when it call fls or clz; When input value is zero, clz returns 32 directly. V1-->V2: INVALID_BIT_INDEX instead of INVALID_NUMBER; Add type conversion as needed; Add "U/UL" for constant value as needed; Codeing style fixing. V2-->V3: Use type conversion to remove side effect of the variable which stores fls/clz return value; fls return INVALID_BIT_INDEX directly when the input value is zero. V3-->v4: Clean up comments for fls. Note: For instruction "bsrl", destination register value is undefined when source register value is zero. Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com> |
||
---|---|---|
.. | ||
crypto | ||
atomic.h | ||
bits.h | ||
errno.h | ||
list.h | ||
macros.h | ||
mem_mgt.h | ||
rtl.h | ||
spinlock.h | ||
sprintf.h | ||
stdarg.h | ||
types.h | ||
util.h |