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-45. Algorithm to Avoid Changing Rounding Mode (Contd.)arg_is_not_integer_QnaN:fsubp st(1), st ; TOS=d-round(d), { st(1) = st(1)-st & pop ST}test edx, edx ; What’s sign of integerjns positive ; Number is negativefstp dword ptr[ecx] ; Result of subtractionmov ecx, [ecx] ; DWORD of diff(single-precision)add esp, 16xor ecx, 80000000hadd ecx,7fffffffh ; If diff

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

Saved successfully!

Ooh no, something went wrong!