mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
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:
committed by
Alan C. Assis
parent
7e258621df
commit
057b483350
@@ -42,13 +42,6 @@
|
|||||||
* Pre-processor Definitions
|
* 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
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -48,6 +48,13 @@
|
|||||||
* Pre-processor Prototypes
|
* 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__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -268,7 +268,7 @@
|
|||||||
|
|
||||||
/* The nooptimiziation_function attribute no optimize */
|
/* The nooptimiziation_function attribute no optimize */
|
||||||
|
|
||||||
# if defined(__clang__)
|
# if defined(__clang__) || defined(CONFIG_TRICORE_TOOLCHAIN_GNU)
|
||||||
# define nooptimiziation_function __attribute__((optnone))
|
# define nooptimiziation_function __attribute__((optnone))
|
||||||
# else
|
# else
|
||||||
# define nooptimiziation_function __attribute__((optimize("O0")))
|
# define nooptimiziation_function __attribute__((optimize("O0")))
|
||||||
|
|||||||
Reference in New Issue
Block a user