[cfe-dev] Implementation of mode attribute

Eli Friedman eli.friedman at gmail.com
Wed May 21 14:43:31 PDT 2008


On Wed, May 21, 2008 at 12:46 PM, Nuno Lopes <nunoplopes at sapo.pt> wrote:
> You have a typo in a comment :P
>
> +/// HandleAddressSpaceTypeAttribute - Process a mode attribute on the
> +/// specified type.
> +QualType Sema::HandleModeTypeAttribute(QualType Type,
> +                                       AttributeList *Attr) {

Thanks.

> Also these aren't supported in the switch() to look for the RetTy (not sure
> if it was by distraction or if they are really unsupported..).
>
> +    if (!memcmp(Str, "XF", 2)) { DestWidth = 96; IntegerMode = false;
> break; }
> +    if (!memcmp(Str, "TF", 2)) { DestWidth = 128; IntegerMode = false;
> break; }
>
> Nuno

The issue is that there isn't any appropriate way to map them onto
existing types.  If I assumed X86, I could map XFmode to long double,
but that isn't right for any other platform.  On  x86-64, XFmode is
illegal, and TFmode is x87DoubleExtended; on PPC, XFmode is illegal,
and TFmode is IEEEquad.  The whole thing is rather messy.

TImode is also unimplemented because clang doesn't have a 128-bit
integer type currently.

-Eli



More information about the cfe-dev mailing list