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:
“wangchengdong”
2025-08-21 09:29:12 +08:00
committed by Alan C. Assis
parent 7e258621df
commit 057b483350
3 changed files with 8 additions and 8 deletions
-7
View File
@@ -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
****************************************************************************/ ****************************************************************************/
+7
View File
@@ -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
+1 -1
View File
@@ -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")))