parthitce commented on code in PR #21498:
URL: https://github.com/apache/nuttx/pull/21498#discussion_r4502204450
##########
include/nuttx/compiler.h:
##########
@@ -199,6 +199,15 @@
# define CONFIG_HAVE_BUILTIN_FFSLL 1
# endif
+ /* An __asm__ label names the symbol with __USER_LABEL_PREFIX__ ("_" on
+ * RH850 and RX, empty on most targets). The two-step stringify is local
+ * so that including compiler.h does not define STRINGIFY everywhere.
+ */
+
+# define asm_symbol_str(x) #x
+# define asm_symbol_xstr(x) asm_symbol_str(x)
+# define asm_symbol(fn) asm_symbol_xstr(__USER_LABEL_PREFIX__) #fn
Review Comment:
Good catch. Added the #ifdef with plain #fn as fallback.
--
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]