Scalar Arithmetic Instructions
239 AMDGPU instructions in this category - showing 39 per page, page 3 of 3 - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | Format | Summary |
|---|---|---|---|
| s_setpc_b64 | s_setpc_b64 | SOP1 | Jump to an address specified in a scalar register. The argument is a byte address of the instruction to jump to. |
| s_setreg_b32 | s_setreg_b32 | SOPK | Write some or all of the LSBs of source argument into a hardware register. |
| s_setreg_imm32_b32 | s_setreg_imm32_b32 | SOPK | Write some or all of the LSBs of a 32-bit literal constant into a hardware register; this instruction requires a 32-bit literal constant. |
| s_sext_i32_i16 | s_sext_i32_i16 | SOP1 | Sign extend a signed 16 bit scalar input to 32 bits and store the result into a scalar register. |
| s_sext_i32_i8 | s_sext_i32_i8 | SOP1 | Sign extend a signed 8 bit scalar input to 32 bits and store the result into a scalar register. |
| s_sleep_var | s_sleep_var | SOP1 | Cause a wave to sleep for up to ~8000 clocks, or to sleep until an external event wakes the wave up. |
| s_soft_waitcnt_vscnt | s_soft_waitcnt_vscnt | SOPK | AMDGPU SOPK scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_sub_co_ci_u32 | s_sub_co_ci_u32 | SOP2 | Subtract the second unsigned 32-bit integer input from the first input, subtract the carry-in bit, store the result into a scalar register and store… |
| s_sub_co_i32 | s_sub_co_i32 | SOP2 | Subtract the second signed 32-bit integer input from the first input, store the result into a scalar register and store the carry-out bit into SCC. |
| s_sub_co_u32 | s_sub_co_u32 | SOP2 | Subtract the second unsigned 32-bit integer input from the first input, store the result into a scalar register and store the carry-out bit into SCC. |
| s_sub_f16 | s_sub_f16 | SOP2 | Subtract the second floating point input from the first input and store the result in a scalar register. |
| s_sub_f32 | s_sub_f32 | SOP2 | Subtract the second floating point input from the first input and store the result in a scalar register. |
| s_sub_i32 | s_sub_i32 | SOP2 | Subtract the second signed 32-bit integer input from the first input, store the result into a scalar register and store the carry-out bit into SCC. |
| s_sub_nc_u64 | s_sub_nc_u64 | SOP2 | Subtract the second unsigned 64-bit integer input from the first input and store the result into a scalar register. |
| s_sub_u32 | s_sub_u32 SDST, S0, S1 | SOP2 | Subtract two 32-bit unsigned scalar operands, wavefront-uniform. |
| s_sub_u64 | s_sub_u64 | SOP2 | AMDGPU SOP2 scalar instruction operating on u64 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_subb_u32 | s_subb_u32 | SOP2 | Subtract the second unsigned 32-bit integer input from the first input, subtract the carry-in bit, store the result into a scalar register and store… |
| s_subvector_loop_begin | s_subvector_loop_begin | SOPK | Begin execution of a subvector block of code. |
| s_subvector_loop_end | s_subvector_loop_end | SOPK | End execution of a subvector block of code. |
| s_swap_pc_i64 | s_swap_pc_i64 | SOP1 | AMDGPU SOP1 scalar instruction operating on i64 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_swappc_b64 | s_swappc_b64 | SOP1 | Store the address of the next instruction to a scalar register and then jump to an address specified in the scalar input. |
| s_trunc_f16 | s_trunc_f16 | SOP1 | Compute the integer part of a half-precision float input using round toward zero semantics and store the result in floating point format into a… |
| s_trunc_f32 | s_trunc_f32 | SOP1 | Compute the integer part of a single-precision float input using round toward zero semantics and store the result in floating point format into a… |
| s_version | s_version | SOPK | Do nothing. This opcode is used to specify the microcode version for tools that interpret shader microcode. |
| s_waitcnt_expcnt | s_waitcnt_expcnt | SOPK | Wait for the EXPCNT counter to be at or below the specified level. The EXPCNT counter tracks the number of outstanding export events. |
| s_waitcnt_lgkmcnt | s_waitcnt_lgkmcnt | SOPK | Wait for the LGKMCNT counter to be at or below the specified level. |
| s_waitcnt_vmcnt | s_waitcnt_vmcnt | SOPK | Wait for the VMCNT counter to be at or below the specified level. |
| s_waitcnt_vscnt | s_waitcnt_vscnt | SOPK | Wait for the VSCNT counter to be at or below the specified level. |
| s_wakeup_barrier | s_wakeup_barrier | SOP1 | AMDGPU SOP1 scalar instruction. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) |
| s_wqm_b32 | s_wqm_b32 | SOP1 | Given an active pixel mask in a scalar input, calculate whole quad mode mask for that input, store the result into a scalar register and set SCC iff… |
| s_wqm_b64 | s_wqm_b64 | SOP1 | Given an active pixel mask in a scalar input, calculate whole quad mode mask for that input, store the result into a scalar register and set SCC iff… |
| s_xnor_b32 | s_xnor_b32 | SOP2 | Calculate bitwise XNOR on two scalar inputs, store the result into a scalar register and set SCC if the result is nonzero. |
| s_xnor_b64 | s_xnor_b64 | SOP2 | Calculate bitwise XNOR on two scalar inputs, store the result into a scalar register and set SCC if the result is nonzero. |
| s_xnor_saveexec_b32 | s_xnor_saveexec_b32 | SOP1 | Calculate bitwise XNOR on the scalar input and the EXEC mask, store the calculated result into the EXEC mask, set SCC iff the calculated result is… |
| s_xnor_saveexec_b64 | s_xnor_saveexec_b64 | SOP1 | Calculate bitwise XNOR on the scalar input and the EXEC mask, store the calculated result into the EXEC mask, set SCC iff the calculated result is… |
| s_xor_b32 | s_xor_b32 | SOP2 | Calculate bitwise XOR on two scalar inputs, store the result into a scalar register and set SCC iff the result is nonzero. |
| s_xor_b64 | s_xor_b64 | SOP2 | Calculate bitwise XOR on two scalar inputs, store the result into a scalar register and set SCC iff the result is nonzero. |
| s_xor_saveexec_b32 | s_xor_saveexec_b32 | SOP1 | Calculate bitwise XOR on the scalar input and the EXEC mask, store the calculated result into the EXEC mask, set SCC iff the calculated result is… |
| s_xor_saveexec_b64 | s_xor_saveexec_b64 | SOP1 | Calculate bitwise XOR on the scalar input and the EXEC mask, store the calculated result into the EXEC mask, set SCC iff the calculated result is… |