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.

APPLICATION PERFORMANCE TOOLSExample 10-4. Auto-Generated Code of Sign ConversionCompiler Switch QxWCompiler Switch QxT$B1$3:mov edx, _src[eax*4]add eax, 1test edx, edxjne $B1$5$B1$4:mov _dst[eax*4], 0jmp $B1$7ALIGN 4$B1$5:jge $B1$7$B1$6:mov edx, _dst[eax*4]neg edxmov _dst[eax*4], edx$B1$7:cmp eax, 1024jl $B1$3$B1$3:movdqa xmm0, _dst[eax*4]psignd xmm0, _src[eax*4]movdqa _dst[eax*4], xmm0add eax, 4cmp eax, 1024jb $B1$3Example 10-5. Data Conversionint dst[1024];unsigned char src[1024];for (i = 0; i < 1024; i++) {dst[i] = src[i]}A-8

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

Saved successfully!

Ooh no, something went wrong!