Encoding:

P32A

001000

rt

rs

rd

x

1011010

101

6

5

5

5

1

7

3

Format:

SHRAV_R.W rd, rt, rs

DSP

Shift Right Arithmetic Variable Word with Rounding

Purpose:

Shift Right Arithmetic Variable Word with Rounding

Arithmetic right shift with rounding of a signed 32-bit word by a variable number of bits.

Description:

rd = rnd32(rt31..0 >> rs4..0)

The word value in register rt is shifted right, with the value’s original sign bit duplicated into the most-significant bits emptied by the shift. A 1 is then added at the most-significant discarded bit position before the result is written to destination register rd.

The shift amount sa is given by the five least-significant bits of register rs; the remaining bits of rs are ignored.

Restrictions:

No data-dependent exceptions are possible.

The operands must be values in the specified format. If they are not, the results are UNPREDICTABLE and the values of the operand vectors become UNPREDICTABLE.

Operation:

ValidateAccessToDSPResources()
temp31..0 = rnd32ShiftRightArithmetic( GPR[rt]31..0, GPR[rs]4..0 )
GPR[rd]31..0 = temp31..0

Exceptions:

Reserved Instruction, DSP Disabled