Dan Nagle wrote:
...
> These intrinsics are defined in terms of the bit model,
> not the hardware.
Exactly. And the bit model is little endian. The bits with
the lowest bit addresses are the least significant bits. Those
are the "leading bits". They are always written as the rightmost
bits though. LEFTZ and RIGHTZ work as good mnemonics
for either endianness. LEADZ and TRAILZ don't.
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
|