SLAA534A June 2013 – June 2020
The function return value is placed in the same register as the usual first argument register, based on its type and size.
For MSP430 and MSP430X, the return value is placed in R12, R12:13, or R12::R15. Return values with a type that fits in a single CPU register are placed in R12; this includes pointer types. 32-bit return values are placed in R12:R13. 64-bit return values are placed R12::R15. The LSW is always in R12.
Structures and unions are returned by reference.