* [RS6000] Enable long-double support for little-endian
@ 2013-06-04 13:11 Alan Modra
2013-06-04 13:57 ` David Edelsohn
0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2013-06-04 13:11 UTC (permalink / raw)
To: gcc-patches; +Cc: David Edelsohn
This enables long double support for little-endian. It assumes we keep
the same ordering as big-endian, ie. the first double is the larger
magnitude or inf/nan. Bootstrapped powerpc64-linux. OK to apply?
* config/rs6000/ibm-ldouble.c: Enable for little-endian.
Index: libgcc/config/rs6000/ibm-ldouble.c
===================================================================
--- libgcc/config/rs6000/ibm-ldouble.c (revision 199174)
+++ libgcc/config/rs6000/ibm-ldouble.c (working copy)
@@ -42,10 +42,10 @@
represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a
NaN is don't-care.
- This code currently assumes big-endian. */
+ This code currently assumes the most significant double is in
+ the lower numbered register or lower addressed memory. */
-#if (!defined (__LITTLE_ENDIAN__) \
- && (defined (__MACH__) || defined (__powerpc__) || defined (_AIX)))
+#if defined (__MACH__) || defined (__powerpc__) || defined (_AIX)
#define fabs(x) __builtin_fabs(x)
#define isless(x, y) __builtin_isless (x, y)
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RS6000] Enable long-double support for little-endian
2013-06-04 13:11 [RS6000] Enable long-double support for little-endian Alan Modra
@ 2013-06-04 13:57 ` David Edelsohn
0 siblings, 0 replies; 2+ messages in thread
From: David Edelsohn @ 2013-06-04 13:57 UTC (permalink / raw)
To: GCC Patches, Alan Modra
On Tue, Jun 4, 2013 at 9:11 AM, Alan Modra <amodra@gmail.com> wrote:
> This enables long double support for little-endian. It assumes we keep
> the same ordering as big-endian, ie. the first double is the larger
> magnitude or inf/nan. Bootstrapped powerpc64-linux. OK to apply?
>
> * config/rs6000/ibm-ldouble.c: Enable for little-endian.
>
> Index: libgcc/config/rs6000/ibm-ldouble.c
> ===================================================================
> --- libgcc/config/rs6000/ibm-ldouble.c (revision 199174)
> +++ libgcc/config/rs6000/ibm-ldouble.c (working copy)
> @@ -42,10 +42,10 @@
> represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a
> NaN is don't-care.
>
> - This code currently assumes big-endian. */
> + This code currently assumes the most significant double is in
> + the lower numbered register or lower addressed memory. */
>
> -#if (!defined (__LITTLE_ENDIAN__) \
> - && (defined (__MACH__) || defined (__powerpc__) || defined (_AIX)))
> +#if defined (__MACH__) || defined (__powerpc__) || defined (_AIX)
>
> #define fabs(x) __builtin_fabs(x)
> #define isless(x, y) __builtin_isless (x, y)
This is okay as an interim solution.
Thanks, David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-04 13:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-04 13:11 [RS6000] Enable long-double support for little-endian Alan Modra
2013-06-04 13:57 ` David Edelsohn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).