[LLVMdev] creating 80/128bit FP constants?

Shuxin Yang shuxin.llvm at gmail.com
Wed May 1 10:03:14 PDT 2013


There are example in unittests/ADT/APFloatTest.cpp

Create 80-bit FP (on x8664, it is corresponding to "long double" in C/C++):

       APFloat(APFloat::x87DoubleExtended, "0xf.fffffffp+28");

Create 128-bit:
      I don't know if llvm have run-time lib support for 
quadruple-precision FP arithmetic.



On 5/1/13 3:28 AM, edA-qa mort-ora-y wrote:
> On 01/05/13 12:21, Duncan Sands wrote:
>>> How do I emit 80/128 bit FP constants. There is one ConstantFP::get
>>> function which takes a double and another that takes a StringRef.  Does
>>> the StringRef version somehow do what I want?
>> Use the one that takes an APFloat.
> APFloat then offers the float/double/string constructors, and various
> operations. I'm still not sure on how I can get a 80/128 bit float. Is
> there an example somewhere?
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130501/07250753/attachment.html>


More information about the llvm-dev mailing list