mirror of
https://github.com/cc65/cc65.git
synced 2025-04-18 09:38:07 +00:00
Export MAX_ALIGNMENT.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5330 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
d0555c400e
commit
7d187fe92c
src/common
@ -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) {
|
||||
|
@ -43,6 +43,19 @@
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* 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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user