123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- #ifndef ZEPHYR_INCLUDE_TOOLCHAIN_XCC_H_
- #define ZEPHYR_INCLUDE_TOOLCHAIN_XCC_H_
- #ifndef __clang__
- #define __BYTE_ORDER__
- #endif
- #include <toolchain/gcc.h>
- #ifndef __clang__
- #undef __BYTE_ORDER__
- #endif
- #include <stdbool.h>
- #ifndef __INT8_C
- #define __INT8_C(x) x
- #endif
- #ifndef INT8_C
- #define INT8_C(x) __INT8_C(x)
- #endif
- #ifndef __UINT8_C
- #define __UINT8_C(x) x ## U
- #endif
- #ifndef UINT8_C
- #define UINT8_C(x) __UINT8_C(x)
- #endif
- #ifndef __INT16_C
- #define __INT16_C(x) x
- #endif
- #ifndef INT16_C
- #define INT16_C(x) __INT16_C(x)
- #endif
- #ifndef __UINT16_C
- #define __UINT16_C(x) x ## U
- #endif
- #ifndef UINT16_C
- #define UINT16_C(x) __UINT16_C(x)
- #endif
- #ifndef __INT32_C
- #define __INT32_C(x) x
- #endif
- #ifndef INT32_C
- #define INT32_C(x) __INT32_C(x)
- #endif
- #ifndef __UINT32_C
- #define __UINT32_C(x) x ## U
- #endif
- #ifndef UINT32_C
- #define UINT32_C(x) __UINT32_C(x)
- #endif
- #ifndef __INT64_C
- #define __INT64_C(x) x
- #endif
- #ifndef INT64_C
- #define INT64_C(x) __INT64_C(x)
- #endif
- #ifndef __UINT64_C
- #define __UINT64_C(x) x ## ULL
- #endif
- #ifndef UINT64_C
- #define UINT64_C(x) __UINT64_C(x)
- #endif
- #ifndef __INTMAX_C
- #define __INTMAX_C(x) x
- #endif
- #ifndef INTMAX_C
- #define INTMAX_C(x) __INTMAX_C(x)
- #endif
- #ifndef __UINTMAX_C
- #define __UINTMAX_C(x) x ## ULL
- #endif
- #ifndef UINTMAX_C
- #define UINTMAX_C(x) __UINTMAX_C(x)
- #endif
- #ifndef __COUNTER__
- #define __COUNTER__ __LINE__
- #endif
- #undef __in_section_unique
- #define __in_section_unique(seg) \
- __attribute__((section("." STRINGIFY(seg) "." STRINGIFY(__COUNTER__))))
- #ifndef __GCC_LINKER_CMD__
- #include <xtensa/config/core.h>
- #if XCHAL_MEMORY_ORDER == XTHAL_BIGENDIAN
- #define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
- #elif XCHAL_MEMORY_ORDER == XTHAL_LITTLEENDIAN
- #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
- #else
- #error "Cannot determine __BYTE_ORDER__"
- #endif
- #endif
- #define __builtin_unreachable() do { __ASSERT(false, "Unreachable code"); } \
- while (true)
- #ifdef __deprecated
- #undef __deprecated
- #define __deprecated
- #endif
- #endif
|