[cfe-dev] type qualifiers
John McCall
rjmccall at apple.com
Sat Mar 27 10:02:24 PDT 2010
On Mar 27, 2010, at 7:12 AM, Mattias Holm wrote:
> In include/clang/AST/Type.h there is a comment saying:
>
>
> /// The maximum supported address space number.
> /// 24 bits should be enough for anyone.
> MaxAddressSpace = 0xffffffu,
>
> However, later in that file the following appears:
>
> // bits: |0 1 2|3 .. 4|5 .. 31|
> // |C R V|GCAttr|AddrSpace|
>
> uint32_t Mask;
>
> static const uint32_t GCAttrMask = 0x18;
> static const uint32_t GCAttrShift = 3;
> static const uint32_t AddressSpaceMask = ~(CVRMask | GCAttrMask);
> static const uint32_t AddressSpaceShift = 5;
>
>
> So, the question is, is the address space supposed to be 24 bits or 27 bits as suggested by the AddressSpaceMask? I am interested in stealing some bits from the qualifier class in order to add some additional experimental type qualifiers.
24; there are currently three bits spare. But you can just add extra data to Qualifiers if it helps.
John.
More information about the cfe-dev
mailing list