7#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_XCC_H_
8#define ZEPHYR_INCLUDE_TOOLCHAIN_XCC_H_
10#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_H_
11#error Please do not include toolchain-specific headers directly, use <zephyr/toolchain.h> instead
42#define INT8_C(x) __INT8_C(x)
46#define __UINT8_C(x) x ## U
50#define UINT8_C(x) __UINT8_C(x)
58#define INT16_C(x) __INT16_C(x)
62#define __UINT16_C(x) x ## U
66#define UINT16_C(x) __UINT16_C(x)
74#define INT32_C(x) __INT32_C(x)
78#define __UINT32_C(x) x ## U
82#define UINT32_C(x) __UINT32_C(x)
90#define INT64_C(x) __INT64_C(x)
94#define __UINT64_C(x) x ## ULL
98#define UINT64_C(x) __UINT64_C(x)
102#define __INTMAX_C(x) x
106#define INTMAX_C(x) __INTMAX_C(x)
110#define __UINTMAX_C(x) x ## ULL
114#define UINTMAX_C(x) __UINTMAX_C(x)
121#define __COUNTER__ __LINE__
124#undef __in_section_unique
125#define __in_section_unique(seg) \
126 __attribute__((section("." STRINGIFY(seg) "." STRINGIFY(__COUNTER__))))
128#undef __in_section_unique_named
129#define __in_section_unique_named(seg, name) \
130 __attribute__((section("." STRINGIFY(seg) \
131 "." STRINGIFY(__COUNTER__) \
132 "." STRINGIFY(name))))
134#ifndef __GCC_LINKER_CMD__
135#include <xtensa/config/core.h>
142#if XCHAL_MEMORY_ORDER == XTHAL_BIGENDIAN
143#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
144#elif XCHAL_MEMORY_ORDER == XTHAL_LITTLEENDIAN
145#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
147#error "Cannot determine __BYTE_ORDER__"
152#define __builtin_unreachable() __builtin_trap()
155#define __sync_synchronize() do { __asm__ __volatile__ ("" ::: "memory"); } \
GCC toolchain abstraction.