HomeFreeBSD

x86: simplify ceil(log2(x)) function

Description

x86: simplify ceil(log2(x)) function

A function called mask_width in one place and log2 in the other
calculates its value in a more complex way than necessary. A simpler
implementation offered here saves a few bytes in the functions that
call it.

Reviewed by: alc, avg
Differential Revision: https://reviews.freebsd.org/D45483

Details

Provenance
dougmAuthored on Jun 4 2024, 6:00 PM
Reviewer
alc
Differential Revision
D45483: x86: simplify ceil(log2(x)) function
Parents
rG41d6858ebd6a: git-arc.1: list width typo
Branches
Unknown
Tags
Unknown