Compare Instructions

The compare instructions (cmp, tbit, fclass, and fcmp) define predicate values. They precede the predicated instructions. The compare instructions indicate to the assembler that the named predicate registers are mutually exclusive. They override any other defined mutex relations between the destination predicate registers and other predicate registers.

These examples all show the use of the cmp instruction for simplicity. Use the tbit, fclass, and fcmp instructions for the same effect.

In the example below, the cmp instruction states that p1 and p2 cannot both be true at the same time, thereby avoiding a violation dependency error.

mp.lt p1, p2 = r13, r0;;
(p1) dd r5 = 8, r6
(p2) dd r5 = r7, r0

The cmp instruction overrides the mutex relation between the destination predicate registers and all the other predicate registers. For example:

mp.lt p1,p2 = r13,r0;;
; p1 and p2 are mutually exclusive
mp.lt p1,p3 = r12,r11;;
; the mutex relation between p1 and
; p2 is destroyed by cmp
(p1) dd r5 = 8, r6
(p2) add r5 = r7, r0 // WAW error