This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran, patch] LEADZ and TRAILZ for integer(kind=16)
- From: Tobias Burnus <burnus at net-b dot de>
- To: FX <fxcoudert at gmail dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 07 Sep 2010 17:47:18 +0200
- Subject: Re: [fortran, patch] LEADZ and TRAILZ for integer(kind=16)
- References: <DA437B71-480F-40A4-9CDB-1D9B43CB2FE3@gmail.com>
On 09/07/2010 10:16 AM, FX wrote:
Attached patch improves the code generated for the LEADZ and TRAILZ intrinsics. For integer(kind=16), which is larger than C long long type, no builtin is present in the middle-end. Currently, we called library clz128/ctz128 functions in libgfortran.
The question I have is: what should be done with the libgfortran functions? I think, for backward compatibility, we need to keep them, but I may be wrong.
Yes, they have to remain their until we break the backward
compatibility, which is planned to do when the new array descriptor is
committed. I have added it to the items at
http://gcc.gnu.org/wiki/LibgfortranAbiCleanup
Bootstrapped and regtested on x86_64-linux. OK to commit?
OK. Thanks for the patch. (I saw that the existing leadz_trailz_2.f90
checks for the correctness.)
Tobias