X32 psABI status update
Hi, Many x32 bugs are fixed in kernel, glibc, binutils and GCC: https://sites.google.com/site/x32abi/ The major remaining issues are glibc/gcc testsuite failures, kernel core dump and signal handler unwind. -- H.J.
__builtin_clzll and uintmax_t
Hello, the following question came up for a libstdc++ patch. We have a variable of type uintmax_t and want to count the leading zeros. Can we just call __builtin_clzll on it? In particular, can uintmax_t be larger than unsigned long long in gcc? Is __builtin_clzll available on all platforms? Is there a good reason to use __builtin_clzl instead on platforms where long and long long have the same size? In case it matters, this is strictly for compile-time computations (templates, constexpr). -- Marc Glisse
Re: __builtin_clzll and uintmax_t
Salut Marc ! > We have a variable of type uintmax_t and want to count the leading zeros. Can > we just call __builtin_clzll on it? Yes. > In particular, can uintmax_t be larger than unsigned long long in gcc? uintmax_t is the largest of the standard unsigned C types, so it cannot be larger than unsigned long long. On x86_64, for example: > #include > #include > > int main (void) > { > printf ("%lu ", sizeof (uintmax_t)); > printf ("%lu ", sizeof (int)); > printf ("%lu ", sizeof (long int)); > printf ("%lu ", sizeof (long long int)); > printf ("%lu\n", sizeof (__int128)); > } gives : 8 4 8 8 16 > Is __builtin_clzll available on all platforms? Yes, we emit calls to this built-in unconditionally in the Fortran front-end, and it has caused no trouble. FX
gcc-4.6-20110305 is now available
Snapshot gcc-4.6-20110305 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.6-20110305/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.6 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/trunk revision 170704 You'll find: gcc-4.6-20110305.tar.bz2 Complete GCC (includes all of below) MD5=081ee3a73100cc620261997535de34fb SHA1=c8ebeab02f3b8ea76d5d4fb85b30f0821b2cedd2 gcc-core-4.6-20110305.tar.bz2C front end and core compiler MD5=83c4a7396c388f600993042b45245f29 SHA1=b5c2d5ba10d5ab22c521ba8698e6e40822ba5a93 gcc-ada-4.6-20110305.tar.bz2 Ada front end and runtime MD5=9d18bca0a9647d7b2aadaf3a2223c503 SHA1=765c9e9ba1faed71666bfe696a071581c74e378b gcc-fortran-4.6-20110305.tar.bz2 Fortran front end and runtime MD5=c5735c3d44d11106455761c3f0d6941e SHA1=06b61d06c41f685f15b559ccdeb468cf2d9207a5 gcc-g++-4.6-20110305.tar.bz2 C++ front end and runtime MD5=1a9141c0c90a8c80ff5e3daa899c2fc8 SHA1=3962fc9f945f25e0b78e5fbfca4a19bf56ce8c9b gcc-go-4.6-20110305.tar.bz2 Go front end and runtime MD5=ea2e40ef6670680d97f5a956fb01a9bc SHA1=1cf30adec2e7e277aa86dd8c0ae94515a41f7849 gcc-java-4.6-20110305.tar.bz2Java front end and runtime MD5=ad5cad4875a595e42d5795b6c1724411 SHA1=f24f61cd7a272b4513facd3a05b9b8401e351df4 gcc-objc-4.6-20110305.tar.bz2Objective-C front end and runtime MD5=3209cb90c96d11cef9d1c104cf5f8f5b SHA1=b3a48d15d7d32d1bda870ec24b00874d70b9633f gcc-testsuite-4.6-20110305.tar.bz2 The GCC testsuite MD5=fab705b1ffe47076f434ae42a81f2950 SHA1=d4821ecbcacad333b35240528f2bb78786e94516 Diffs from 4.6-20110226 are available in the diffs/ subdirectory. When a particular snapshot is ready for public consumption the LATEST-4.6 link is updated and a message is sent to the gcc list. Please do not use a snapshot before it has been announced that way.
-flto tests don't pick up libgloss code at link time
All of the -flto tests fail for moxie-elf... http://gcc.gnu.org/ml/gcc-testresults/2011-03/msg00399.html It turns out that this is because it fails to link with the code in libgloss when I enable -flto. I link the test code with a special linker script (sim.ld) that pulls in the libgloss code found in the moxie libgloss port's libsim.a. Unfortunately it looks like this just doesn't happen with -flto. Any ideas why? Thanks, AG