ISCADD : Scaled Integer Addition

Format:

SPA 5.0:
        {@{!}Pg}   ISCADD{.PO}   Rd{.CC},{-}Ra, {-}Sb, #ScaleU05    {&req_6}   {?sched}   ;   
        {@{!}Pg}   ISCADD32I     Rd{.CC},   Ra,#ImmS32, #ScaleU05   {&req_6}   {?sched}   ;   

.PO:    Plus one (used for averaging).

.CC:    Write condition codes

ISCADD allows the following source Sb:
    Sb(register)
    Sb(constant with immediate address)
    Sb(#IMM20)

For ISCADD, The following scaled add options exist:
       scaled(Ra)+Sb  :     (Ra<<#ScaleU05) +  Sb + 0
       scaled(Ra)-Sb  :     (Ra<<#ScaleU05) + ~Sb + 1
      -scaled(Ra)+Sb  :    ~(Ra<<#ScaleU05) +  Sb + 1
  .PO  scaled(Ra)+Sb+1:     (Ra<<#ScaleU05) +  Sb + 1     // for average, use .PO
   
    Note: It is illegal to negate both sources at the same time.
    Note: It is illegal to negate either source operand in .PO mode.

Description:

Shift left Ra by #ScaleU05 (only preserves 32b though), add Sb, and store the result in Rd.

Examples:

ISCADD R0, R1, R2, 5;

Back to Index of Instructions