The following can be specified for imm:
ANDs the value of the register specified by the second operand with the value of the register specified by the first operand, and sets only the flags without storing the result.
ANDs the value of the register specified by the second operand with the value of the absolute expression or relative expression specified by the first operand, and sets only the flags without storing the result.
When this instruction is executed in syntax "tst reg1, reg2", the assembler generates one tst machine instruction. |
When this instruction is executed in syntax "tst imm, reg2", the assembler executes instruction expansion to generate two or more machine instructionsNote. |
Absolute expression exceeding the range of -16 to +15, but within the range of -32,768 to +32,767 |
If all the lower 16 bits of the value of imm are 0
Relative expression having !label or %label, or that having $label for a label having a definition in the sdata/sbss-attribute section |
tst !label, reg |
movea !label, r0, r1 tst r1, reg |
tst %label, reg |
movea %label, r0, r1 tst r1, reg |
tst $label, reg |
movea $label, r0, r1 tst r1, reg |
Relative expression having #label or label, or that having $label for a label having no definition in the sdata/sbss-attribute section |