search for: initfromapint

Displaying 7 results from an estimated 7 matches for "initfromapint".

2009 Feb 17
1
[LLVMdev] FP128Ty
...arithmetic stuff *should* Just Work, although nobody has tried it; the conversions of FP128 to and from other formats are not done. They should not be difficult to do by copying & modifying existing code. To do specifically what you're trying to do, add the FP128 case to APFloat::initFromAPInt. The code that reads and writes the IR, and writes assembler output, also needs to be added. (The Float in APFloat means "floating point", not the C float type.)
2007 Oct 19
3
[LLVMdev] troubles with llvm-gcc 4.0 and APFloat on X86_64
...alues, 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 problems or is there an official patch for this issue? is llvm-gcc known to work...
2007 Oct 19
0
[LLVMdev] troubles with llvm-gcc 4.0 and APFloat on X86_64
...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). I'm pretty sure float is 4 everywhere; that wouldn't be it. > is anybody hav...
2009 Feb 17
3
[LLVMdev] FP128Ty
I am new to llvm and am stuck up with a problem. I am trying to initialize a Value* of type fp128 having the value 0 I am using the following construct ConstantFP::get(APFloat(APInt(128,0,false))); This is returning a double instead of a float and I am confused. Thanks a lot for your help. -- -- Aparna -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Feb 17
0
[LLVMdev] FP128Ty
On Feb 16, 2009, at 6:12 PM, aparna kotha wrote: > I am new to llvm and am stuck up with a problem. > I am trying to initialize a Value* of type fp128 having the value 0 > > I am using the following construct > > ConstantFP::get(APFloat(APInt(128,0,false))); > > This is returning a double instead of a float and I am confused. > > Thanks a lot for your help. FP128Ty
2007 Oct 20
2
[LLVMdev] troubles with llvm-gcc 4.0 and APFloat on X86_64
...ll 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 (but i'm not yet >> sure). > > I'm pretty sure float is 4 everywhere; that wouldn...
2007 Oct 22
0
[LLVMdev] troubles with llvm-gcc 4.0 and APFloat on X86_64
...he 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 (but i'm not yet >>> sure). >> I'm pretty sure float is 4 e...