Ouss4 commented on a change in pull request #5261:
URL: https://github.com/apache/incubator-nuttx/pull/5261#discussion_r790302830



##########
File path: arch/xtensa/src/common/xtensa_svcall.c
##########
@@ -94,8 +101,71 @@ int xtensa_svcall(int irq, void *context, void *arg)
 
       case SYS_save_context:
         {
+          DEBUGASSERT(regs[REG_A3] != 0);

Review comment:
       I see that `SYS_save_context` is equal to 0.  The TRM recommends to keep 
this syscall command to spill the register windows, to have a certain 
portability between different OSes.

##########
File path: arch/xtensa/include/syscall.h
##########
@@ -29,10 +29,33 @@
  * Included Files
  ****************************************************************************/
 
+#include <nuttx/config.h>
+#include <debug.h>
+#include <arch/irq.h>
+
+#ifndef __ASSEMBLY__
+#  include <stdint.h>
+#endif
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
+/* This is the value used as the argument to the SVC instruction.

Review comment:
       ```suggestion
   /* This is the value used as the argument to the SYSCALL instruction.
   ```




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