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

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

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

OPTIMIZING FOR SIMD INTEGER APPLICATIONSExample 5-9. PEXTRW Instruction Code; Input:; eax source value; immediate value: “0”; Output:; edx <strong>32</strong>-bit integer register containing the; extracted word in the low-order bits &; the high-order bits zero-extendedmovq mm0, [eax]pextrw edx, mm0, 05.4.7 Insert WordThe PINSRW instruction loads a word from the lower half of a <strong>32</strong>-bit integer registeror from memory <strong>and</strong> inserts it in an MMX technology destination register at a positiondefined by the two least significant bits of the immediate constant. Insertion is donein such a way that three other words from the destination register are left untouched.See Figure 5-6 <strong>and</strong> Example 5-10.MM6331 0X4 X3 Y1 X1R<strong>32</strong>31 0Y2Y1OM151<strong>64</strong>Figure 5-6. PINSRW Instruction5-13

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

Saved successfully!

Ooh no, something went wrong!