32-Bit Instruction Set

 

ASR

 

Arithmetic Shift Right

Operation:

RA (RA >> RB[4..0]), fill from left with RA[31]

Assembler Syntax:

ASR %rA,%rB

Example:

ASR %L3,%g0 ; shift %L3 right by %g0 bits

Description:

Arithmetically shift right the value in RA by the value of RB; store the result in RA.

 

Bits 31..5 of RB are ignored. If the value in RB[4..0] is 31, RA will be zero or

 

negative one depending on the original sign of RA.

Condition Codes:

 

 

Flags: Unaffected

 

 

 

 

 

 

 

 

 

 

 

 

 

 

N

 

V

Z

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction Format:

 

 

RR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction Fields:

 

 

A = Register index of RA operand

 

 

 

 

 

 

 

 

 

 

 

 

 

B = Register index of RB operand

 

 

 

 

 

 

 

15

14

13

 

12

11

10

 

9

8

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

1

 

0

1

0

 

 

 

 

 

B

 

 

 

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

32-Bit Instruction Set

Altera Corporation

39

Page 51
Image 51
Excalibur electronic A-MNL-NIOSPROG-01.1 manual Asr, Arithmetic Shift Right