Using Rotating Register directives

Examples Using the .rotp Directive and Using the .rotf Directive illustrate the behaviour of the .rotp and .rotf directives, respectively.

Example Using the .rotp Directive illustrates how the .rotp directive declares alternate rotating predicate register names for two predicate registers, p[2], and three predicate registers q[3]. Instructions subsequent to the .rotp directive refer to p[0] for the current generation of p, and p[1] for the previous generation of p. For the current generation of q, the subsequent instructions refer to q[0], q[1] for the previous generation, and q[2] for the one before the previous generation.

Example: Using the .rotp Directive

.rotp  p[2],q[3]

 

//The alternate predicate register names map to the predicate

//registers as follows:

 

p[0] = p16; p[1] = p17

q[0] = p18; q[1] = p19; q[2] = p20

Example Using the .rotf Directive illustrates how the .rotf directive declares alternate floating-point register names for three floating-point registers x[3], two floating-point registers y[2], and three floating-point registers z[3].

Example: Using the .rotf Directive

.rotf  x[3],y[2],z[3]

 

//The alternate floating-point register names map to the

//floating-point registers as follows:

 

x[0]=f32;x[1]=f33;x[2]=f34

y[0]=f35;y[1]=f36

z[0]=f37;z[1]=f38;z[2]=f39