SLAA534A June 2013 – June 2020
Arguments with a type that is larger than a single register, but no larger than twice the size of a single register, are passed in a register pair. The lowest-numbered register holds the LSW (least significant word).
For MSP430 and MSP430X, register pairs do not need to be aligned, so R12:R13, R13:R14, and R14:R15 are the valid register pairs. Types up to 32 bits are passed in a register pair. This includes "long int", "float" and structs of up to 32 bits size passed by value.
MSP430 and MSP430X example:
C source code:
void func1(int a0, long a1, int a2);
int a0, a2;
long a1;
func2(void)
{
func1(a0, a1, a2);
}
Compiled assembly code:
MOV.W &a0, R12
MOV.W &a1+0,R13
MOV.W &a1+2,R14
MOV.W &a2, R15