TST
Compare by bitwise AND
Compute the flags of ANDS with a zero-register destination; discard the data result.
| Form | Bits | Requires | Encoding |
|---|---|---|---|
TST Wn, Wm{, shift #amount} | 32 | Armv8-A | 01101010xx0xxxxxxxxxxxxxxxx11111 |
TST Xn, Xm{, shift #amount} | 64 | Armv8-A | 11101010xx0xxxxxxxxxxxxxxxx11111 |
Operation#
Pseudo-C · selected form
result = Rn AND shift_within_width(Rm, shift, amount)
// result discarded
N = result[width-1]; Z = (result == 0)
C = 0; V = 0What to watch for
- Omitted shift means LSL #0. Unlike some A32 operations, shifted-out bits do not set C.
- Encodes ANDS with Rd = WZR (register number 31). This alias adds no new architectural encoding.
Architectural details#
- Flags
- Sets N and Z from the result. C and V are cleared.
- Destination
- Updates NZCV only. General-purpose registers and SP are unchanged.
- Encoding
01101010xx0xxxxxxxxxxxxxxxx11111- Operands
Wnread · 32 bitsWmread · 32 bitsshiftreadamountread
- Coverage
- 32/64-bit aliases of the selected base encodings. Extended-register and logical-immediate forms are outside this selection.
- Alias of
- ANDS_32_log_shift with the encoding constraints shown for this form.
- shift
- LSL, LSR, ASR, ROR.
- amount
- 0 to 31.
Exception information & execution requirements
Complete exception conditions have not been imported.
MRS supplies encoding and availability conditions, not an exhaustive exception model.
Feature availability alone does not guarantee execution: OS state and execution-level controls also apply. Use the linked architecture documentation for the full exception conditions.
Sources & provenance#
Technical fields are imported from pinned upstream files. Explanations and explorer behavior are maintained separately.
Architectural references for this form
Arm · aarchmrs
- Revision
2026-03_rel- SHA-256
bf355d263eed08ef6b3e4e680e6bba3642fa7c3dd0be77ffb4783420041a0860- Terms
- BSD-3-Clause