strasgi.S 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. ;; Copyright 2010 Free Software Foundation, Inc.
  2. ;; Contributed by Bernd Schmidt <bernds@codesourcery.com>.
  3. ;;
  4. ;; This program is free software; you can redistribute it and/or modify
  5. ;; it under the terms of the GNU General Public License as published by
  6. ;; the Free Software Foundation; either version 2 of the License, or
  7. ;; (at your option) any later version.
  8. ;;
  9. ;; This program is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ;; GNU General Public License for more details.
  13. ;;
  14. ;; You should have received a copy of the GNU General Public License
  15. ;; along with this program; if not, write to the Free Software
  16. ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. #include <linux/linkage.h>
  18. .text
  19. ENTRY(__c6xabi_strasgi)
  20. ;; This is essentially memcpy, with alignment known to be at least
  21. ;; 4, and the size a multiple of 4 greater than or equal to 28.
  22. ldw .d2t1 *B4++, A0
  23. || mvk .s2 16, B1
  24. ldw .d2t1 *B4++, A1
  25. || mvk .s2 20, B2
  26. || sub .d1 A6, 24, A6
  27. ldw .d2t1 *B4++, A5
  28. ldw .d2t1 *B4++, A7
  29. || mv .l2x A6, B7
  30. ldw .d2t1 *B4++, A8
  31. ldw .d2t1 *B4++, A9
  32. || mv .s2x A0, B5
  33. || cmpltu .l2 B2, B7, B0
  34. _strasgi_loop:
  35. stw .d1t2 B5, *A4++
  36. || [B0] ldw .d2t1 *B4++, A0
  37. || mv .s2x A1, B5
  38. || mv .l2 B7, B6
  39. [B0] sub .d2 B6, 24, B7
  40. || [B0] b .s2 _strasgi_loop
  41. || cmpltu .l2 B1, B6, B0
  42. [B0] ldw .d2t1 *B4++, A1
  43. || stw .d1t2 B5, *A4++
  44. || mv .s2x A5, B5
  45. || cmpltu .l2 12, B6, B0
  46. [B0] ldw .d2t1 *B4++, A5
  47. || stw .d1t2 B5, *A4++
  48. || mv .s2x A7, B5
  49. || cmpltu .l2 8, B6, B0
  50. [B0] ldw .d2t1 *B4++, A7
  51. || stw .d1t2 B5, *A4++
  52. || mv .s2x A8, B5
  53. || cmpltu .l2 4, B6, B0
  54. [B0] ldw .d2t1 *B4++, A8
  55. || stw .d1t2 B5, *A4++
  56. || mv .s2x A9, B5
  57. || cmpltu .l2 0, B6, B0
  58. [B0] ldw .d2t1 *B4++, A9
  59. || stw .d1t2 B5, *A4++
  60. || mv .s2x A0, B5
  61. || cmpltu .l2 B2, B7, B0
  62. ;; loop back branch happens here
  63. cmpltu .l2 B1, B6, B0
  64. || ret .s2 b3
  65. [B0] stw .d1t1 A1, *A4++
  66. || cmpltu .l2 12, B6, B0
  67. [B0] stw .d1t1 A5, *A4++
  68. || cmpltu .l2 8, B6, B0
  69. [B0] stw .d1t1 A7, *A4++
  70. || cmpltu .l2 4, B6, B0
  71. [B0] stw .d1t1 A8, *A4++
  72. || cmpltu .l2 0, B6, B0
  73. [B0] stw .d1t1 A9, *A4++
  74. ;; return happens here
  75. ENDPROC(__c6xabi_strasgi)