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.

__moddi3.c 346B

1234567891011121314151617181920212223242526
  1. /*
  2. * arch/i386/libgcc/__moddi3.c
  3. */
  4. #include "libgcc.h"
  5. __libgcc int64_t __moddi3(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. (void) __udivmoddi4(num, den, (uint64_t *)&v);
  18. if ( minus )
  19. v = -v;
  20. return v;
  21. }