r185578 - Add support for TF/TC modes available on eg. PowerPC64.

Eli Friedman eli.friedman at gmail.com
Wed Jul 3 13:59:19 PDT 2013


On Wed, Jul 3, 2013 at 1:48 PM, Roman Divacky <rdivacky at freebsd.org> wrote:

> Author: rdivacky
> Date: Wed Jul  3 15:48:06 2013
> New Revision: 185578
>
> URL: http://llvm.org/viewvc/llvm-project?rev=185578&view=rev
> Log:
> Add support for TF/TC modes available on eg. PowerPC64.
>
> Modified:
>     cfe/trunk/lib/Sema/SemaDeclAttr.cpp
>     cfe/trunk/test/Sema/attr-mode.c
>
> Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=185578&r1=185577&r2=185578&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Jul  3 15:48:06 2013
> @@ -3730,14 +3730,17 @@ static void handleModeAttr(Sema &S, Decl
>      NewTy = S.Context.LongDoubleTy;
>      break;
>    case 128:
> -    if (!IntegerMode) {
> +    if (!IntegerMode && S.Context.getTargetInfo().getLongDoubleWidth() !=
> 128) {
>        S.Diag(Attr.getLoc(), diag::err_unsupported_machine_mode) << Name;
>        return;
>
>
Please check the value of getLongDoubleFormat() rather than
getLongDoubleWidth(); getLongDoubleWidth() is 128 bits on x86-64, but it's
not the right format.

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130703/6505372e/attachment.html>


More information about the cfe-commits mailing list