not


Logical negation (takes 1's complement).

[Syntax]

-

not reg1, reg2

-

not imm, reg2

 

The following can be specified for imm:

-

Absolute expression having a value of up to 32 bits

-

Relative expression

[Function]

-

Syntax "not reg1, reg2"

NOTs (1's complement) the value of the register specified by the first operand, and stores the result in the register specified by the second operand.

-

Syntax "not imm, reg2"

NOTs (1's complement) the value of the absolute expression or relative expression specified by the first operand, and stores the result in the register specified by the second operand.

[Description]

-

When this instruction is executed in syntax "not reg1, reg2", the assembler generates one not machine instruction.

-

When this instruction is executed in syntax "not imm, reg2", and the following expression is specified for imm, the assembler executes instruction expansion to generate one or more machine instructionsNote.

(a)

0

not     0, reg
not     r0, reg

(b)

Absolute expression having a value of other than 0 within the range of -16 to +15

not     imm5, reg
mov     imm5, r1
not     r1, reg

(c)

Absolute expression exceeding the range of -16 to +15, but within the range of -32,768 to +32,767

not     imm16, reg
movea   imm16, r0, r1
not     r1, reg

(d)

Absolute expression having a value exceeding the range of -32,768 to +32,767

If all the lower 16 bits of the value of imm are 0

not     imm, reg
movhi   HIGHW(imm), r0, r1
not     r1, reg

 

Else

not     imm, reg
mov     imm, r1
not     r1, reg

(e)

Relative expression having !label or %label, or that having $label for a label having a definition in the sdata/sbss-attribute section

not     !label, reg
movea   !label, r0, r1
not     r1, reg
not     %label, reg
movea   %label, r0, r1
not     r1, reg
not     $label, reg
movea   $label, r0, r1
not     r1, reg

(f)

Relative expression having #label or label, or that having $label for a label having no definition in the sdata/sbss-attribute section

not     #label, reg
mov     #label, r1
not     r1, reg
not     label, reg
mov     label, r1
not     r1, reg
not     $label, reg
mov     $label, r1
not     r1, reg

Note

The not machine instruction does not take an immediate value as an operand.

[Flag]

CY

---

OV

0

S

1 if the word data MSB of the result is 1, 0 if not

Z

1 if the result is 0, 0 if not

SAT

---