chirping78 commented on issue #16235:
URL: https://github.com/apache/nuttx/issues/16235#issuecomment-2814404279

   As a comparison, here is the disassemble output of xt-clang/xt-gdb, 
toolchain from cadence, used in a product embedded a hifi4 dsp (which is also 
LX7 arch based):
   ```
   (xt-gdb) disassemble /r cmd_uname
   Dump of assembler code for function cmd_uname:
      0x2cd0f1d4 <+0>:     36 21 03        entry   a1, 0x190
      0x2cd0f1d7 <+3>:     2e c1 00 0f 19 e0       { s32i  a2, a1, 48; movi     
   a15, 0 }
      0x2cd0f1dd <+9>:     2e 4d 03 15 07 fd       { l32r  a2, 0x2cceb714 
<_stext+5756> (0x2ce95ac0); mov.n        a5, a3 }
      0x2cd0f1e3 <+15>:    6e 50 00 18 07 e0       { l32r  a6, 0x2cceb724 
<_stext+5772> (0x2ce959d0 <__switchjump_table_xp_temp_9_0>); movi    a8, 0 }
      0x2cd0f1e9 <+21>:    fe d1 6c 07 19 e0       { s32i  a15, a1, 52; movi    
   a7, 108 }
      0x2cd0f1ef <+27>:    ae 95 04 0b 26 fd       { mov.n a10, a5; mov.n  a11, 
a4 }
      0x2cd0f1f5 <+33>:    3e 98 02 0c 26 fd       { mov.n a3, a8; mov.n   a12, 
a2 }
      0x2cd0f1fb <+39>:    65 cc f4        call8   0x2cd03ec0 <getopt>
   ...
   ```
   You can see from the disassemble that:
   - the instructions between curly brace is the so-called FLIX instruction 
mentioned above
   - after set some registers, `cmd_uname` calls `getopt` first,  which match 
with the source code


-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to