umoddi3.c 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation; either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, see the file COPYING, or write
  15. * to the Free Software Foundation, Inc.
  16. */
  17. #include <linux/module.h>
  18. #include <linux/libgcc.h>
  19. extern unsigned long long __udivmoddi4(unsigned long long u,
  20. unsigned long long v,
  21. unsigned long long *rp);
  22. unsigned long long __umoddi3(unsigned long long u, unsigned long long v)
  23. {
  24. unsigned long long w;
  25. (void)__udivmoddi4(u, v, &w);
  26. return w;
  27. }
  28. EXPORT_SYMBOL(__umoddi3);