s_branch GPU Native ISA AMD Scalar
Branch & Control
Unconditional relative branch.
Encoding
The ENC_SOPP layout from AMD's machine-readable ISA specification (AMD CDNA 5). Opcode 32 in OP rebuilds 0xBFA00000, an identifier AMD lists for this encoding. Not the same in every generation: AMD CDNA 4 (opcode 2), AMD CDNA 3 (opcode 2), AMD CDNA 2 (opcode 2), AMD CDNA 1 (opcode 2), AMD RDNA 2 (opcode 2), AMD RDNA 1 (opcode 2). The same in AMD RDNA 4, AMD RDNA 3.5, AMD RDNA 3.
Operands
-
offset
Signed word-granularity branch offset
GFX Target Compatibility
| Target | Support |
|---|---|
| gfx942 | ✅ Supported |
| gfx1100 | ✅ Supported |
Related
More in Branch & Control
Reference
Description
Semantics
Example
s_branch label // unconditional jump to labelOriginal illustrative example, written for this site (not reproduced from a specific AMD document).
Sources
- AMD Machine-Readable GPU ISA Specification ↗ - Advanced Micro Devices, Inc.