mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Xtensa: Make sure that all C callable assembly functions includes ENTRY prologue and RET epilogue.
This commit is contained in:
@@ -227,6 +227,7 @@ _xtensa_context_save:
|
|||||||
.align 4
|
.align 4
|
||||||
|
|
||||||
xtensa_context_save:
|
xtensa_context_save:
|
||||||
|
ENTRY(16)
|
||||||
|
|
||||||
/* Set up for call to _xtensa_context_save() */
|
/* Set up for call to _xtensa_context_save() */
|
||||||
|
|
||||||
@@ -248,7 +249,7 @@ xtensa_context_save:
|
|||||||
l32i a0, a2, (4 * REG_A0) /* Recover return addess */
|
l32i a0, a2, (4 * REG_A0) /* Recover return addess */
|
||||||
movi a2, 0 /* Return zero */
|
movi a2, 0 /* Return zero */
|
||||||
|
|
||||||
ret
|
RET(16)
|
||||||
|
|
||||||
.size xtensa_context_save, . - xtensa_context_save
|
.size xtensa_context_save, . - xtensa_context_save
|
||||||
|
|
||||||
@@ -372,6 +373,7 @@ _xtensa_context_restore:
|
|||||||
.align 4
|
.align 4
|
||||||
|
|
||||||
xtensa_context_restore:
|
xtensa_context_restore:
|
||||||
|
ENTRY(16) /* REVISIT */
|
||||||
|
|
||||||
/* Restore the processor state */
|
/* Restore the processor state */
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,12 @@ __cpu1_start:
|
|||||||
/* Finish initialization in C */
|
/* Finish initialization in C */
|
||||||
|
|
||||||
movi a2, 1 /* Argument 1: CPU ID */
|
movi a2, 1 /* Argument 1: CPU ID */
|
||||||
|
|
||||||
|
#ifdef __XTENSA_CALL0_ABI__
|
||||||
call0 xtensa_start_handler
|
call0 xtensa_start_handler
|
||||||
|
#else
|
||||||
|
call4 xtensa_start_handler
|
||||||
|
#endif
|
||||||
|
|
||||||
/* xtensa_start_handler() does not return */
|
/* xtensa_start_handler() does not return */
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ void xtensa_irq_initialize(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
/* And finally, enable interrupts */
|
/* And finally, enable interrupts. Also clears PS.EXCM */
|
||||||
|
|
||||||
up_irq_enable();
|
up_irq_enable();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user