SPA 5.0:
SSY
#OffsetS24
{&req_6}
{?sched}
;
SSY
c[#BankU05][#AddrU16]
{&req_6}
{?sched}
;
// This form is not patchable and is deprecated
Set program synchronization point.
This instruction is used before a potentially divergent code block. It pushes a CRS_TYPE_SSY token onto the stack containing the current warp active mask and the address of the sync-up point in the program. When a later SYNC instruction is executed and pops the CRS_TYPE_SSY token off the stack, control will be transferred to the sync-up point address specified on the stack, and execution will continue at this address using the active mask from the stack entry. Thus, the threads that were active at the time of the SSY will be synchronized.
The SSY target address is specified as a byte offset from the program counter of the next instruction after the SSY. Due to instruction alignment requirements, the three LSBs of the offset should be 0.
// pseudo-code example if (CC.LT) R6 = R0; else R6 = R1; R7 = R6*R6; // in assembler could be: SSY LABEL0; BRA CC.GE,LAB_ELSE; // or GEU if fp comparison LAB_IF: MOV R6,R0; SYNC; LAB_ELSE: MOV R6,R1; SYNC; LABEL0: MUL R7,R6,R6; // sync happens before MUL