The CPU instruction self-test verifies correct operation of core CPU/ALU instructions, such as arithmetic, logic, shift, and bit manipulation instructions.
The test executes a sequence of representative instructions and checks their results against expected values. If any instruction produces an unexpected result, the test fails.
More Information
The self-test covers the following CPU instructions:
- ADD, SUB: Arithmetic addition and subtraction
- AND, ORR, EOR: Bitwise logical operations (AND, OR, XOR)
- MOV, MVN: Move and bitwise NOT
- LSL, LSR, ASR: Logical/arithmetic shift left/right
- CMP, CMN: Compare and compare negative
- ADC, SBC: Add with carry, subtract with carry
- ROR: Rotate right
- BIC: Bit clear
- REV: Byte order reversal
- CLZ: Count leading zeros
- Note
- The CLZ (Count Leading Zeros) instruction is not supported in Thumb code; only Thumb-2 cores support it. The test for CLZ is only executed if the core supports it.