Calling convention

The AArch32 instruction set, which is used on ARM processors, supports several different calling conventions, which define how functions are called and how arguments are passed between functions in a program. Some of the most commonly used calling conventions on the AArch32 instruction set include:

  • AAPCS: This is the default calling convention for the AArch32 instruction set. It is used for functions written in C or C++ and is based on the ARM Procedure Call Standard. In this convention, arguments are passed to the function in registers, and any additional arguments are passed on the stack. The return value is stored in the R0 register.

  • AAPCS-VFP: This calling convention is an extension of the AAPCS convention and is used for functions that use the VFP (Vector Floating Point) unit. It is similar to the AAPCS convention, but it includes additional rules for passing arguments that are stored in the VFP registers.

  • EABI: This calling convention is based on the Embedded Application Binary Interface and is used for functions that are compiled for the AArch32 instruction set. It is similar to the AAPCS convention, but it includes additional rules for handling certain types of arguments, such as structures and unions.

Overall, the AArch32 instruction set supports a number of different calling conventions, which allows it to be used in a variety of programming languages and environments. The specific calling convention that is used can affect the performance and compatibility of a program, as well as the interactions between functions and libraries.

Last updated