mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 05:42:05 +08:00
xtensa_coproc.S: Adjust the save reserved for local variables when
restoring/saving coprocessor state. These function don't use call8 or call12 and thus need to create just 16 bytes for the base save area, however they do use one variable so we need a space for that. The `entry` instruction works in unit of 8 bytes so we add whole 8 bytes for one variable. Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
9ae826e925
commit
ce8fae2842
@@ -251,7 +251,12 @@ xtensa_coproc_savestate:
|
||||
* a13-a15. So a13-a15 may need to be preserved.
|
||||
*/
|
||||
|
||||
ENTRY(32 /*16*/) /* REVISIT: Why 32? */
|
||||
/* Allocate the stack frame. This function needs to allocate the usual 16
|
||||
* byte for the base save area + space for one variable.
|
||||
* NOTE: entry works in multiples of 8 bytes.
|
||||
*/
|
||||
|
||||
ENTRY(24)
|
||||
s32i a0, sp, LOCAL_OFFSET(1) /* Save return address */
|
||||
|
||||
/* Call _xtensa_coproc_savestate() with A2=address of co-processor
|
||||
@@ -263,7 +268,7 @@ xtensa_coproc_savestate:
|
||||
/* Restore a0 and return */
|
||||
|
||||
l32i a0, sp, LOCAL_OFFSET(1) /* Recover return address */
|
||||
RET(32 /*16*/) /* REVISIT: Why 32? */
|
||||
RET(24)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -450,7 +455,12 @@ xtensa_coproc_restorestate:
|
||||
* a13-a15. So a13-a15 may need to be preserved.
|
||||
*/
|
||||
|
||||
ENTRY(32 /*16*/) /* REVISIT: Why 32? */
|
||||
/* Allocate the stack frame. This function needs to allocate the usual 16
|
||||
* byte for the base save area + space for one variable.
|
||||
* NOTE: entry works in multiples of 8 bytes.
|
||||
*/
|
||||
|
||||
ENTRY(24)
|
||||
s32i a0, sp, LOCAL_OFFSET(1) /* Save return address */
|
||||
|
||||
/* Call _xtensa_coproc_restorestate() with A2=address of co-processor
|
||||
@@ -462,7 +472,7 @@ xtensa_coproc_restorestate:
|
||||
/* Restore a0 and return */
|
||||
|
||||
l32i a0, sp, LOCAL_OFFSET(1) /* Recover return address */
|
||||
RET(32 /*16*/) /* REVISIT: Why 32? */
|
||||
RET(24)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user