Page MenuHomeFreeBSD

illums compat: use flsl/flsll for highbit/highbit64
ClosedPublic

Authored by avg on Jun 16 2015, 2:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 3 2024, 6:46 PM
Unknown Object (File)
Dec 20 2023, 1:17 AM
Unknown Object (File)
Nov 18 2023, 11:35 AM
Unknown Object (File)
Oct 25 2023, 5:14 PM
Unknown Object (File)
Oct 21 2023, 4:16 PM
Unknown Object (File)
Sep 27 2023, 11:14 PM
Unknown Object (File)
Aug 31 2023, 11:54 AM
Unknown Object (File)
Jun 25 2023, 1:25 PM
Subscribers
None

Details

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

avg retitled this revision from to illums compat: use flsl/flsll for highbit/highbit64.
avg updated this object.
avg edited the test plan for this revision. (Show Details)
avg added reviewers: smh, mav, will, gibbs, delphij.
delphij edited edge metadata.

Looks good to me.

This revision is now accepted and ready to land.Jun 16 2015, 9:29 PM
mav edited edge metadata.

It would be good to upstream it. I don't know why it was implemented originally, but it seems that at least on user level Illumos has fsll() and co.

This revision was automatically updated to reflect the committed changes.

This was backed out because of build problems on platforms other than amd64.

This revision is now accepted and ready to land.Jun 17 2015, 7:52 PM
avg edited edge metadata.

highbit: use only fast flsl/flsll versions

Currently libkern flsl/flsll are even less optimized than the original
code. The same goes for libc implementations on most platforms.

This revision now requires review to proceed.Jun 18 2015, 8:32 AM

Could you please re-review?
I believe that the latest diff should be safe on all platforms.

delphij edited edge metadata.
This revision is now accepted and ready to land.Jun 18 2015, 6:57 PM
mahrens edited edge metadata.

Looks fine to me. FWIW, illumos appears to have flsll() in userland but not kernel. It's implemented similarly to highbit().

Checking HAVE_INLINE_* define is what I am successfully using in SCHED_ULE for some time now, so it should work. Though I hope somebody implement missing functions on other platforms to reach the parity and avoid this mess.

mav edited edge metadata.
This revision was automatically updated to reflect the committed changes.