~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/asm-i386/div64.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __I386_DIV64
  2 #define __I386_DIV64
  3 
  4 #define do_div(n,base) ({ \
  5         unsigned long __upper, __low, __high, __mod; \
  6         asm("":"=a" (__low), "=d" (__high):"A" (n)); \
  7         __upper = __high; \
  8         if (__high) { \
  9                 __upper = __high % (base); \
 10                 __high = __high / (base); \
 11         } \
 12         asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "" (__low), "1" (__upper)); \
 13         asm("":"=A" (n):"a" (__low),"d" (__high)); \
 14         __mod; \
 15 })
 16 
 17 #endif
 18 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.