casaroli commented on code in PR #19562:
URL: https://github.com/apache/nuttx/pull/19562#discussion_r3747245395
##########
arch/arm/src/common/gnu/fork.S:
##########
@@ -102,19 +100,21 @@ up_fork:
mov r7, r11
stmia r1!, {r4-r7} /* Save r8-r11 in the structure
*/
mov r5, lr /* Copy lr to a low register */
- stmia r1!, {r0,r5} /* Save sp and lr in the
structure */
+ stmia r1!, {r3,r5} /* Save sp and lr in the
structure */
- /* Then, call arm_fork(), passing it a pointer to the stack structure */
+ /* Then, call arm_fork(). r0 still holds the vfork flag: nothing above
+ * touches it.
+ */
- mov r0, sp
+ mov r1, sp
Review Comment:
are you sure? I think we need to restore r1, as there are `stmia r1!` before
this
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]