cmpf.d, cmpf.s


-

The cmpf.d and cmpf.s instructions of the device should be specified in the format of "cmpf.* fcond, reg2, reg1, fcbit".

In asrh, they can also be specified in the format of "cmpffcond.* reg2, reg1, fcbit". Code that can be specified in cmpffcond and the result of assembly are shown in Table 5.29.

Table 5.29

cmpffcond Instruction List

Instruction

Condition

Meaning of Condition

Result of Assembly

cmpff.*

FALSE

Always false

cmpf.* 0x0

cmpfun.*

Unordered

At least one of reg1 and reg2 is a non-number

cmpf.* 0x1

cmpfeq.*

reg2 = reg1

Neither is a non-number, and they are equal

cmpf.* 0x2

cmpfueq.*

reg2 ?= reg1

At least one is a non-number, or they are equal

cmpf.* 0x3

cmpfolt.*

reg2 < reg1

Neither is a non-number, and less than

cmpf.* 0x4

cmpfult.*

reg2 ?< reg1

At least one is a non-number, or less than

cmpf.* 0x5

cmpfole.*

reg2 <= reg1

Neither is a non-number, and less than or equal

cmpf.* 0x6

cmpfule.*

reg2 ?<= reg1

At least one is a non-number, or less than or equal

cmpf.* 0x7

cmpfsf.*

FALSE

Always false

cmpf.* 0x8

cmpfngle.*

Unordered

At least one of reg1 and reg2 is a non-number

cmpf.* 0x9

cmpfseq.*

reg2 = reg1

Neither is a non-number, and they are equal

cmpf.* 0xA

cmpfngl.*

reg2 ?= reg1

At least one is a non-number, or they are equal

cmpf.* 0xB

cmpflt.*

reg2 < reg1

Neither is a non-number, and less than

cmpf.* 0xC

cmpfnge.*

reg2 ?< reg1

At least one is a non-number, or less than

cmpf.* 0xD

cmpfle.*

reg2 <= reg1

Neither is a non-number, and less than or equal

cmpf.* 0xE

cmpfngt.*

reg2 ?<= reg1

At least one is a non-number, or less than or equal

cmpf.* 0xF

Note

?: Unordered

[Example]

cmpfeq.s r10, r11, 0                 ; Same as "cmpf.s 0x2, r10, r11, 0"