You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/16 01:45:06 UTC

[GitHub] [incubator-nuttx] zyfeier commented on a diff in pull request #7099: armv7-a/r: modify regs index to improve exception performance

zyfeier commented on code in PR #7099:
URL: https://github.com/apache/incubator-nuttx/pull/7099#discussion_r972540762


##########
arch/arm/src/armv7-a/arm_vectors.S:
##########
@@ -768,13 +710,14 @@ arm_vectorfiq:
 
 	/* Life is simple when everything is FIQ mode */
 
-	mov		r14, r0				/* (FIQ) r14=Register storage area */
+	ldmia		r0, {r13, r14}^			/* Restore user mode r13 and r14 */
+	add		r14, r0, #8
 	ldmia		r14!, {r0-r7}			/* Restore common r0-r7 */
-	ldmia		r14, {r8-r14}^			/* Restore user mode r8-r14 */
+	ldmia		r14, {r8-r12}^			/* Restore user mode r8-r12 */

Review Comment:
    From the 《ARM Architecture Reference Manual》 B9.3.6 LDM (User registers):
   ```
   In a PL1 mode other than System mode, Load Multiple (User registers) loads multiple User mode registers from
   consecutive memory locations using an address from a base register. The registers loaded cannot include the PC.
   The processor reads the base register value normally, using the current mode to determine the correct Banked
   version of the register. This instruction cannot writeback to the base register.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org