[libgfortran, patch] Remove runtime clz() and ctz() bit intrisic functions

FX fxcoudert@gmail.com
Mon Dec 19 14:54:00 GMT 2016


We implement the LEADZ and TRAILZ intrinsics in terms of the built-in clz() and ctz() functions. Since these are not available for 128-bit integer types, we used to have support functions _gfortran_clz128() and _gfortran_ctz128() in libgfortran. In 2010, I applied a patch to avoid this and emit the necessary arithmetic directly from the front-end (https://gcc.gnu.org/ml/fortran/2010-09/msg00181.html). The support functions were kept in libgfortran for backward compatibility, but we can now remove them as we break the ABI.

Attached patch is bootstrapped and regtested on x86_64-apple-darwin13.6.0.
OK to commit?

FX

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitint.ChangeLog
Type: application/octet-stream
Size: 246 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161219/8312b61e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitint.diff
Type: application/octet-stream
Size: 3539 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161219/8312b61e/attachment-0001.obj>


More information about the Gcc-patches mailing list