This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 365797d08e12831c953fff8c27f1d6b5051915c6 Author: Saravanan Sekar <[email protected]> AuthorDate: Thu Nov 5 10:50:33 2026 +0530 arch/tricore: Disable and restore interrupts without the iLLD intrinsics. up_irq_save() and up_irq_restore() used the iLLD __disable_and_save() and __restore(), which is why arch/irq.h included IfxCpu_Intrinsics.h. Use the disable and restore instructions directly, as the iLLD does for GCC, and drop the include. The common TriCore code still gets the iLLD headers it needs through tricore_internal.h. Signed-off-by: Saravanan Sekar <[email protected]> --- arch/tricore/include/irq.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/tricore/include/irq.h b/arch/tricore/include/irq.h index 5a7cfa7a5fb..36cc85ea7ab 100644 --- a/arch/tricore/include/irq.h +++ b/arch/tricore/include/irq.h @@ -45,7 +45,6 @@ #include <arch/chip/irq.h> #include <arch/arch.h> -#include <IfxCpu_Intrinsics.h> /**************************************************************************** * Pre-processor Prototypes @@ -242,7 +241,10 @@ noinstrument_function static inline_function uintptr_t up_getsp(void) noinstrument_function static inline_function irqstate_t up_irq_save(void) { - return __disable_and_save(); + irqstate_t flags; + + __asm__ volatile ("disable %0" : "=d"(flags) : : "memory"); + return flags; } /**************************************************************************** @@ -256,7 +258,7 @@ noinstrument_function static inline_function irqstate_t up_irq_save(void) noinstrument_function static inline_function void up_irq_restore(irqstate_t flags) { - __restore(flags); + __asm__ volatile ("restore %0" : : "d"(flags) : "memory"); } /****************************************************************************
