Andrew Pinski <pinskia@physics.uc.edu> writes:
A follow of the comments I received, I have only right now added the
simple cases of HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT and
HOST_BITS_PER_INT == HOST_BITS_PER_LONG. I might implement the other
part of the patch for when HOST_BITS_PER_WIDE_INT ==
HOST_BITS_PER_LONG_LONG and HOST_BITS_PER_WIDE_INT ==
HOST_BITS_PER_LONG but this might take some time because I have to add
some more builtins but it will clean things up.
I'm not enthusiastic about all the #ifdefs.
glibc provides ffsl and ffsll which take 'long' and 'long long'
respectively; may I suggest that you follow these steps:
1) put ffsl and ffsll into libiberty.
2) have hwint.h #define ffs_hwi and ffs_hwidesti appropriately
3) use ffs/ffsl/ffsll/ffs_hwi throughout the compiler
4) create __builtin_ffsl and __builtin_ffsll
zw