[llvm-commits] [llvm-gcc-4.2] r43135 - in /llvm-gcc-4.2/trunk/gcc: config/rs6000/darwin-ldouble.c config/rs6000/darwin-libgcc.10.4.ver config/rs6000/darwin-libgcc.10.5.ver config/rs6000/darwin.h llvm-convert.cpp
Dale Johannesen
dalej at apple.com
Thu Oct 18 10:12:35 PDT 2007
Author: johannes
Date: Thu Oct 18 12:12:34 2007
New Revision: 43135
URL: http://llvm.org/viewvc/llvm-project?rev=43135&view=rev
Log:
Enable 128-bit long double on PPC darwin.
Remove hacks in library functions and build which
worked around its absence.
This changes the ABI. Also note that some functions
in libgcc now have a different interface, so make
sure you build and pick up the right ones.
Make double constants work on big-endian host/big-endian
target (cross compile to the other endianness is broken).
Modified:
llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-ldouble.c
llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-libgcc.10.4.ver
llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-libgcc.10.5.ver
llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-ldouble.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-ldouble.c?rev=43135&r1=43134&r2=43135&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-ldouble.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-ldouble.c Thu Oct 18 12:12:34 2007
@@ -165,11 +165,7 @@
/* Use fused multiply-add to get low part of a * c. */
#ifndef _SOFT_FLOAT
-/* LLVM LOCAL begin */
-#ifndef __llvm__ /* FIXME: no long double support! */
asm ("fmsub %0,%1,%2,%3" : "=f"(tau) : "f"(a), "f"(c), "f"(t));
-#endif
-/* LLVM LOCAL end */
#else
tau = fmsub (a, c, t);
#endif
@@ -206,11 +202,7 @@
/* Use fused multiply-add to get low part of c * t. */
#ifndef _SOFT_FLOAT
-/* LLVM LOCAL begin */
-#ifndef __llvm__ /* FIXME: no long double support! */
asm ("fmsub %0,%1,%2,%3" : "=f"(sigma) : "f"(c), "f"(t), "f"(s));
-#endif
-/* LLVM LOCAL end */
#else
sigma = fmsub (c, t, s);
#endif
Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-libgcc.10.4.ver
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-libgcc.10.4.ver?rev=43135&r1=43134&r2=43135&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-libgcc.10.4.ver (original)
+++ llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-libgcc.10.4.ver Thu Oct 18 12:12:34 2007
@@ -35,18 +35,15 @@
___ffsdi2
___fixdfdi
___fixsfdi
-# LLVM LOCAL FIXME!
-#___fixtfdi
+___fixtfdi
___fixunsdfdi
___fixunsdfsi
___fixunssfdi
___fixunssfsi
-# LLVM LOCAL FIXME!
-#___fixunstfdi
+___fixunstfdi
___floatdidf
___floatdisf
-# LLVM LOCAL FIXME!
-#___floatditf
+___floatditf
___gcc_personality_v0
___gcc_qadd
___gcc_qdiv
Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-libgcc.10.5.ver
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-libgcc.10.5.ver?rev=43135&r1=43134&r2=43135&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-libgcc.10.5.ver (original)
+++ llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin-libgcc.10.5.ver Thu Oct 18 12:12:34 2007
@@ -34,24 +34,20 @@
___divdc3
___divdi3
___divsc3
-# LLVM LOCAL FIXME!
-#___divtc3
+___divtc3
___enable_execute_stack
___ffsdi2
___fixdfdi
___fixsfdi
-# LLVM LOCAL FIXME!
-#___fixtfdi
+___fixtfdi
___fixunsdfdi
___fixunsdfsi
___fixunssfdi
___fixunssfsi
-# LLVM LOCAL FIXME!
-#___fixunstfdi
+___fixunstfdi
___floatdidf
___floatdisf
-# LLVM LOCAL FIXME!
-#___floatditf
+___floatditf
___floatundidf
___floatundisf
___floatunditf
@@ -65,8 +61,7 @@
___muldc3
___muldi3
___mulsc3
-# LLVM LOCAL FIXME!
-#___multc3
+___multc3
___mulvdi3
___mulvsi3
___negdi2
@@ -78,8 +73,7 @@
___popcountsi2
___powidf2
___powisf2
-# LLVM LOCAL FIXME!
-#___powitf2
+___powitf2
___register_frame
___register_frame_info
___register_frame_info_bases
Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h?rev=43135&r1=43134&r2=43135&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h Thu Oct 18 12:12:34 2007
@@ -95,15 +95,7 @@
consistency; arithmetic will work even if libc and libm support is
not available. */
-/* LLVM LOCAL begin */
-#ifndef ENABLE_LLVM
#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
-#else
-/* FIXME: no long double support yet! */
-#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 64
-#endif
-/* LLVM LOCAL end */
-
/* We want -fPIC by default, unless we're using -static to compile for
the kernel or some such. */
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=43135&r1=43134&r2=43135&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Oct 18 12:12:34 2007
@@ -5236,10 +5236,11 @@
UArr[0] = RealArr[0]; // Long -> int convert
UArr[1] = RealArr[1];
- // FIXME: verify on big-endian targets and cross from big- to little- endian
- // targets
- if (FLOAT_WORDS_BIG_ENDIAN)
- std::swap(UArr[0], UArr[1]);
+ // We want to switch the words of UArr if host and target endianness
+ // do not match. FLOAT_WORDS_BIG_ENDIAN describes the target endianness.
+ // The host's used to be available in HOST_WORDS_BIG_ENDIAN, but the gcc
+ // maintainers removed this in a fit of cleanliness between 4.0
+ // and 4.2. For now, host and target endianness must match.
return ConstantFP::get(Ty, Ty==Type::FloatTy ? APFloat((float)V)
: APFloat(V));
More information about the llvm-commits
mailing list