1 | /* |
2 | * Copyright (c) 2006-2007 Apple Inc. All rights reserved. |
3 | */ |
4 | |
5 | #ifndef _ARM__PARAM_H_ |
6 | #define _ARM__PARAM_H_ |
7 | |
8 | #if defined (__arm__) || defined (__arm64__) |
9 | |
10 | #include <arm/_types.h> |
11 | |
12 | /* |
13 | * Round p (pointer or byte index) up to a correctly-aligned value for all |
14 | * data types (int, long, ...). The result is unsigned int and must be |
15 | * cast to any desired pointer type. |
16 | */ |
17 | #define __DARWIN_ALIGNBYTES (sizeof(__darwin_size_t) - 1) |
18 | #define __DARWIN_ALIGN(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES) |
19 | |
20 | #define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) |
21 | #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) |
22 | |
23 | #endif /* defined (__arm__) || defined (__arm64__) */ |
24 | |
25 | #endif /* _ARM__PARAM_H_ */ |
26 | |