Fröhling

Niels Fröhling about [X]HTML, JS and technical tidbits

  • Home
  • About
February 15th, 2010

OP-equivalent series (pavgd)

Ethatron in Equivalence

pavgd (32bit average [(a + b + 1) >> 1]:
/* add (a + b), and compare overflow */
movq mm6, mmc
paddd mmc, mmd
psubd mm6, 0×80000000
psubd mmc, 0×80000000
pcmpgtd mm6, mmc
paddd mmc, 0×80000000

/* add (ab + 1), and compare overflow */
pcmpeqd mm5, mm5
pcmpeqd mmd, mmd
pcmpeqd mm5, mmc
psubd mmc, mmd

/* shift carry in */
por mm6, mm5
pslld mm6, 31
psrld mmc, 1
por mmc, mm6

Weiterlesen...

Kein Kommentar

Tags

  • Algorithms Assembler bash C++ Homemade Javascript MMX Optimization Rants TYPO3

Categories

    • Applications
      • TYPO3
    • TidBits
      • Algorithms
      • Approximations
      • Equivalence
      • Fixes
      • Javascript
      • Optimizations
      • Scripts
    • Uncategorized

Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

Recent Posts

    • jQuery’s animate is short-thought
    • movntq alignment
    • OP-equivalent series (pavgd)
    • OP-equivalent series (psubq)
    • OP-equivalent series (paddq)

 

  • February 2010
    M T W T F S S
    « Jan   Apr »
    1234567
    891011121314
    15161718192021
    22232425262728

Archives

    • August 2010
    • April 2010
    • February 2010
    • January 2010
    • July 2009
    • February 2009
    • December 2008
    • November 2008
    • August 2008
    • July 2008
    • May 2008
© 2010 Wired by Fröhling
Design von Dezzain Studio
Übersetzt von Htwo
Nature Pictures | Bamboo Blinds