__muldi3.S 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /* __muldi3.S: 64-bit multiply
  2. *
  3. * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the License, or (at your option) any later version.
  10. */
  11. .text
  12. .p2align 4
  13. ###############################################################################
  14. #
  15. # unsigned long long __muldi3(unsigned long long x [GR8:GR9],
  16. # unsigned long long y [GR10:GR11])
  17. #
  18. ###############################################################################
  19. .globl __muldi3, __mulll, __umulll
  20. .type __muldi3,@function
  21. __muldi3:
  22. __mulll:
  23. __umulll:
  24. umul gr8,gr11,gr4 ; GR4:GR5 = x.MSW * y.LSW
  25. umul gr9,gr10,gr6 ; GR6:GR7 = x.LSW * y.MSW
  26. umul.p gr9,gr11,gr8 ; GR8:GR9 = x.LSW * y.LSW
  27. add gr5,gr7,gr5
  28. add.p gr8,gr5,gr8 ; GR8 += GR5 + GR7
  29. bralr
  30. .size __muldi3, .-__muldi3