SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Store Register File to Stack Pointer
STRF op1, op2
Functional unit = D
16 bit
15 | 13 | 12 | 10 | 9 | 8 | 7 | 6 | 0 |
op2 | op1 | x | x | x | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
3 | 3 | opcode |
The current base register file is stored to the starting address specified by the postdecremented value of the stack pointer (SP). op1 specifies the ending register (last register stored) and op2 specifies the beginning register (first register stored). All registers between op1 and op2 are stored inclusive. The registers are stored in order from lowest register (op2) to highest register (op1).
Valid values of op1 and op2 are: op1 ≥ op2
For op1 < op2, results in unspecified behavior.
None
for ( i = op2; i <= op1 ; i++) {
*(SP) = Ri;
SP -= 4;
}