English
Language : 

GMS30C2216 Datasheet, PDF (206/320 Pages) Hynix Semiconductor – 16/32 BIT RISC/DSP
A-34
Compare with Immediate
Appendix A. Instruction Set Details
CMPI
Format:
Rimm format
15
10 9 8 7
43
0
OP-code
dn
Rd-code
n
0110 00
imm1
imm2
d = 0: Rd-code encoded G0..G15 for Rd
d = 1: Rd-code encoded L0..L15 for Rd
n: bit 8 // bit 3..0 encode n = 0..31, see Table 2.3 Encoding of Immediate Values
Notation:
CMPI Rd, imm
Description:
Two operands are compared by subtracting the source operand from the destination
operand. The condition flags are set or cleared according to the result; the result itself is
not retained. Note that the N flag indicates the correct compare result even in the case of an
overflow.
All operands and the result are interpreted as either all signed or all unsigned integers.
Operation:
result := Rd - imm;
Z := Rd = imm;
N := Rd < imm signed;
V := overflow;
C := Rd < imm unsigned;
Exceptions:
None