18.7: Floating-Point Calling Conventions
- Page ID
- 58428
The standard calling conventions detailed in Chapter 12, Functions still fully apply. This section addresses the usage of the floating-point registers when calling floating- point functions.
When using floating-point registers, none of the registers are preserved across a floating-point function call.
The first eight (8) floating-point arguments are passed in floating-point registers xmm0 – xmm7. Any additional arguments are placed on the stack in backwards order in the manner described in Chapter 12, Functions. A value returning floating-point function will return the result in xmm0.
Since none of the floating-point registers are preserved, the code must be written carefully.