You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__divdi3.c 331B

1234567891011121314151617181920212223242526
  1. /*
  2. * arch/i386/libgcc/__divdi3.c
  3. */
  4. #include "libgcc.h"
  5. LIBGCC int64_t __divdi3(int64_t num, int64_t den)
  6. {
  7. int minus = 0;
  8. int64_t v;
  9. if ( num < 0 ) {
  10. num = -num;
  11. minus = 1;
  12. }
  13. if ( den < 0 ) {
  14. den = -den;
  15. minus ^= 1;
  16. }
  17. v = __udivmoddi4(num, den, NULL);
  18. if ( minus )
  19. v = -v;
  20. return v;
  21. }