---------- Forwarded message ----------
Date: Thu, 24 May 2018 17:04:14 +0800
From: Liu Hao <[email protected]>
To: Martin Storsjö <[email protected]>
Subject: Re: [Mingw-w64-public] [PATCH v2 1/3] headers: Add missing
BitScanForward/Reverse functions for arm and arm64
在 2018/5/24 16:06, Martin Storsjö 写道:
No, not sizeof(long). It would be sizeof(__LONG32), or sizeof(Mask).
But I checked with MSYS2 for x64, and even if sizeof(long) == 8, it still has
got sizeof(__LONG32) == 4, just as it should.
So with that, I think the extra rewrite is a little pointless since it's a
datatype that has the exact size written in the type name itself. Buf if you
insist, I could make it sizeof(__LONG32).
// Martin
The problem is that the parameter of `__builtin_clzl()` has type `unsigned
long` rather than an integral type of a fixed length. The argument having type
`__LONG32` will be converted to `unsigned long` implicitly and you get the
number of leading zeroes of the parameter rather than that of the argument.
--
Best regards,
LH_Mouse
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public