This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] Fix PR17631: intrinsic MVBITS missing


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]