| |||
| Home > ARM Instruction Reference > ARM general data processing instructions > TST and TEQ | |||
Test and Test Equivalence.
TST{cond}Rn,Operand2
TEQ{cond}Rn,Operand2
where:
condis an optional condition code (see Conditional execution).
Rnis the ARM register holding the first operand.
Operand2is a flexible second operand. See Flexible second operand for details of the options.
These instructions test the value in a register against .
They update the condition flags on the result, but do not place
the result in any register.Operand2
The TST instruction performs a bitwise AND operation
on the value in and
the value of Rn.
This is the same as a Operand2ANDS instruction, except that
the result is discarded.
The TEQ instruction performs a bitwise Exclusive
OR operation on the value in and the
value of Rn.
This is the same as a Operand2EORS instruction, except that
the result is discarded.
These instructions:
update the N and Z flags according to the result
can update the C flag during the calculation of (see Flexible second operand)Operand2
do not affect the V flag.
If you use r15 as ,
the value used is the address of the instruction plus 8.Rn
You cannot use r15 for any operand in any data processing instruction that has a register-controlled shift (see Flexible second operand).