GETCRSPTR : Get Call Return Stack Pointer

Format:

SPA 5.0:
        GETCRSPTR   Rd   {&req_6}   {&rdN}   {&wrN}   {?sched}   ;   

Description:

Control flow operations use a per-warp hardware managed stack of call/return tokens. GETCRSPTR returns information on the current warp's stack pointer.

The result of GETCRSPTR is a 32-bit value containing these fields:

    bits  field
    --------------------------
   16: 0  curPhysStackDepth
   22:17  reserved
   30:23  curApiCallDepth
   31:31  KillFutureBranch

'curPhysStackDepth' is the number of tokens currently on the stack, rounded up to the next multiple of 4. For example, if the instruction stream consisted solely of 125 SSY instructions, then GETCRSPTR will return a value of 'curPhysStackDepth' of 128. The value of 'curPhysStackDepth' is independent of the state of the physical stack cache that the SM may implement.

'curApiCallDepth' is the current depth of the API-visible call-stack, in entries. 'curApiCallDepth' is updated by the non-.NOINC variants of CAL, JCAL, and PRET.

'KillFutureBranch' is the state of the result of the limit check performed by the non-.NOINC variant of PRET. This state is only used to control subsequent BRA.LMT or JMP.LMT instructions.

Examples:

GETCRSPTR R0;

Back to Index of Instructions