yield
Yield (A32)
YIELD
Hints that the task is performing a spin-wait.
Details
Provides a hint to the processor that the current task is performing a spin-wait loop and may yield to other tasks. This instruction does not change any register or memory state but allows the processor to optimize power consumption or task scheduling. No condition flags are affected. This is an A32-only hint instruction.
Encoding
Binary Layout
cond
00110
0
10
00
00
1
1
1
1
000000000001
Operands
Reference (Arm AArch32 ISA)
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x0320F001 | YIELD{<c>}{<q>} | A32 | cond | 00110 | 0 | 10 | 00 | 00 | 1 | 1 | 1 | 1 | 000000000001 | ||
| 0xBF10 | YIELD{<c>}{<q>} | T32 | 10111111 | 0001 | 0000 | ||
| 0xF3AF8001 | YIELD{<c>}.W | T32 | 111100111010 | 1 | 1 | 1 | 1 | 10 | 0 | 0 | 0 | 000 | 0000 | 0001 |
Description
YIELD is a hint instruction. Software with a multithreading capability can use a YIELD instruction to indicate to the PE that it is performing a task, for example a spin-lock, that could be swapped out to improve overall system performance. The PE can use this hint to suspend and resume multiple software threads if it supports the capability.
For more information about the recommended use of this instruction see The Yield instruction.
Operation
if ConditionPassed() then
EncodingSpecificOperations();
Hint_Yield();