xiaoxiang781216 commented on pull request #4193:
URL: https://github.com/apache/incubator-nuttx/pull/4193#issuecomment-884643110


   > I think that there is another issue with system calls on 32-bit platforms. 
Passing a 64-bit value will require two registers instead of one, so it will be 
necessary to use a different system call to pass the values, won't it? All of 
the registers passed in the system call are represented by uintptr_t which is 
32-bits on ARMv7-M. An int32_t cannot be represented as a single uintptr_t and 
will have to be separated into two 32-bit values in the proxy and restored to a 
single 64-bit value in the stub.
   > 
   > Also, do the 64-bit values need to lie on aligned, even registers?
   
   We need adjust tools/mksyscall.c:
   
   1. Proxy split 64bit to two 32bit before invoke sys_call
   2. Sub merge two 32bit to 64bit before invoke the real function
   
   The more hard issue is 64bit return value, the above trick can't work for 
the return value.
   Actually, the returned value issue happen now:
   ```
   "clock","time.h","","clock_t"
   ```


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