Rev 571 | Rev 866 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 571 | Rev 587 | ||
---|---|---|---|
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 |
|
45 | #define ALIGN_UP(s, a) (((s) + ((a) - 1)) & ~((a) - 1)) |
48 | # define ALIGN_UP(s, a) (((s) + ((a) - 1)) & ~((a) - 1)) |
- | 49 | #endif |
|
46 | 50 | ||
47 | #endif |
51 | #endif |