You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/03/14 00:58:11 UTC
[incubator-nuttx] branch master updated:
arch/xtensa/src/common/xtensa_abi.h: nxstyle fixes
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 3a03a30 arch/xtensa/src/common/xtensa_abi.h: nxstyle fixes
3a03a30 is described below
commit 3a03a307b937e6d36c32263a6802e6d0aeab97f9
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Mar 12 11:00:05 2020 +0900
arch/xtensa/src/common/xtensa_abi.h: nxstyle fixes
The remaining errors:
Operator/assignment must be preceded with whitespace
I didn't fix them because they are in assembly code, which
nxstyle doesn't understand.
---
arch/xtensa/src/common/xtensa_abi.h | 51 ++++++++++++++++++++-----------------
1 file changed, 27 insertions(+), 24 deletions(-)
diff --git a/arch/xtensa/src/common/xtensa_abi.h b/arch/xtensa/src/common/xtensa_abi.h
index 6ea3f98..3f976a5 100644
--- a/arch/xtensa/src/common/xtensa_abi.h
+++ b/arch/xtensa/src/common/xtensa_abi.h
@@ -58,18 +58,20 @@
* CALL8, or CALL12 instructions to save 4, 8, or 12 live registers. Calls
* to routines that use a2..a7 for parameters may use only CALL8 or CALL12.
*
- * Arguments are passed in both registers and memory. The first six incoming
- * arguments are stored in registers a2 through a7, and additional arguments
- * are stored on the stack starting at the current stack pointer a1. Because
- * Xtensa uses register windows that rotate during a function call, outgoing
- * arguments that will become the incoming arguments must be stored to
- * different register numbers. Depending on the call instruction and, thus,
- * the rotation of the register window, the arguments are passed starting
- * starting with register a(2+N), where N is the size of the window rotation.
- * Therefore, the first argument in case of a call4 instruction is placed into
- * a6, and for a call8 instruction into a10. Large arguments (8-bytes) are
- * always passed in an even/odd register pair even if that means to omit a
- * register for alignment. The return values are stored in a2 through a7.
+ * Arguments are passed in both registers and memory. The first six
+ * incoming arguments are stored in registers a2 through a7, and additional
+ * arguments are stored on the stack starting at the current stack pointer
+ * a1. Because Xtensa uses register windows that rotate during a function
+ * call, outgoing arguments that will become the incoming arguments must be
+ * stored to different register numbers. Depending on the call instruction
+ * and, thus, the rotation of the register window, the arguments are passed
+ * starting starting with register a(2+N), where N is the size of the
+ * window rotation.
+ * Therefore, the first argument in case of a call4 instruction is placed
+ * into a6, and for a call8 instruction into a10. Large arguments (8-bytes)
+ * are always passed in an even/odd register pair even if that means to
+ * omit a register for alignment. The return values are stored in a2
+ * through a7.
*
* return addr stack ptr arg0, arg1, arg2, arg3, arg4, arg5
* ----------- --------- ----------------------------------
@@ -119,9 +121,10 @@
* where size = size of stack frame in bytes (must be >0 and aligned to 16).
* For framed functions the frame is created and the return address saved at
* base of frame (Call0 ABI) or as determined by hardware (Windowed ABI).
- * For frameless functions, there is no frame and return address remains in a0.
- * Note: Because CPP macros expand to a single line, macros requiring multi-line
- * expansions are implemented as assembler macros.
+ * For frameless functions, there is no frame and return address remains in
+ * a0.
+ * Note: Because CPP macros expand to a single line, macros requiring
+ * multi-line expansions are implemented as assembler macros.
*/
#ifdef __ASSEMBLY__
@@ -130,16 +133,16 @@
#ifdef __XTENSA_CALL0_ABI__
/* Call0 */
- .macro entry1 size=0x10
- addi sp, sp, -\size
- s32i a0, sp, 0
- .endm
+ .macro entry1 size=0x10
+ addi sp, sp, -\size
+ s32i a0, sp, 0
+ .endm
- .macro ret1 size=0x10
- l32i a0, sp, 0
- addi sp, sp, \size
- ret
- .endm
+ .macro ret1 size=0x10
+ l32i a0, sp, 0
+ addi sp, sp, \size
+ ret
+ .endm
# define ENTRY(sz) entry1 sz
# define ENTRY0