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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

5.9.1.7 Vector Integer Maximum and Minimum Instructions<br />

Vector Maximum Signed Byte VX-form Vector Maximum Signed Halfword<br />

VX-form<br />

vmaxsb VRT,VRA,VRB<br />

vmaxsh VRT,VRA,VRB<br />

4 VRT VRA VRB 258<br />

0 6 11 16 21 31 4 VRT VRA VRB 322<br />

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

aop EXTS((VRA) i:i+7 )<br />

bop EXTS((VRB) i:i+7 )<br />

VRT i:i+7 ( aop > si bop )<br />

? (VRA) i:i+7 : (VRB) i:i+7<br />

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

Signed-integer byte element i in VRA is compared<br />

to signed-integer byte element i in VRB. The larger<br />

of the two values is placed into byte element i of<br />

VRT.<br />

Special Registers Altered:<br />

None<br />

0 6 11 16 21 31<br />

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

aop EXTS((VRA) i:i+15 )<br />

bop EXTS((VRB) i:i+15<br />

VRT i:i+15 ( aop > si bop )<br />

? (VRA) i:i+15 : (VRB) i:i+15<br />

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

Signed-integer halfword element i in VRA is compared<br />

to signed-integer halfword element i in VRB.<br />

The larger of the two values is placed into halfword<br />

element i of VRT.<br />

Special Registers Altered:<br />

None<br />

Vector Maximum Signed Word<br />

VX-form<br />

vmaxsw<br />

VRT,VRA,VRB<br />

4 VRT VRA VRB 386<br />

0 6 11 16 21 31<br />

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

aop EXTS((VRA) i:i+31 )<br />

bop EXTS((VRB) i:i+31 )<br />

VRT i:i+31 ( aop > si bop )<br />

? (VRA) i:i+31 : (VRB) i:i+31<br />

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

Signed-integer word element i in VRA is compared<br />

to signed-integer word element i in VRB. The<br />

larger of the two values is placed into word element<br />

i of VRT.<br />

Special Registers Altered:<br />

None<br />

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

171

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

Saved successfully!

Ooh no, something went wrong!