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

View file

@ -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
****************************************************************************/

View file

@ -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

View file

@ -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")))