This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[gfortran,patch] Fix MVBITS calling conventions
- From: FX Coudert <fxcoudert at gmail dot com>
- To: "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 11 Jul 2007 21:11:14 +0100
- Subject: [gfortran,patch] Fix MVBITS calling conventions
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:to:message-id:content-type:cc:subject:from:date:x-mailer; b=No5eQmkWYyaLxwTpA1lCTt+fBvYnmZKztLq5tpRtU6NqBS4wZbzorXvXaAjPTugp+ghNM0547f5VZNw2YR81PgCfBoFFdUb7lLWBR+j2R5gOJ8g2AHsbWTolt7tE4rwoPpeUwWhoVJnsh7N8TJsUJwzkNBo9G/SE4SUyLD+nh6M=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:to:message-id:content-type:cc:subject:from:date:x-mailer; b=nYnQ06iQcoKAYKOyHvigZnp+xuuzs8boqzYAlgAvWDNSDRRQ60QXfBNYYiHopS3h1m8IlW+ZupY7EYfNYPYsArAPhmaK0VQ3CN4ENpFh4dZpV/fS/5QlWEmMO4fT0ckuP6+6UpTgOfKlDTW647QrtWNY5rnNUrJE6/7W4IKZ7/c=
Hi all,
Attached patch fixes the MVBITS intrinsic by changing the library
helper routine from:
SUB_NAME (const TYPE *from, const GFC_INTEGER_4 *frompos, const
GFC_INTEGER_4 *len, TYPE *to, const GFC_INTEGER_4 *topos)
to:
SUB_NAME (const TYPE *from, const int *frompos, const int *len,
TYPE *to, const int *topos)
where TYPE is the integer kind type of the two main variables (TO and
FROM). I also changed the front-end so that the FROMPOS, LEN and
TOPOS variables are converted into the right kind, which was not done
before and caused wrong-code on big-endian targets (PR 32357).
Bootstrapped and regtested on x86_64-linux, OK for mainline?
PS: if you wonder why I change from GFC_INTEGER_4 to C int, it's part
of a more general plan that I (and I believe a few others) have
subtly put in place to eradicate all hard-coded kind numbers in the
code. Yes, I know there will be some time before we can make gfortran
run on a platform where there is no integer(kind=4), but ideally I'd
like to get there.
Attachment:
mvbits.ChangeLog
Description: Binary data
Attachment:
mvbits.diff
Description: Binary data