[llvm-commits] [llvm-gcc-4.2] r67563 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Dale Johannesen
dalej at apple.com
Mon Mar 23 14:18:01 PDT 2009
Author: johannes
Date: Mon Mar 23 16:18:00 2009
New Revision: 67563
URL: http://llvm.org/viewvc/llvm-project?rev=67563&view=rev
Log:
Fix fp80 internal representation to use {low64,
high16} like a normal i80.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.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=67563&r1=67562&r2=67563&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Mar 23 16:18:00 2009
@@ -6413,12 +6413,9 @@
long RealArr[4];
uint64_t UArr[2];
REAL_VALUE_TO_TARGET_LONG_DOUBLE(TREE_REAL_CST(exp), RealArr);
-
- UArr[0] = ((uint64_t)((uint16_t)RealArr[2]) << 48) |
- ((uint64_t)((uint32_t)RealArr[1]) << 16) |
- ((uint64_t)((uint16_t)(RealArr[0] >> 16)));
- UArr[1] = (uint16_t)RealArr[0];
-
+ UArr[0] = ((uint64_t)((uint32_t)RealArr[0])) |
+ ((uint64_t)((uint32_t)RealArr[1]) << 32);
+ UArr[1] = (uint16_t)RealArr[2];
return ConstantFP::get(APFloat(APInt(80, 2, UArr)));
} else if (Ty==Type::PPC_FP128Ty) {
long RealArr[4];
More information about the llvm-commits
mailing list