Rev 4055 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4055 | Rev 4537 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | */ |
33 | */ |
34 | 34 | ||
35 | #ifndef LIBC_MACROS_H_ |
35 | #ifndef LIBC_MACROS_H_ |
36 | #define LIBC_MACROS_H_ |
36 | #define LIBC_MACROS_H_ |
37 | 37 | ||
38 | #define SIZE2KB(size) ((size) >> 10) |
38 | #define SIZE2KB(size) ((size) >> 10) |
39 | #define SIZE2MB(size) ((size) >> 20) |
39 | #define SIZE2MB(size) ((size) >> 20) |
40 | 40 | ||
41 | #define KB2SIZE(kb) ((kb) << 10) |
41 | #define KB2SIZE(kb) ((kb) << 10) |
42 | #define MB2SIZE(mb) ((mb) << 20) |
42 | #define MB2SIZE(mb) ((mb) << 20) |
43 | 43 | ||
44 | #define STRING(arg) STRING_ARG(arg) |
44 | #define STRING(arg) STRING_ARG(arg) |
45 | #define STRING_ARG(arg) #arg |
45 | #define STRING_ARG(arg) #arg |
- | 46 | ||
- | 47 | #define LOWER32(arg) ((arg) & 0xffffffff) |
|
- | 48 | #define UPPER32(arg) (((arg) >> 32) & 0xffffffff) |
|
- | 49 | ||
- | 50 | #define MERGE_LOUP32(lo, up) \ |
|
- | 51 | ((((uint64_t) (lo)) & 0xffffffff) \ |
|
- | 52 | | ((((uint64_t) (up)) & 0xffffffff) << 32)) |
|
46 | 53 | ||
47 | #endif |
54 | #endif |
48 | 55 | ||
49 | /** @} |
56 | /** @} |
50 | */ |
57 | */ |