Table of Contents
Previous topic Next topic
C/C++ COMPILER->In-Line Assembler Code->Function Return Value
For functions that return an integral value, data register D0 contains the return value.
For functions that return a floating point value, if the chip has a floating point unit, floating point register FP0 contains the return value otherwise:
The predefined macro _X_DFA can be used to determine if data flow analysis is enabled.
- if data flow analysis is not enabled, the return value is placed (high byte first in IEEE format) at the address __CW68D002. This is a reserved data space 12 bytes wide. Float return values are located at __CW68D002+8, double return values are located at __CW68D002+4 and long double return values (if supported) are located at __CW68D002.
- if data flow analysis is enabled the value is placed in register pair D0:D1.