Enum Alignment

    • Enum Constant Detail

      • AT_16

        public static final Alignment AT_16
        aarch64 POSIX->signal.h -> ucontext_t
    • Field Detail

      • alignof

        public final int alignof
      • __ALIGN_OF_LONG

        public static final Alignment __ALIGN_OF_LONG
      • __ALIGN_OF_STRUCT_LONG

        public static final Alignment __ALIGN_OF_STRUCT_LONG
      • __ALIGN_OF_POINTER

        public static final Alignment __ALIGN_OF_POINTER
      • __ALIGN_OF_STRUCT_POINTER

        public static final Alignment __ALIGN_OF_STRUCT_POINTER
      • __ALIGN_OF_INT8_T

        public static final Alignment __ALIGN_OF_INT8_T
      • __ALIGN_OF_STRUCT_INT8_T

        public static final Alignment __ALIGN_OF_STRUCT_INT8_T
      • __ALIGN_OF_INT16_T

        public static final Alignment __ALIGN_OF_INT16_T
      • __ALIGN_OF_STRUCT_INT16_T

        public static final Alignment __ALIGN_OF_STRUCT_INT16_T
      • __ALIGN_OF_INT32_T

        public static final Alignment __ALIGN_OF_INT32_T
      • __ALIGN_OF_STRUCT_INT32_T

        public static final Alignment __ALIGN_OF_STRUCT_INT32_T
      • __ALIGN_OF_INT64_T

        public static final Alignment __ALIGN_OF_INT64_T
      • __ALIGN_OF_STRUCT_INT64_T

        public static final Alignment __ALIGN_OF_STRUCT_INT64_T
      • __ALIGN_OF_INTPTR_T

        public static final Alignment __ALIGN_OF_INTPTR_T
      • __ALIGN_OF_STRUCT_INTPTR_T

        public static final Alignment __ALIGN_OF_STRUCT_INTPTR_T
      • __ALIGN_OF_FLOAT

        public static final Alignment __ALIGN_OF_FLOAT
      • __ALIGN_OF_STRUCT_FLOAT

        public static final Alignment __ALIGN_OF_STRUCT_FLOAT
      • __ALIGN_OF_DOUBLE

        public static final Alignment __ALIGN_OF_DOUBLE
      • __ALIGN_OF_STRUCT_DOUBLE

        public static final Alignment __ALIGN_OF_STRUCT_DOUBLE
      • __ALIGN_OF_LONG_DOUBLE

        public static final Alignment __ALIGN_OF_LONG_DOUBLE
      • __ALIGN_OF_STRUCT_LONG_DOUBLE

        public static final Alignment __ALIGN_OF_STRUCT_LONG_DOUBLE
      • __BIGGEST_ALIGNMENT__

        @Define
        public static final Alignment __BIGGEST_ALIGNMENT__
    • Method Detail

      • values

        public static Alignment[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Alignment c : Alignment.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Alignment valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • doAlignment

        public long doAlignment​(long unaligned)
        AT_X enumn members will override this, it is basically an unsigned fivision by zero so there ip potential to optimize..
        Parameters:
        unaligned -
        Returns:
      • fromAlignof

        public static Alignment fromAlignof​(int alignof)
      • calcElementAlignmentInStruct

        public static Alignment calcElementAlignmentInStruct​(Alignment structAlignment,
                                                             Alignment dataTypeAlignment)
        calculate the alignment of a field in a structure - the smalles alignment wins.
        Parameters:
        structAlignment -
        dataTypeAlignment -
        Returns: