search for: convertreal_cst

Displaying 5 results from an estimated 5 matches for "convertreal_cst".

2007 Oct 19
3
[LLVMdev] troubles with llvm-gcc 4.0 and APFloat on X86_64
...m-gcc frontend seems to cause troubles with single precision floating point values, i.e., they are not converted correctly to the particular target format (double precision works as expected). it seems the problem is related to the following piece of code taken from APFloat.cpp:1836 (called from ConvertREAL_CST) APFloat::APFloat(float f) { APInt api = APInt(32, 0); initFromAPInt(api.floatToBits(f)); } i guess the floatToBits call will return the wrong half word since ints are 4, but float and double are both 8 byte on x86_64 (but i'm not yet sure). is anybody having the same kind of proble...
2007 Oct 19
0
[LLVMdev] troubles with llvm-gcc 4.0 and APFloat on X86_64
...I haven't seen this problem. You say the frontend; to check, llvm-gcc -O0 -S -emit-llvm file.c -o file.ll produces an invalid constant in the .ll file? Can you give an example? > it seems the problem is related to the following piece of code taken > from APFloat.cpp:1836 (called from ConvertREAL_CST) > APFloat::APFloat(float f) { > APInt api = APInt(32, 0); > initFromAPInt(api.floatToBits(f)); > } > > i guess the floatToBits call will return the wrong half word since > ints > are 4, but float and double are both 8 byte on x86_64 (but i'm not yet > sure)...
2007 Aug 22
1
[LLVMdev] Problems building llvm-gcc-4.2 on ppc32, OS X 10.4.10
...not connected to your problem. 1. You might need the following patch for FP constants to work properly: diff --git a/gcc/llvm-convert.cpp b/gcc/llvm-convert.cpp index 4c9c8d0..db8c6ba 100644 --- a/gcc/llvm-convert.cpp +++ b/gcc/llvm-convert.cpp @@ -5157,11 +5157,6 @@ Constant *TreeConstantToLLVM::ConvertREAL_CST(tree exp) { 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]); - return ConstantFP::get(Ty, V); } This is...
2007 Oct 20
2
[LLVMdev] troubles with llvm-gcc 4.0 and APFloat on X86_64
...nls --disable-threads --with-float=soft --enable-languages=c Thread model: single i've applied a small patch (see below) to link the ieee754 softfloat library into libgcc. >> it seems the problem is related to the following piece of code taken >> from APFloat.cpp:1836 (called from ConvertREAL_CST) >> APFloat::APFloat(float f) { >> APInt api = APInt(32, 0); >> initFromAPInt(api.floatToBits(f)); >> } >> >> i guess the floatToBits call will return the wrong half word since >> ints >> are 4, but float and double are both 8 byte on x86_64...
2007 Oct 22
0
[LLVMdev] troubles with llvm-gcc 4.0 and APFloat on X86_64
...t=soft --enable-languages=c > Thread model: single > > i've applied a small patch (see below) to link the ieee754 softfloat > library into libgcc. > >>> it seems the problem is related to the following piece of code taken >>> from APFloat.cpp:1836 (called from ConvertREAL_CST) >>> APFloat::APFloat(float f) { >>> APInt api = APInt(32, 0); >>> initFromAPInt(api.floatToBits(f)); >>> } >>> >>> i guess the floatToBits call will return the wrong half word since >>> ints >>> are 4, but float and...