wangchdo opened a new pull request, #19229:
URL: https://github.com/apache/nuttx/pull/19229

   ## Summary
   
   The fence.i instruction is only available when the Zifencei extension 
(CONFIG_ARCH_RV_ISA_ZICSR_ZIFENCEI) 
   is supported by the hardware.
   
   This commit adds a macro wrapper around fence.i usages to prevent 
compilation errors 
   on toolchains or targets where the Zifencei extension is absent.
   
   ## Impact
   
   Fix compilation errors on toolchains or targets where the Zifencei extension 
is absent
   
   ## Testing
   
   '''
   ostest passed on rv-virt:nsh
   
   NuttShell (NSH)
   nsh> 
   nsh> 
   nsh> uname -a
   NuttX 0.0.0 5e1b10971d-dirty Jun 27 2026 22:53:48 risc-v rv-virt
   nsh> 
   nsh> ostest 
   stdio_test: write fd=1
   stdio_test: Standard I/O Check: printf
   stdio_test: write fd=2
   stdio_test: Standard I/O Check: fprintf to stderr
   ostest_main: putenv(Variable1=BadValue3)
   ostest_main: setenv(Variable1, GoodValue1, TRUE)
   ostest_main: setenv(Variable2, BadValue1, FALSE)
   ostest_main: setenv(Variable2, GoodValue2, TRUE)
   ostest_main: setenv(Variable3, GoodValue3, FALSE)
   ostest_main: setenv(Variable3, BadValue2, FALSE)
   show_variable: Variable=Variable1 has value=GoodValue1
   show_variable: Variable=Variable2 has value=GoodValue2
   show_variable: Variable=Variable3 has value=GoodValue3
   ostest_main: Started user_main at PID=4
   
   user_main: Begin argument test
   user_main: Started with argc=5
   user_main: argv[0]="ostest"
   user_main: argv[1]="Arg1"
   user_main: argv[2]="Arg2"
   user_main: argv[3]="Arg3"
   user_main: argv[4]="Arg4"
   
   ...
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     1fcd580  1fcd580
   ordblks         3        3
   mxordblk  1fc6fe0  1fc6fe0
   uordblks     4330     4330
   fordblks  1fc9250  1fc9250
   
   user_main: vfork() test
   vfork_test: Child 79 ran successfully
   
   Final memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     1fcd580  1fcd580
   ordblks         2        3
   mxordblk  1fc92a0  1fc6fe0
   uordblks     42c0     4330
   fordblks  1fc92c0  1fc9250
   user_main: Exiting
   ostest_main: Exiting with status 0
   nsh>
   
   '''
   
   


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