Rev 587 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 587 | Rev 866 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | /** Align to the nearest higher address. |
40 | /** Align to the nearest higher address. |
41 | * |
41 | * |
42 | * @param s Address or size to be aligned. |
42 | * @param s Address or size to be aligned. |
43 | * @param a Size of alignment, must be power of 2. |
43 | * @param a Size of alignment, must be power of 2. |
44 | */ |
44 | */ |
45 | #ifdef ppc32 /* Nasty ppc32 hack. FIX ME. */ |
- | |
46 | # define ALIGN_UP(s, a) ((s) % (a) ? (((s) / (a)) + 1) * (a) : (s)) |
- | |
47 | #else |
- | |
48 | # define ALIGN_UP(s, a) (((s) + ((a) - 1)) & ~((a) - 1)) |
45 | #define ALIGN_UP(s, a) (((s) + ((a) - 1)) & ~((a) - 1)) |
49 | #endif |
- | |
50 | 46 | ||
51 | #endif |
47 | #endif |