Home
last modified time | relevance | path

Searched refs:EXTRACT_BYTE (Results 1 – 2 of 2) sorted by relevance

/external/dtc/libfdt/
Dlibfdt_env.h72 #define EXTRACT_BYTE(x, n) ((unsigned long long)((uint8_t *)&x)[n]) macro
73 #define CPU_TO_FDT16(x) ((EXTRACT_BYTE(x, 0) << 8) | EXTRACT_BYTE(x, 1))
74 #define CPU_TO_FDT32(x) ((EXTRACT_BYTE(x, 0) << 24) | (EXTRACT_BYTE(x, 1) << 16) | \
75 (EXTRACT_BYTE(x, 2) << 8) | EXTRACT_BYTE(x, 3))
76 #define CPU_TO_FDT64(x) ((EXTRACT_BYTE(x, 0) << 56) | (EXTRACT_BYTE(x, 1) << 48) | \
77 (EXTRACT_BYTE(x, 2) << 40) | (EXTRACT_BYTE(x, 3) << 32) | \
78 (EXTRACT_BYTE(x, 4) << 24) | (EXTRACT_BYTE(x, 5) << 16) | \
79 (EXTRACT_BYTE(x, 6) << 8) | EXTRACT_BYTE(x, 7))
110 #undef EXTRACT_BYTE
/external/u-boot/scripts/dtc/libfdt/
Dlibfdt_env.h72 #define EXTRACT_BYTE(x, n) ((unsigned long long)((uint8_t *)&x)[n]) macro
73 #define CPU_TO_FDT16(x) ((EXTRACT_BYTE(x, 0) << 8) | EXTRACT_BYTE(x, 1))
74 #define CPU_TO_FDT32(x) ((EXTRACT_BYTE(x, 0) << 24) | (EXTRACT_BYTE(x, 1) << 16) | \
75 (EXTRACT_BYTE(x, 2) << 8) | EXTRACT_BYTE(x, 3))
76 #define CPU_TO_FDT64(x) ((EXTRACT_BYTE(x, 0) << 56) | (EXTRACT_BYTE(x, 1) << 48) | \
77 (EXTRACT_BYTE(x, 2) << 40) | (EXTRACT_BYTE(x, 3) << 32) | \
78 (EXTRACT_BYTE(x, 4) << 24) | (EXTRACT_BYTE(x, 5) << 16) | \
79 (EXTRACT_BYTE(x, 6) << 8) | EXTRACT_BYTE(x, 7))
110 #undef EXTRACT_BYTE