13.07.2015 Views

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

OPTIMIZING FOR SIMD INTEGER APPLICATIONSTable 5-1. PAHUF EncodingBitsWords1 - 0 03 - 2 15 - 4 27 - 6 3Bits 7 <strong>and</strong> 6 encode for word 3 in MMX register ([63-48]). Similarly, the 2-bitencoding represents which source word is used, for example, binary encoding of 10indicates that source word 2 in MMX register/memory (MM/MEM[47-<strong>32</strong>]) is used.See Figure 5-8 <strong>and</strong> Example 5-13.63MM/m<strong>64</strong>X4 X3 X2 X1063MMX1 X2 X3 X40OM15166Figure 5-8. pshuf PSHUF InstructionExample 5-13. PSHUF Instruction Code; Input:; edi source value; Output:; MM1 MM register containing re-arranged wordsmovq mm0, [edi]pshufw mm1, mm0, 0x1b5-16

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

Saved successfully!

Ooh no, something went wrong!