-const Attributes Alignment = 0xffff<<16; ///< Alignment of parameter (16 bits)
- // 0 = unknown, else in clear (not log)
-
-/// Function notes are implemented as attributes stored at index ~0 in
-/// parameter attribute list.
-const Attributes FN_NOTE_None = 0;
-const Attributes FN_NOTE_NoInline = 1<<0; // inline=never
-const Attributes FN_NOTE_AlwaysInline = 1<<1; // inline=always
-const Attributes FN_NOTE_OptimizeForSize = 1<<2; // opt_size
+const Attributes NoInline = 1<<11; ///< inline=never
+const Attributes AlwaysInline = 1<<12; ///< inline=always
+const Attributes OptimizeForSize = 1<<13; ///< opt_size
+const Attributes StackProtect = 1<<14; ///< Stack protection.
+const Attributes StackProtectReq = 1<<15; ///< Stack protection required.
+const Attributes Alignment = 31<<16; ///< Alignment of parameter (5 bits)
+ // stored as log2 of alignment with +1 bias
+ // 0 means unaligned different from align 1
+const Attributes NoCapture = 1<<21; ///< Function creates no aliases of pointer
+const Attributes NoRedZone = 1<<22; /// disable redzone
+const Attributes NoImplicitFloat = 1<<23; /// disable implicit floating point
+ /// instructions.
+const Attributes Naked = 1<<24; ///< Naked function
+const Attributes InlineHint = 1<<25; ///< source said inlining was
+ ///desirable
+const Attributes StackAlignment = 7<<26; ///< Alignment of stack for
+ ///function (3 bits) stored as log2
+ ///of alignment with +1 bias
+ ///0 means unaligned (different from
+ ///alignstack(1))
+const Attributes ReturnsTwice = 1<<29; ///< Function can return twice
+const Attributes UWTable = 1<<30; ///< Function must be in a unwind
+ ///table
+const Attributes NonLazyBind = 1U<<31; ///< Function is called early and/or
+ /// often, so lazy binding isn't
+ /// worthwhile.
+
+/// Note that uwtable is about the ABI or the user mandating an entry in the
+/// unwind table. The nounwind attribute is about an exception passing by the
+/// function.
+/// In a theoretical system that uses tables for profiling and sjlj for
+/// exceptions, they would be fully independent. In a normal system that
+/// uses tables for both, the semantics are:
+/// nil = Needs an entry because an exception might pass by.
+/// nounwind = No need for an entry
+/// uwtable = Needs an entry because the ABI says so and because
+/// an exception might pass by.
+/// uwtable + nounwind = Needs an entry because the ABI says so.