]> git.sur5r.net Git - cc65/commitdiff
Export MAX_ALIGNMENT.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 27 Dec 2011 22:36:28 +0000 (22:36 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 27 Dec 2011 22:36:28 +0000 (22:36 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5330 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/common/alignment.c
src/common/alignment.h

index ff5d112615122be8f0d51852bb7374f091bc89ab..9dad01d3e09ac963bc9df310dfc3b67c615697bc 100644 (file)
@@ -59,7 +59,6 @@ static const unsigned char Primes[] = {
 };
 #define PRIME_COUNT     (sizeof (Primes) / sizeof (Primes[0]))
 #define LAST_PRIME      ((unsigned long)Primes[PRIME_COUNT-1])
-#define FAC_MAX         0x10000UL
 
 
 
@@ -107,7 +106,7 @@ static void Factorize (unsigned long Value, FactorizedNumber* F)
     }
 
     /* 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) {
index a8d4c384d688a9b24593c6a62c019ef39f9f7f0a..84ed7c20b41c92dd5af56d58bb1aa7d3f574ae00 100644 (file)
 
 
 
+/*****************************************************************************/
+/*                                   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                                    */
 /*****************************************************************************/
@@ -55,7 +68,7 @@ unsigned long LeastCommonMultiple (unsigned long Left, unsigned long Right);
  */
 
 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 */