Xtensa GPR and ABI

来自Jack's Lab
2016年12月5日 (一) 21:12Comcat (讨论 | 贡献)的版本

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转到: 导航, 搜索

目录

1 Overview

Two different ABI:

  • Windowed register ABI, works with the Windowed Register Option (ESP32 use this ABI by default)
  • CALL0 ABI, used with any Xtensa processor (worse performance)


Instruction CALL0 is for the CALL0 ABI

Instruction CALL4/CALL8/CALL12 is for the windowed register ABI



2 Windowed Register ABI

2.1 Argument passing

          Return Addr  Stack Ptr       arg0, arg1, arg2, arg3, arg4, arg5
          -----------  ---------       ----------------------------------
call4       a4           a5              a6,   a7,   a8,   a9,  a10,  a11
call8       a8           a9             a10,  a11,  a12,  a13,  a14,  a15
call12     a12          a13             a14,  a15   ---   ---   ---   --- 



2.2 Return value

          Return Value
          -----------
call4       a6
call8       a10
call12      a14



3 CALL0 ABI

3.1 Argument passing

          Return Addr  Stack Ptr       arg0, arg1, arg2, arg3, arg4, arg5
          -----------  ---------       ----------------------------------
call0       a0           a1              a2,   a3,   a4,   a5,   a6,   a7



3.2 Return value

          Return Value
          -----------
call0       a2



4 Reference























个人工具
名字空间

变换
操作
导航
工具箱