 CARM User's Guide Discontinued |
|
| Function Return ValuesFunction return values are always passed using CPU registers. The following table lists the possible return values and the registers used for each. | Return Type | Bits | Register | Description |
|---|
| signed char | 8 | R0 | Value returned in the low byte of R0. | | unsigned char | 8 | R0 | Value returned in the low byte of R0. | | signed short | 16 | R0 | Value returned in the low half-word of R0. | | unsigned short | 16 | R0 | Value returned in the low half-word of R0. | | signed int | 32 | R0 | Value returned in R0. | | unsigned int | 32 | R0 | Value returned in R0. | | signed long | 32 | R0 | Value returned in R0. | | unsigned long | 32 | R0 | Value returned in R0. | | float | 32 | R0 | Value returned in R0. | | pointer | 32 | R0 | Value returned in R0. | | signed long long | 64 | R0-R1 | Low word returned in R0. High word returned in R1. | | unsigned long long | 64 | R0-R1 | Low word returned in R0. High word returned in R1. | | double | 64 | R0-R1 | Low word returned in R0. High word returned in R1. | | struct | | R0-R3 | Structs with a total size less than 16 bytes are returned in R0-R3. |
|
|