You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/12/09 12:44:19 UTC

[incubator-nuttx] 02/06: arch/xtensa/src/common/xtensa_context.S: Don't save CALL0 ABI callee-saved registers.

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 5f9d9ba44cc43729a5c6a43ca4abf6531f99d3b0
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Fri Nov 27 11:17:07 2020 +0000

    arch/xtensa/src/common/xtensa_context.S: Don't save CALL0 ABI
    callee-saved registers.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 arch/xtensa/src/common/xtensa_context.S | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/xtensa/src/common/xtensa_context.S b/arch/xtensa/src/common/xtensa_context.S
index ef47c06..95f3321 100644
--- a/arch/xtensa/src/common/xtensa_context.S
+++ b/arch/xtensa/src/common/xtensa_context.S
@@ -126,12 +126,14 @@ _xtensa_context_save:
 	s32i	a10, a2, (4 * REG_A10)
 	s32i	a11, a2, (4 * REG_A11)
 
-	/* Call0 ABI callee-saved regs a12-15 */
+	/* Call0 ABI callee-saved regs a12-15 do not need to be saved here */
 
+#ifndef __XTENSA_CALL0_ABI__
 	s32i	a12, a2, (4 * REG_A12)
 	s32i	a13, a2, (4 * REG_A13)
 	s32i	a14, a2, (4 * REG_A14)
 	s32i	a15, a2, (4 * REG_A15)
+#endif
 
 	rsr		a3, SAR
 	s32i	a3, a2, (4 * REG_SAR)
@@ -482,10 +484,12 @@ _xtensa_context_restore:
 
 	/* Call0 ABI callee-saved regs a12-15 */
 
+#ifndef __XTENSA_CALL0_ABI__
 	l32i	a12, a2, (4 * REG_A12)
 	l32i	a13, a2, (4 * REG_A13)
 	l32i	a14, a2, (4 * REG_A14)
 	l32i	a15, a2, (4 * REG_A15)
+#endif
 
 	ret