This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] real.c IBM 128-bit extended format support


On Tue, Sep 24, 2002 at 01:51:56PM -0400, David Edelsohn wrote:
> +   if (FLOAT_WORDS_BIG_ENDIAN)
> +     {
> +       buf[0] = image[0];
> +       buf[1] = image[1];
> +       buf[2] = image[2];
> +       buf[3] = image[3];
> +     }
> +   else
> +     {
> +       buf[0] = image[3];
> +       buf[1] = image[2];
> +       buf[2] = image[1];
> +       buf[3] = image[0];
> +     }

This isn't really right.  The little-endian case should be

	buf[0] = image[1];
	buf[1] = image[0];
	buf[2] = image[3];
	buf[3] = image[2];

We're dealing with an array of doubles, after all.

Otherwise ok.


r~


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