ROTL

VAX11

 

ROTL      ROTATE LONG

 

Purpose

rotate of integer

Format

opcode cnt.rb, src.rl, dst.wl

Operation

dst ß src rotated cnt bits;

Condition codes

N ß dst LSS 0;

Z ß dst EQL 0;

V ß 0;

C ß C;

Exceptions

None

Opcodes

9C       ROTL              Rotate Long

Description

The source operand is rotated logically by the number of bits specified by the court operand and the destination operand is replaced by the result. The source operand is unaffected. A positive count operand rotates to the left. A negative count operand rotates to the right. A 0 count operand replaces the destination operand with the source operand.

Notes

 

 

 

Example 1

 

.text

.word 0

movl $0xff, r1

rotl $8, r1, r2         # r2 is 0xff00

 

movl $0xff000000, r1

rotl $8, r1, r2         # r2 is 0xff

 

movl $0xff, r1

rotl $-8, r1, r2        # r2 is $0xff000000

 

halt