You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/03/18 23:09:29 UTC
[incubator-nuttx] branch master updated (9ae826e -> aa84559)
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from 9ae826e xtensa/esp32s3: Fix output handling for pins numbered from 32 to 48
new ce8fae2 xtensa_coproc.S: Adjust the save reserved for local variables when restoring/saving coprocessor state.
new aa84559 xtensa_coproc.S: Replace spaces by tabs.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
arch/xtensa/src/common/xtensa_coproc.S | 56 +++++++++++++++++-----------------
1 file changed, 28 insertions(+), 28 deletions(-)
[incubator-nuttx] 02/02: xtensa_coproc.S: Replace spaces by tabs.
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit aa84559566ee0ecb89e96f6f9ce2ab7912f60206
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Fri Mar 18 16:09:15 2022 +0100
xtensa_coproc.S: Replace spaces by tabs.
Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
arch/xtensa/src/common/xtensa_coproc.S | 44 +++++++++++++---------------------
1 file changed, 17 insertions(+), 27 deletions(-)
diff --git a/arch/xtensa/src/common/xtensa_coproc.S b/arch/xtensa/src/common/xtensa_coproc.S
index 722700e..6faf9c2 100644
--- a/arch/xtensa/src/common/xtensa_coproc.S
+++ b/arch/xtensa/src/common/xtensa_coproc.S
@@ -222,11 +222,10 @@ _xtensa_coproc_savestate:
xtensa_coproc_savestate:
#ifdef __XTENSA_CALL0_ABI__
-
/* Need to preserve a8-11. _xtensa_coproc_savestate modifies a2-a7,
- * a13-a15. a12-a15 are callee saved registers so a13-a14 must be
- * preserved.
- */
+ * a13-a15. a12-a15 are callee saved registers so a13-a14 must be
+ * preserved.
+ */
ENTRY(16)
s32i a13, sp, LOCAL_OFFSET(1) /* Save clobbered registers */
@@ -234,8 +233,8 @@ xtensa_coproc_savestate:
s32i a15, sp, LOCAL_OFFSET(3)
/* Call _xtensa_coproc_savestate() with A2=address of co-processor
- * save area.
- */
+ * save area.
+ */
call0 _xtensa_coproc_savestate
@@ -247,10 +246,6 @@ xtensa_coproc_savestate:
RET(16)
#else
- /* Need to preserve a8-15. _xtensa_coproc_savestate modifies a2-a7,
- * a13-a15. So a13-a15 may need to be preserved.
- */
-
/* 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.
@@ -260,8 +255,8 @@ xtensa_coproc_savestate:
s32i a0, sp, LOCAL_OFFSET(1) /* Save return address */
/* Call _xtensa_coproc_savestate() with A2=address of co-processor
- * save area.
- */
+ * save area.
+ */
call0 _xtensa_coproc_savestate
@@ -426,11 +421,10 @@ _xtensa_coproc_restorestate:
xtensa_coproc_restorestate:
#ifdef __XTENSA_CALL0_ABI__
-
/* Need to preserve a8-11. _xtensa_coproc_restorestate modifies a2-a7,
- * a13-a15. a12-a15 are callee saved registers so a13-a14 must be
- * preserved.
- */
+ * a13-a15. a12-a15 are callee saved registers so a13-a14 must be
+ * preserved.
+ */
ENTRY(16)
s32i a13, sp, LOCAL_OFFSET(1) /* Save clobbered values */
@@ -438,8 +432,8 @@ xtensa_coproc_restorestate:
s32i a15, sp, LOCAL_OFFSET(3)
/* Call _xtensa_coproc_restorestate() with A2=address of co-processor
- * save area. Registers a0, a2-a7, a13-a15 have been trashed.
- */
+ * save area. Registers a0, a2-a7, a13-a15 have been trashed.
+ */
call0 _xtensa_coproc_restorestate
@@ -451,10 +445,6 @@ xtensa_coproc_restorestate:
RET(16)
#else
- /* Need to preserve a8-15. _xtensa_coproc_savestate modifies a2-a7,
- * a13-a15. So a13-a15 may need to be preserved.
- */
-
/* 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.
@@ -464,15 +454,15 @@ xtensa_coproc_restorestate:
s32i a0, sp, LOCAL_OFFSET(1) /* Save return address */
/* Call _xtensa_coproc_restorestate() with A2=address of co-processor
- * save area. Registers a0, a2-a7, a13-a15 have been trashed.
- */
+ * save area. Registers a0, a2-a7, a13-a15 have been trashed.
+ */
- call0 _xtensa_coproc_restorestate
+ call0 _xtensa_coproc_restorestate
/* Restore a0 and return */
- l32i a0, sp, LOCAL_OFFSET(1) /* Recover return address */
- RET(24)
+ l32i a0, sp, LOCAL_OFFSET(1) /* Recover return address */
+ RET(24)
#endif
[incubator-nuttx] 01/02: xtensa_coproc.S: Adjust the save reserved for local variables when restoring/saving coprocessor state.
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit ce8fae28420b69c2795f7075cac776a02fa8f9dd
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Fri Mar 18 14:54:58 2022 +0100
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 <ab...@espressif.com>
---
arch/xtensa/src/common/xtensa_coproc.S | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/arch/xtensa/src/common/xtensa_coproc.S b/arch/xtensa/src/common/xtensa_coproc.S
index b6329a8..722700e 100644
--- a/arch/xtensa/src/common/xtensa_coproc.S
+++ b/arch/xtensa/src/common/xtensa_coproc.S
@@ -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