This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] Fix PR17631: intrinsic MVBITS missing
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: GCC Fortran mailing list <fortran at gcc dot gnu dot org>
- Cc: patch <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 Sep 2004 20:56:28 +0200
- Subject: Re: [gfortran] Fix PR17631: intrinsic MVBITS missing
- References: <415319B7.9010406@physik.uni-muenchen.de>
Sorry, hit send to early.
Tobias Schlüter wrote:
> void
> prefix (mvbits) (GFC_INTEGER_4 *from, GFC_INTEGER_4 *frompos,
> GFC_INTEGER_4 *len, GFC_INTEGER_4 *to,
> GFC_INTEGER_4 *topos)
> {
> GFC_INTEGER_4 oldbits, newbits, lenmask;
>
> lenmask = (1 << *len) - 1;
> newbits = ((*from & (lenmask << *frompos)) >> *frompos) << *topos;
> oldbits = *to & !(lenmask << *topos);
^ that should be ~
>
> *to = newbits | oldbits;
> }
But even with that fix it doesn't work right now, maybe I'm linking with the
wrong version. Ok, if I understand what is going wrong?
- Tobi