[llvm-commits] [llvm-gcc-4.2] r80113 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-types.cpp
Anton Korobeynikov
asl at math.spbu.ru
Wed Aug 26 10:35:23 PDT 2009
Author: asl
Date: Wed Aug 26 12:35:23 2009
New Revision: 80113
URL: http://llvm.org/viewvc/llvm-project?rev=80113&view=rev
Log:
Unbreak FP128 stuff and enable it on s390x.
Something similar will be requied for sparc.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
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=80113&r1=80112&r2=80113&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Aug 26 12:35:23 2009
@@ -7059,7 +7059,8 @@
((uint64_t)((uint32_t)RealArr[1]) << 32);
UArr[1] = (uint16_t)RealArr[2];
return ConstantFP::get(Context, APFloat(APInt(80, 2, UArr)));
- } else if (Ty==Type::getPPC_FP128Ty(Context)) {
+ } else if (Ty==Type::getPPC_FP128Ty(Context) ||
+ Ty==Type::getFP128Ty(Context)) {
long RealArr[4];
uint64_t UArr[2];
REAL_VALUE_TO_TARGET_LONG_DOUBLE(TREE_REAL_CST(exp), RealArr);
@@ -7068,7 +7069,9 @@
((uint64_t)((uint32_t)RealArr[1]));
UArr[1] = ((uint64_t)((uint32_t)RealArr[2]) << 32) |
((uint64_t)((uint32_t)RealArr[3]));
- return ConstantFP::get(Context, APFloat(APInt(128, 2, UArr)));
+ return ConstantFP::get(Context,
+ APFloat(APInt(128, 2, UArr),
+ /*isIEEE*/ Ty==Type::getFP128Ty(Context)));
}
assert(0 && "Floating point type not handled yet");
return 0; // outwit compiler warning
Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=80113&r1=80112&r2=80113&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Wed Aug 26 12:35:23 2009
@@ -745,8 +745,8 @@
case 128:
#ifdef TARGET_POWERPC
return SET_TYPE_LLVM(type, Type::getPPC_FP128Ty(Context));
-#elif 0
- // This is for IEEE double extended, e.g. Sparc
+#elif defined(TARGET_ZARCH) // FIXME: Use some generic define.
+ // This is for IEEE double extended, e.g. Sparc
return SET_TYPE_LLVM(type, Type::getFP128Ty(Context));
#else
// 128-bit long doubles map onto { double, double }.
More information about the llvm-commits
mailing list