Everything

cmov


-

The cmov instruction of the device should be specified in the following formats.

-

CMOV cccc, reg1, reg2, reg3

-

CMOV cccc, imm5, reg2, reg3

 

-

In asrh, the following formats can also be used in addition to the above.

-

cmovcond reg1, reg2, reg3

-

cmovcond imm, reg2, reg3

 

Code that can be specified in cond and the result of assembly are the same as those for the setf instruction. For details, see "Table 5.27 setfcond Instruction".

 

-

If the following is specified as imm in syntax "cmov cccc, imm, reg2, reg3" or "cmovcond imm, reg2, reg3", the assembler executes instruction expansion to generate multiple machine instructions.

(a)

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

Format

Result of Assembly

cmov    imm4, imm16, reg2, reg3
movea   imm16, r0, r1
cmov    imm4, r1, reg2, reg3

(b)

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

Format

Result of Assembly

cmov    imm4, imm, reg2, reg3
movhi   HIGHW(imm), r0, r1
cmov    imm4, r1, reg2, reg3

 

Else

Format

Result of Assembly

cmov    imm4, imm, reg2, reg3
mov     imm, r1
cmov    imm4, r1, reg2, reg3

(c)

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

Format

Result of Assembly

cmov    imm4, #label, reg2, reg3
mov     #label, r1
cmov    imm4, r1, reg2, reg3
cmov    imm4, label, reg2, reg3
mov     label, r1
cmov    imm4, r1, reg2, reg3
cmov    imm4, $label, reg2, reg3
mov     $label, r1
cmov    imm4, r1, reg2, reg3

(d)

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

Format

Result of Assembly

cmov    imm4, !label, reg2, reg3
movea   !label, r0, r1
cmov    imm4, r1, reg2, reg3
cmov    imm4, %label, reg2, reg3
movea   %label, r0, r1
cmov    imm4, r1, reg2, reg3
cmov    imm4, $label, reg2, reg3
movea   $label, r0, r1
cmov    imm4, r1, reg2, reg3