DSETP : FP64 Compare And Set Predicate

Format:

SPA 5.0:
        {@{!}Pg}   DSETP.cmp       Pu,     {-}{|}Ra{|}, {-}{|}Sb{|}          {&req_6}   {&rdN}   {&wrN}   {?sched}   ;   
        {@{!}Pg}   DSETP.cmp.bop   Pu, Pv, {-}{|}Ra{|}, {-}{|}Sb{|}, {!}Pp   {&req_6}   {&rdN}   {&wrN}   {?sched}   ;   

  .cmp:   { .F,   .LT,  .EQ,  .LE,  .GT,  .NE,  .GE,  .NUM,    FP64 numeric comparisons
            .NAN, .LTU, .EQU, .LEU, .GTU, .NEU, .GEU, .T   }   FP64 numeric or Unordered comparisons

  .bop:   { .AND, .OR, .XOR } 

The following source Sb is allowed:
    Sb(even aligned register)
    Sb(64-bit constant with immediate address)
	if lower 3 address bits are 0x4, the 64 bit constant is (c[][addr&~7|0x4] << 32)
	if lower 3 address bits are 0x0, the 64 bit constant is (c[][addr|0x4] << 32) | c[][addr])
    Sb(#IMM20<<44)

Note that the source registers have to be even aligned.

Description:

DSETP.cmp.bop compares FP64 register pair Ra and source operand Sb with FP64 comparison operation .cmp, combines the Boolean comparison result with predicate operand {!}Pp using the Boolean operation .bop, and sets two predicate registers Pu and Pv to Boolean values based on the comparison. The Boolean operation .bop may be .AND, .OR, or .XOR, corresponding to C Boolean operations &, |, and ^.

    Pu =  (Ra .cmp Sb)  .bop {!}Pp;     
    Pv =(!(Ra .cmp Sb)) .bop {!}Pp; 

Use .bop {!}Pp for nested predication, with an inner comparison of Ra vs. Sb, conditioned on outer predicate Pp.

The simple instruction format without .bop {!}Pp assembles as .AND PT, and Pv is PT, with the following effective functionality:

    Pu =  (Ra .cmp Sb);

Double precision compares do NOT flush denormalized operands to zero prior to comparison.

Examples:

DSETP.LT      P1,     R0, -|R2|;
DSETP.NEU.AND P1, P4, R0, -R2, P3;

back to Index of Instructions