casaroli commented on code in PR #19562:
URL: https://github.com/apache/nuttx/pull/19562#discussion_r3734342152


##########
arch/arm/src/common/gnu/fork.S:
##########
@@ -86,6 +117,25 @@
 #endif
 
 up_fork:
+       movs            r2, #FORK_TYPE_FORK
+       b               arm_fork_common
+
+       .size   up_fork, .-up_fork
+#endif
+
+/* The shared snapshot.  r2 holds the FORK_TYPE_* selector on entry; it is
+ * call-clobbered and is not part of the snapshot, so it survives the
+ * sequence below untouched.  lr still holds the original caller's return
+ * address, because the entry points above branched here rather than calling.
+ */
+
+#ifdef __ghs__
+       .type   arm_fork_common, $function
+#else
+       .type   arm_fork_common, function
+#endif
+
+arm_fork_common:

Review Comment:
   I was going this direction, but I did not like how it was becoming more 
complex. I will revert it and we can evaluate.



-- 
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]

Reply via email to