NMSIS-Core
Version 1.3.1
NMSIS-Core support for Nuclei processor-based devices
|
Compiler agnostic #define symbols for generic c/c++ source code. More...
Macros | |
#define | __has_builtin(x) (0) |
#define | __ASM __asm |
Pass information from the compiler to the assembler. More... | |
#define | __INLINE inline |
Recommend that function should be inlined by the compiler. More... | |
#define | __STATIC_INLINE static inline |
Define a static function that may be inlined by the compiler. More... | |
#define | __STATIC_FORCEINLINE __attribute__((always_inline)) static inline |
Define a static function that should be always inlined by the compiler. More... | |
#define | __NO_RETURN __attribute__((__noreturn__)) |
Inform the compiler that a function does not return. More... | |
#define | __USED __attribute__((used)) |
Inform that a variable shall be retained in executable image. More... | |
#define | __WEAK __attribute__((weak)) |
restrict pointer qualifier to enable additional optimizations. More... | |
#define | __VECTOR_SIZE(x) __attribute__((vector_size(x))) |
specified the vector size of the variable, measured in bytes More... | |
#define | __PACKED __attribute__((packed, aligned(1))) |
Request smallest possible alignment. More... | |
#define | __PACKED_STRUCT struct __attribute__((packed, aligned(1))) |
Request smallest possible alignment for a structure. More... | |
#define | __PACKED_UNION union __attribute__((packed, aligned(1))) |
Request smallest possible alignment for a union. More... | |
#define | __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) |
Pointer for unaligned write of a uint16_t variable. More... | |
#define | __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) |
Pointer for unaligned read of a uint16_t variable. More... | |
#define | __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) |
Pointer for unaligned write of a uint32_t variable. More... | |
#define | __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) |
Pointer for unaligned read of a uint32_t variable. More... | |
#define | __ALIGNED(x) __attribute__((aligned(x))) |
Minimum x bytes alignment for a variable. More... | |
#define | __RESTRICT __restrict |
restrict pointer qualifier to enable additional optimizations. More... | |
#define | __COMPILER_BARRIER() __ASM volatile("":::"memory") |
Barrier to prevent compiler from reordering instructions. More... | |
#define | __USUALLY(exp) __builtin_expect((exp), 1) |
provide the compiler with branch prediction information, the branch is usually true More... | |
#define | __RARELY(exp) __builtin_expect((exp), 0) |
provide the compiler with branch prediction information, the branch is rarely true More... | |
#define | __INTERRUPT __attribute__((interrupt)) |
Use this attribute to indicate that the specified function is an interrupt handler run in Machine Mode. More... | |
#define | __MACHINE_INTERRUPT __attribute__ ((interrupt ("machine"))) |
Use this attribute to indicate that the specified function is an interrupt handler run in Machine Mode. More... | |
#define | __SUPERVISOR_INTERRUPT __attribute__ ((interrupt ("supervisor"))) |
Use this attribute to indicate that the specified function is an interrupt handler run in Supervisor Mode. More... | |
#define | __USER_INTERRUPT __attribute__ ((interrupt ("user"))) |
Use this attribute to indicate that the specified function is an interrupt handler run in User Mode. More... | |
Variables | |
__PACKED_STRUCT | T_UINT16_WRITE |
Packed struct for unaligned uint16_t write access. More... | |
__PACKED_STRUCT | T_UINT16_READ |
Packed struct for unaligned uint16_t read access. More... | |
__PACKED_STRUCT | T_UINT32_WRITE |
Packed struct for unaligned uint32_t write access. More... | |
__PACKED_STRUCT | T_UINT32_READ |
Packed struct for unaligned uint32_t read access. More... | |
Compiler agnostic #define symbols for generic c/c++ source code.
The NMSIS-Core provides the header file nmsis_compiler.h with consistent #define symbols for generate C or C++ source files that should be compiler agnostic. Each NMSIS compliant compiler should support the functionality described in this section.
The header file nmsis_compiler.h is also included by each Device Header File <device.h> so that these definitions are available.
#define __ALIGNED | ( | x | ) | __attribute__((aligned(x))) |
Minimum x
bytes alignment for a variable.
Definition at line 162 of file nmsis_gcc.h.
#define __ASM __asm |
Pass information from the compiler to the assembler.
Definition at line 55 of file nmsis_gcc.h.
#define __COMPILER_BARRIER | ( | ) | __ASM volatile("":::"memory") |
Barrier to prevent compiler from reordering instructions.
Definition at line 172 of file nmsis_gcc.h.
#define __has_builtin | ( | x | ) | (0) |
Definition at line 49 of file nmsis_gcc.h.
#define __INLINE inline |
Recommend that function should be inlined by the compiler.
Definition at line 60 of file nmsis_gcc.h.
#define __INTERRUPT __attribute__((interrupt)) |
Use this attribute to indicate that the specified function is an interrupt handler run in Machine Mode.
Definition at line 187 of file nmsis_gcc.h.
#define __MACHINE_INTERRUPT __attribute__ ((interrupt ("machine"))) |
Use this attribute to indicate that the specified function is an interrupt handler run in Machine Mode.
Definition at line 192 of file nmsis_gcc.h.
#define __NO_RETURN __attribute__((__noreturn__)) |
Inform the compiler that a function does not return.
Definition at line 75 of file nmsis_gcc.h.
#define __PACKED __attribute__((packed, aligned(1))) |
Request smallest possible alignment.
Definition at line 95 of file nmsis_gcc.h.
#define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) |
Request smallest possible alignment for a structure.
Definition at line 100 of file nmsis_gcc.h.
#define __PACKED_UNION union __attribute__((packed, aligned(1))) |
Request smallest possible alignment for a union.
Definition at line 105 of file nmsis_gcc.h.
#define __RARELY | ( | exp | ) | __builtin_expect((exp), 0) |
provide the compiler with branch prediction information, the branch is rarely true
Definition at line 182 of file nmsis_gcc.h.
#define __RESTRICT __restrict |
restrict pointer qualifier to enable additional optimizations.
Definition at line 167 of file nmsis_gcc.h.
#define __STATIC_FORCEINLINE __attribute__((always_inline)) static inline |
Define a static function that should be always inlined by the compiler.
Definition at line 70 of file nmsis_gcc.h.
#define __STATIC_INLINE static inline |
Define a static function that may be inlined by the compiler.
Definition at line 65 of file nmsis_gcc.h.
#define __SUPERVISOR_INTERRUPT __attribute__ ((interrupt ("supervisor"))) |
Use this attribute to indicate that the specified function is an interrupt handler run in Supervisor Mode.
Definition at line 197 of file nmsis_gcc.h.
#define __UNALIGNED_UINT16_READ | ( | addr | ) | (((const struct T_UINT16_READ *)(const void *)(addr))->v) |
Pointer for unaligned read of a uint16_t variable.
Definition at line 131 of file nmsis_gcc.h.
#define __UNALIGNED_UINT16_WRITE | ( | addr, | |
val | |||
) | (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) |
Pointer for unaligned write of a uint16_t variable.
Definition at line 118 of file nmsis_gcc.h.
#define __UNALIGNED_UINT32_READ | ( | addr | ) | (((const struct T_UINT32_READ *)(const void *)(addr))->v) |
Pointer for unaligned read of a uint32_t variable.
Definition at line 157 of file nmsis_gcc.h.
#define __UNALIGNED_UINT32_WRITE | ( | addr, | |
val | |||
) | (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) |
Pointer for unaligned write of a uint32_t variable.
Definition at line 144 of file nmsis_gcc.h.
#define __USED __attribute__((used)) |
Inform that a variable shall be retained in executable image.
Definition at line 80 of file nmsis_gcc.h.
#define __USER_INTERRUPT __attribute__ ((interrupt ("user"))) |
Use this attribute to indicate that the specified function is an interrupt handler run in User Mode.
Definition at line 202 of file nmsis_gcc.h.
#define __USUALLY | ( | exp | ) | __builtin_expect((exp), 1) |
provide the compiler with branch prediction information, the branch is usually true
Definition at line 177 of file nmsis_gcc.h.
#define __VECTOR_SIZE | ( | x | ) | __attribute__((vector_size(x))) |
specified the vector size of the variable, measured in bytes
Definition at line 90 of file nmsis_gcc.h.
#define __WEAK __attribute__((weak)) |
restrict pointer qualifier to enable additional optimizations.
Definition at line 85 of file nmsis_gcc.h.
__PACKED_STRUCT T_UINT16_READ |
Packed struct for unaligned uint16_t read access.
Definition at line 126 of file nmsis_gcc.h.
__PACKED_STRUCT T_UINT16_WRITE |
Packed struct for unaligned uint16_t write access.
Definition at line 113 of file nmsis_gcc.h.
__PACKED_STRUCT T_UINT32_READ |
Packed struct for unaligned uint32_t read access.
Definition at line 152 of file nmsis_gcc.h.
__PACKED_STRUCT T_UINT32_WRITE |
Packed struct for unaligned uint32_t write access.
Definition at line 139 of file nmsis_gcc.h.