include/nuttx/compiler.h:
fix nooptimiziation_function definition problem for tricore gnu compiler arch/tricore: move tricore_csa2addr and tricore_addr2csa definition from include/arch.h to include/irq.h to fix build error
This commit is contained in:
parent
7e258621df
commit
057b483350
3 changed files with 8 additions and 8 deletions
|
|
@ -42,13 +42,6 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Address <--> Context Save Areas */
|
||||
|
||||
#define tricore_csa2addr(csa) ((uintptr_t *)((((csa) & 0x000F0000) << 12) \
|
||||
| (((csa) & 0x0000FFFF) << 6)))
|
||||
#define tricore_addr2csa(addr) ((uintptr_t)(((((uintptr_t)(addr)) & 0xF0000000) >> 12) \
|
||||
| (((uintptr_t)(addr) & 0x003FFFC0) >> 6)))
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -48,6 +48,13 @@
|
|||
* Pre-processor Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/* Address <--> Context Save Areas */
|
||||
|
||||
#define tricore_csa2addr(csa) ((uintptr_t *)((((csa) & 0x000F0000) << 12) \
|
||||
| (((csa) & 0x0000FFFF) << 6)))
|
||||
#define tricore_addr2csa(addr) ((uintptr_t)(((((uintptr_t)(addr)) & 0xF0000000) >> 12) \
|
||||
| (((uintptr_t)(addr) & 0x003FFFC0) >> 6)))
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@
|
|||
|
||||
/* The nooptimiziation_function attribute no optimize */
|
||||
|
||||
# if defined(__clang__)
|
||||
# if defined(__clang__) || defined(CONFIG_TRICORE_TOOLCHAIN_GNU)
|
||||
# define nooptimiziation_function __attribute__((optnone))
|
||||
# else
|
||||
# define nooptimiziation_function __attribute__((optimize("O0")))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue