SEL : Select Source with Predicate

Format

SPA 5.0:
        {@{!}Pg}   SEL   Rd, Ra, Sb, {!}Pp   {&req_6}   {?sched}   ;   

Source operand Sb may have one of these forms:
    Rb                      // 32-bit register
    c[ImmU05][ImmU16]       // 32-bit constant with immediate byte address (or c[ImmU20])
    ImmS20                  // 32-bit sign-extended 20-bit immediate

Description

SEL selects source operand Ra or Sb with predicate operand {!}Pp, and moves the selected source to register Rd. If predicate operand {!}Pp is true (1), it selects register Ra, else source operand Sb.

Examples:

SEL R0, R1, c[0][20], !P3;           // R0 = !P3? R1: c[0][20];

Back to Index of Instructions