umulsi3_highpart.S 628 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright 2007 Analog Devices Inc.
  3. *
  4. * Licensed under the Clear BSD license or the GPL-2 (or later)
  5. */
  6. .align 2
  7. .global ___umulsi3_highpart;
  8. .type ___umulsi3_highpart, STT_FUNC;
  9. #ifdef CONFIG_ARITHMETIC_OPS_L1
  10. .section .l1.text
  11. #else
  12. .text
  13. #endif
  14. ___umulsi3_highpart:
  15. R2 = R1.H * R0.H, R3 = R1.L * R0.H (FU);
  16. R0 = R1.L * R0.L, R1 = R1.H * R0.L (FU);
  17. R0 >>= 16;
  18. /* Unsigned multiplication has the nice property that we can
  19. ignore carry on this first addition. */
  20. R0 = R0 + R3;
  21. R0 = R0 + R1;
  22. cc = ac0;
  23. R1 = cc;
  24. R1 = PACK(R1.l,R0.h);
  25. R0 = R1 + R2;
  26. RTS;
  27. .size ___umulsi3_highpart, .-___umulsi3_highpart