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 />

5.8.2 Vector Merge Instructions<br />

Vector Merge High Byte<br />

VX-form<br />

Vector Merge High Halfword<br />

VX-form<br />

vmrghb<br />

VRT,VRA,VRB<br />

vmrghh<br />

VRT,VRA,VRB<br />

4 VRT VRA VRB 12<br />

0 6 11 16 21 31<br />

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

VRT i×2:i×2+7 (VRA) i:i+7<br />

VRT i×2+8:i×2+15 (VRB) i:i+7<br />

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

Byte element i in VRA is placed into byte element<br />

2×i in VRT.<br />

Byte element i in VRB is placed into byte element<br />

2×i+1 in VRT.<br />

Special Registers Altered:<br />

None<br />

4 VRT VRA VRB 76<br />

0 6 11 16 21 31<br />

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

VRT i×2:i×2+15 (VRA) i:i+15<br />

VRT i×2+16:i×2+31 (VRB) i:i+15<br />

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

Halfword element i in VRA is placed into halfword<br />

element 2×i in VRT.<br />

Halfword element i in VRB is placed into halfword<br />

element 2×i+1 in VRT.<br />

Special Registers Altered:<br />

None<br />

Vector Merge High Word<br />

VX-form<br />

vmrghw<br />

VRT,VRA,VRB<br />

4 VRT VRA VRB 140<br />

0 6 11 16 21 31<br />

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

VRT i×2:i×2+31 (VRA) i:i+31<br />

VRT i×2+32:i×2+63 (VRB) i:i+31<br />

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

Word element i in VRA is placed into word element<br />

2×i in VRT.<br />

Word element i in VRB is placed into word element<br />

2×i+1 in VRT.<br />

The word elements in the high-order half of VRA are<br />

placed, in the same order, into the even-numbered<br />

word elements of VRT. The word elements in the<br />

high-order half of VRB are placed, in the same order,<br />

into the odd-numbered word elements of VRT.<br />

Special Registers Altered:<br />

None<br />

Chapter 5. Vector Processor [Category: Vector]<br />

149

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

Saved successfully!

Ooh no, something went wrong!