[cfe-commits] [PATCH][Review request] f128 literal

Akira Hatanaka ahatanak at gmail.com
Mon Jan 9 13:13:01 PST 2012


The attached patch makes FloatingLiteral::getValue() return 128-bit
floating point values in the correct format.
The existing code always returns PPCDoubleDouble floating points
because parameter isIEEE of constructor APFloat::APFloat(const APInt&
api, bool isIEEE) is not being set (default value is false).

Without this patch, clang terminates with the following message when
the attached test is compiled:
clang: llvm/lib/VMCore/Instructions.cpp:1086: void
llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() ==
cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr
must be a pointer to Val type!"' failed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: f128literal.patch
Type: text/x-patch
Size: 2751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120109/6bf0ebf3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: f128literal.c
Type: text/x-csrc
Size: 56 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120109/6bf0ebf3/attachment.c>


More information about the cfe-commits mailing list