AltiVec Technology
Programming Environments
Manual for Power ISA Processors, Rev 0
Freescale Semiconductor vii
Figures
Figure
Number Title
Page
Number
Figures
1-1 Overview of an example implementation with AltiVec Technology ...................................... 1-4
1-2 AltiVec Top-Level Diagram ....................................................................................................1-6
1-3 Big-Endian Byte Ordering for a Vector Register .................................................................... 1-6
1-4 Bit Ordering ............................................................................................................................ 1-7
1-5 Intra-Element Example, vaddsws........................................................................................... 1-7
1-6 inter-element Example, vperm ............................................................................................... 1-8
2-1 AltiVec Register Set ................................................................................................................ 2-1
2-2 Vector Registers (VRs)............................................................................................................ 2-2
2-3 Vector Status and Control Register (VSCR) ........................................................................... 2-3
2-4 32-Bit VSCR Moved to a 128-Bit Vector Register ................................................................. 2-3
2-5 Vector Save/Restore Register (VRSAVE) ............................................................................... 2-5
3-1 Big-Endian Mapping of a Quad Word .................................................................................... 3-3
3-2 Misaligned Vector in Big-Endian Mode ................................................................................. 3-4
3-3 Big-Endian Quad Word Alignment......................................................................................... 3-4
4-1 Register Indirect with Index Addressing for Loads/Stores ................................................... 4-23
6-1 Effects of Example Load/Store Instructions ......................................................................... 6-12
6-2 Example lvexbx Instruction .................................................................................................. 6-17
6-3 Example lvexhx Instruction .................................................................................................. 6-18
6-4 Example lvexwx Instruction ................................................................................................. 6-19
6-5 Example lvtlx Instruction...................................................................................................... 6-20
6-6 Example lvtlxl Instruction .................................................................................................... 6-21
6-7 Example lvtrx Instruction ..................................................................................................... 6-22
6-8 Example lvtrxl Instruction.................................................................................................... 6-23
6-9 Load Vector for Shift Left..................................................................................................... 6-25
6-10 Instruction vperm Used in Aligning Data ............................................................................ 6-26
6-11 Example lvsm Instruction ..................................................................................................... 6-28
6-12 Example lvswx Instruction.................................................................................................... 6-30
6-13 Example lvswxl Instruction .................................................................................................. 6-32
6-14 Example stvexbx Instruction ................................................................................................ 6-44
6-15 Example stvexhx Instruction ................................................................................................ 6-45
6-16 Example stvflx Instruction.................................................................................................... 6-47
6-17 Example stvflxl Instruction................................................................................................... 6-48
6-18 Example stvfrx Instruction ................................................................................................... 6-49
6-19 Example stvfrxl Instruction .................................................................................................. 6-51
6-20 Example stvswx Instruction.................................................................................................. 6-52
6-21 Example stvswxl Instruction................................................................................................. 6-54
6-22 vabsdub—Absolute Differences Sixteen Integer Elements (8-Bit) ..................................... 6-57
6-23 vabsduh—Absolute Differences Eight Integer Elements (16-Bit)....................................... 6-58
6-24 vabsduw—Absolute Differences Four Integer Elements (32-Bit) ....................................... 6-59
6-25 vaddcuw—Determine Carries of Four Unsigned Integer Adds (32-Bit) ............................. 6-60
6-26 vaddfp—Add Four Floating-Point Elements (32-Bit) ......................................................... 6-61