ARM application development SDK for MNT ZZ9000 graphics and coprocessor card for classic Amiga computers.
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.

uldivmod.S 928B

12345678910111213141516171819202122232425262728
  1. //===-- aeabi_uldivmod.S - EABI uldivmod implementation -------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //#include "../assembly.h"
  10. // struct { uint64_t quot, uint64_t rem}
  11. // __aeabi_uldivmod(uint64_t numerator, uint64_t denominator) {
  12. // uint64_t rem, quot;
  13. // quot = __udivmoddi4(numerator, denominator, &rem);
  14. // return {quot, rem};
  15. // }
  16. .syntax unified
  17. .align 2
  18. DEFINE_COMPILERRT_FUNCTION(__aeabi_uldivmod)
  19. push {r11, lr}
  20. sub sp, sp, #16
  21. add r12, sp, #8
  22. str r12, [sp]
  23. bl SYMBOL_NAME(__udivmoddi4)
  24. ldr r2, [sp, #8]
  25. ldr r3, [sp, #12]
  26. add sp, sp, #16
  27. pop {r11, pc}