sh2add

Shift left by 2 and add

This instruction is defined by:

Encoding

svg

Synopsis

This instruction shifts rs1 to the left by 2 places and adds it to rs2.

Access

M

HS

U

VS

VU

Always

Always

Always

Always

Always

Decode Variables

Bits<5> rs2 = $encoding[24:20];
Bits<5> rs1 = $encoding[19:15];
Bits<5> rd = $encoding[11:7];
idl

Execution

X[rd] = X[rs2] + (X[rs1] << 2);
idl