14.06.2015 Views

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Version</strong> <strong>2.03</strong><br />

Vector Shift Right Byte<br />

VX-form<br />

Vector Shift Right Halfword<br />

VX-form<br />

vsrb<br />

VRT,VRA,VRB<br />

vsrh<br />

VRT,VRA,VRB<br />

4 VRT VRA VRB 516<br />

0 6 11 16 21 31<br />

do i=0 to 127 by 8<br />

sh (VRB) i+5:i+7<br />

VRT i:i+7 (VRA) i:i+7 >> ui sh<br />

For each vector element i from 0 to 15, do the following.<br />

Byte element i in VRA is shifted right by the number<br />

of bits specified in the low-order 3 bits of byte<br />

element i in VRB. Bits shifted out of the least-significant<br />

bit are lost. Zeros are supplied to the<br />

vacated bits on the left. The result is placed into<br />

byte element i of VRT.<br />

Special Registers Altered:<br />

None<br />

4 VRT VRA VRB 580<br />

0 6 11 16 21 31<br />

do i=0 to 127 by 16<br />

sh (VRB) i+12:i+15<br />

VRT i:i+15 (VRA) i:i+15 >> ui sh<br />

For each vector element i from 0 to 7, do the following.<br />

Halfword element i in VRA is shifted right by the<br />

number of bits specified in the low-order 4 bits of<br />

halfword element i in VRB. Bits shifted out of the<br />

least-significant bit are lost. Zeros are supplied to<br />

the vacated bits on the left. The result is placed<br />

into halfword element i of VRT.<br />

Special Registers Altered:<br />

None<br />

Vector Shift Right Word<br />

VX-form<br />

vsrw<br />

VRT,VRA,VRB<br />

4 VRT VRA VRB 644<br />

0 6 11 16 21 31<br />

do i=0 to 127 by 32<br />

sh (VRB) i+27:i+31<br />

VRT i:i+31 (VRA) i:i+31 >> ui sh<br />

For each vector element i from 0 to 3, do the following.<br />

Word element i in VRA is shifted right by the number<br />

of bits specified in the low-order 5 bits of word<br />

element i in VRB. Bits shifted out of the least-significant<br />

bit are lost. Zeros are supplied to the<br />

vacated bits on the left. The result is placed into<br />

word element i of VRT.<br />

Special Registers Altered:<br />

None<br />

182<br />

<strong>Power</strong> ISA -- Book I

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!