![]() |
NMSIS-Core
Version 1.0.0-HummingBird
NMSIS-Core support for HummingBird RISC-V 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 |
Use this attribute to indicate that the specified function is an interrupt handler. 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 166 of file nmsis_gcc.h.
#define __ASM __asm |
Pass information from the compiler to the assembler.
Definition at line 59 of file nmsis_gcc.h.
#define __COMPILER_BARRIER | ( | ) | __ASM volatile("":::"memory") |
Barrier to prevent compiler from reordering instructions.
Definition at line 176 of file nmsis_gcc.h.
#define __has_builtin | ( | x | ) | (0) |
Definition at line 53 of file nmsis_gcc.h.
#define __INLINE inline |
Recommend that function should be inlined by the compiler.
Definition at line 64 of file nmsis_gcc.h.
#define __INTERRUPT |
Use this attribute to indicate that the specified function is an interrupt handler.
Definition at line 191 of file nmsis_gcc.h.
#define __NO_RETURN __attribute__((__noreturn__)) |
Inform the compiler that a function does not return.
Definition at line 79 of file nmsis_gcc.h.
#define __PACKED __attribute__((packed, aligned(1))) |
Request smallest possible alignment.
Definition at line 99 of file nmsis_gcc.h.
#define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) |
Request smallest possible alignment for a structure.
Definition at line 104 of file nmsis_gcc.h.
#define __PACKED_UNION union __attribute__((packed, aligned(1))) |
Request smallest possible alignment for a union.
Definition at line 109 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 186 of file nmsis_gcc.h.
#define __RESTRICT __restrict |
restrict pointer qualifier to enable additional optimizations.
Definition at line 171 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 74 of file nmsis_gcc.h.
#define __STATIC_INLINE static inline |
Define a static function that may be inlined by the compiler.
Definition at line 69 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 135 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 122 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 161 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 148 of file nmsis_gcc.h.
#define __USED __attribute__((used)) |
Inform that a variable shall be retained in executable image.
Definition at line 84 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 181 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 94 of file nmsis_gcc.h.
#define __WEAK __attribute__((weak)) |
restrict pointer qualifier to enable additional optimizations.
Definition at line 89 of file nmsis_gcc.h.
__PACKED_STRUCT T_UINT16_READ |
Packed struct for unaligned uint16_t read access.
Definition at line 130 of file nmsis_gcc.h.
__PACKED_STRUCT T_UINT16_WRITE |
Packed struct for unaligned uint16_t write access.
Definition at line 117 of file nmsis_gcc.h.
__PACKED_STRUCT T_UINT32_READ |
Packed struct for unaligned uint32_t read access.
Definition at line 156 of file nmsis_gcc.h.
__PACKED_STRUCT T_UINT32_WRITE |
Packed struct for unaligned uint32_t write access.
Definition at line 143 of file nmsis_gcc.h.