Comment 1 for bug 900636

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

The ARM Procedure Call Standard document on http://infocenter.arm.com/ has details of the VFP variant of the procedure call standard, required for armhf.

Simplified, each floating-point argument is allocated first to the VFP registers if there are some available (from s0-s15 / d0-d7), and then to the stack when there are no more VFP argument registers available.

Basically, for the armhf case we need:

  * A separate array to track the values to be passed to the called function in floating-point registers
  * A separate counter to track which floating-point argument registers have already been allocated
  * Separate implementations of INSERT_FLOAT() and INSERT_DOUBLE() to allocate to VFP regs and then to the stack (similarly to the way the INSERT_INT*() macros work)
  * Code to copy the required arguments into the VFP regs when the actual target function is called
  * Code to handle floating-point return values (float/double returned VFP registers) -- refer to the Procedure Call Standard for exact details)