This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [fortran, patch] Add new bit intrinsics
- 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: Wed, 08 Sep 2010 10:21:52 +0200
- Subject: Re: [fortran, patch] Add new bit intrinsics
- References: <900E8436-F2B7-4BAA-A77A-D33C08F92168@gmail.com>
On 09/08/2010 02:01 AM, FX wrote:
The attached patch adds the remaining F2008 bit intrinsics: DSHIFTL, DSHIFTR, SHIFTA, SHIFTL, SHIFTR, MASKL, MASKR, BGE, BGT, BLE, BLT, and MERGE_BITS.
All come with compile-time simplification routines for constant arguments. Otherwise, all intrinsics are implemented by emitting the code directly from trans-intrinsic.c, without any library function. I have also gathered code-generating and simplification functions for the previsouly existing shift intrinsics (ISHFT, LSHIFT, RSHIFT; the last two currently don't have compile-time simplification).
I think all functions are thoroughly tested through multiple testcases.
Regtested on x86_64-linux (both -m32 and -m64), OK to commit?
/* Selects bewteen current value and extremum for simplify_min_max
Can you change "bewteen" to "between" in simplify.c (old typo).
Otherwise, I have not spotted any problem - thus, I hope there are none
and give hence an: OK.
(I wouldn't mind if someone else could also browse the source - one can
easily miss copy'n'paste errors.)
Tobias