This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: operand_subword question



  In message <200003020421.XAA05112@mal-ach.watson.ibm.com>you write:
  > 	I have not added long double support to the PowerPC port, but it
  > certainly could encounter the situation you describe in 64-bit PowerPC
  > mode. 
We're probably going to have to solve it soon.

I'm using this right now to deal with the problem, but I haven't really
thought about whether or not it's correct in regards to endianness
issues.

#if HOST_BITS_PER_WIDE_INT == 64
    else if (BITS_PER_WORD == 64)
      {
        val = k[i * 2 + ! WORDS_BIG_ENDIAN];
        val = (((val & 0xffffffff) ^ 0x80000000) - 0x80000000) << 32;
        val |= (HOST_WIDE_INT) k[i * 2 + WORDS_BIG_ENDIAN] & 0xffffffff;
        return GEN_INT (val);
      }
#endif


It's worth noting that REAL_VALUE_TO_TARGET_LONG_DOUBLE fills in an array
of 32bit wide hunks, not HOST_WIDE_INT wide hunks.


jeff


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