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.

GENERAL OPTIMIZATION GUIDELINESExample 3-22. <strong>Reference</strong> Code Template for Partially Vectorizable Program// Prolog ///////////////////////////////push ebpmov ebp, esp// Unpacking ////////////////////////////sub ebp, <strong>32</strong><strong>and</strong> ebp, 0xfffffff0movaps [ebp], xmm0// Serial operations on components ///////sub ebp, 4mov eax, [ebp+4]mov [ebp], eaxcall foomov [ebp+16+4], eaxmov eax, [ebp+8]mov [ebp], eaxcall foomov [ebp+16+4+4], eaxmov eax, [ebp+12]mov [ebp], eaxcall foomov [ebp+16+8+4], eaxmov eax, [ebp+12+4]mov [ebp], eaxcall foomov [ebp+16+12+4], eax// Packing ///////////////////////////////movaps xmm0, [ebp+16+4]// Epilog ////////////////////////////////pop ebpret3-41

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

Saved successfully!

Ooh no, something went wrong!