Update PAL and GC `BitScanForward` to use `__builtin_clz` (#89350)
authorAndy Ayers <andya@microsoft.com>
Sat, 22 Jul 2023 22:20:55 +0000 (15:20 -0700)
committerGitHub <noreply@github.com>
Sat, 22 Jul 2023 22:20:55 +0000 (15:20 -0700)
commitfa9f94d01bb0a4103058f7ceae27fe42613f2cf1
tree620789e2f7e50fcaf0912254dd1fdcb28d4e0019
parenta2ce8773521a111154e30ab0abe292d9f38d13e6
Update PAL and GC `BitScanForward` to use `__builtin_clz` (#89350)

The existing PAL code was using `__builtin_clzl` which is intended for platforms
where `long` is 64 bits. Instead use `__builtin_clz`.

The GC version had a similar issue so I've changed that too. The JIT version
was already using `__builtin_clz`.

Fixes #89340.
src/coreclr/gc/env/gcenv.base.h
src/coreclr/pal/inc/pal.h