Stacked Registers in Assignment and Equate Statements

To define an alternate register name for a stacked register, use an assignment statement. The alternate register name is not affected by any subsequent changes to the rotating register. See the Assignment Statements and Equate Statements sections for more details about assignment and equate statements.

Example Defining a Stacked Register in an Assignment Statement illustrates how to define an alternate register name using an assignment statement, so that the alternate register name is not affected by a subsequent .regstk directive. The local register name loc0 maps to the general register r36. loc0 is assigned to tmp. The subsequent add instruction refers to loc0, which is currently mapped to r40. The next add instruction refers to tmp which is mapped to r36, not r40.

Example: Defining a Stacked Register in an Assignment Statement

    .regstk   4,4,2,0

tmp = loc0                  //loc0 is currently r36

    ...

    .regstk   8,1,3,0

 

    add       loc0 = r1,r7  //loc0 is currently r40

    add       r1 = r2,tmp   //tmp = r36!