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: integer*8 parsing problem


	The change to gfc_conv_mpz_to_tree has caused the 19990313-N.f
testsuite regressions on PowerPC systems.  On PowerPC, mp_limb_t is 32
bits and HOST_WIDE_INT is 64 bits.  Limbs are stored little endian, but
the extraction function using mpz_getlimbn shifts the lowest numbered limb
into the most significant word for each HOST_WIDE_INT.

          for (low = n = 0; n < count; ++n)
            {
              low <<= shift;
              low |= mpz_getlimbn (i, n);
            }

	Did you consider using mpz_export instead of extracting the limbs
explicitly for the various cases of mp_limb_t and HWI?  For example,

          HOST_WIDE_INT buf[2];
          mpz_export (buf, NULL, 1, HOST_BITS_PER_WIDE_INT / CHAR_BIT,
                      1, 0, i);
          low = buf[0];
          high = buf[1];

or iterating from count-1 to 0?

David


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