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


##########
arch/arm/include/armv7-m/irq.h:
##########
@@ -182,9 +182,16 @@
 
 /* The PIC register is usually R10. It can be R9 is stack checking is enabled
  * or if the user changes it with -mpic-register on the GCC command line.
+ *
+ * The ARM FDPIC ABI mandates R9, and GCC hardcodes it for -mfdpic, so an
+ * FDPIC build has no choice in the matter.
  */
 
-#define REG_PIC             REG_R10
+#ifdef CONFIG_FDPIC
+#  define REG_PIC           REG_R9
+#else
+#  define REG_PIC           REG_R10

Review Comment:
   I think so but this would historically break ELF PIC and NXFLAT



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