};
#define PRIME_COUNT (sizeof (Primes) / sizeof (Primes[0]))
#define LAST_PRIME ((unsigned long)Primes[PRIME_COUNT-1])
-#define FAC_MAX 0x10000UL
}
/* Be sure we can factorize */
- CHECK (Value <= FAC_MAX && Value != 0);
+ CHECK (Value <= MAX_ALIGNMENT && Value != 0);
/* Handle factor 2 separately for speed */
while ((Value & 0x01UL) == 0UL) {
+/*****************************************************************************/
+/* Data */
+/*****************************************************************************/
+
+
+
+/* Maximum possible alignment. Beware: To increase the possible alignment it
+ * is not enough to bump this value. Check the code inside.
+ */
+#define MAX_ALIGNMENT 0x10000UL
+
+
+
/*****************************************************************************/
/* Code */
/*****************************************************************************/
*/
unsigned long AlignAddr (unsigned long Addr, unsigned long Alignment);
-/* Align an address to the given alignment */
+/* Align an address to the given alignment */
unsigned long AlignCount (unsigned long Addr, unsigned long Alignment);
/* Calculate how many bytes must be inserted to align Addr to Alignment */