| 1 |
.. _amdgpu_synid_label: |
| 2 |
|
| 3 |
label |
| 4 |
===== |
| 5 |
|
| 6 |
A branch target which is a 16-bit signed integer treated as a PC-relative dword offset. |
| 7 |
|
| 8 |
This operand may be specified as one of the following: |
| 9 |
|
| 10 |
* An :ref:`integer_number<amdgpu_synid_integer_number>` or an :ref:`absolute_expression<amdgpu_synid_absolute_expression>`. The value must be in the range -32768..65535. |
| 11 |
* A :ref:`symbol<amdgpu_synid_symbol>` (for example, a label) representing a relocatable address in the same compilation unit where it is referred from. The value is handled as a 16-bit PC-relative dword offset to be resolved by a linker. |
| 12 |
|
| 13 |
Examples: |
| 14 |
|
| 15 |
.. parsed-literal:: |
| 16 |
|
| 17 |
offset = 30 |
| 18 |
label_1: |
| 19 |
label_2 = . + 4 |
| 20 |
|
| 21 |
s_branch 32 |
| 22 |
s_branch offset + 2 |
| 23 |
s_branch label_1 |
| 24 |
s_branch label_2 |
| 25 |
s_branch label_3 |
| 26 |
s_branch label_4 |
| 27 |
|
| 28 |
label_3 = label_2 + 4 |
| 29 |
label_4: |