libc binuptime(): use the right function to get the most significant bit index

Reported and tested by:	Jaroslaw Pelczar <jarek@jpelczar.com>
PR:	261781
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2022-02-08 21:13:40 +02:00
parent 14a15342bb
commit a1f9326607

View File

@ -83,9 +83,9 @@ binuptime(struct bintime *bt, struct vdso_timekeep *tk, bool abs)
return (error);
scale = th->th_scale;
#ifdef _LP64
scale_bits = ffsl(scale);
scale_bits = flsl(scale);
#else
scale_bits = ffsll(scale);
scale_bits = flsll(scale);
#endif
if (__predict_false(scale_bits + fls(delta) > 63)) {
x = (scale >> 32) * delta;