root/arch/c6x/lib/strasgi.S

/* [<][>][^][v][top][bottom][index][help] */
   1 ;; SPDX-License-Identifier: GPL-2.0-or-later
   2 ;;  Copyright 2010  Free Software Foundation, Inc.
   3 ;;  Contributed by Bernd Schmidt <bernds@codesourcery.com>.
   4 ;;
   5 
   6 #include <linux/linkage.h>
   7 
   8         .text
   9 
  10 ENTRY(__c6xabi_strasgi)
  11         ;; This is essentially memcpy, with alignment known to be at least
  12         ;; 4, and the size a multiple of 4 greater than or equal to 28.
  13          ldw    .d2t1   *B4++, A0
  14 ||       mvk    .s2     16, B1
  15          ldw    .d2t1   *B4++, A1
  16 ||       mvk    .s2     20, B2
  17 ||       sub    .d1     A6, 24, A6
  18          ldw    .d2t1   *B4++, A5
  19          ldw    .d2t1   *B4++, A7
  20 ||       mv     .l2x    A6, B7
  21          ldw    .d2t1   *B4++, A8
  22          ldw    .d2t1   *B4++, A9
  23 ||       mv     .s2x    A0, B5
  24 ||       cmpltu .l2     B2, B7, B0
  25 
  26 _strasgi_loop:
  27          stw    .d1t2   B5, *A4++
  28 || [B0]  ldw    .d2t1   *B4++, A0
  29 ||       mv     .s2x    A1, B5
  30 ||       mv     .l2     B7, B6
  31 
  32    [B0]  sub    .d2     B6, 24, B7
  33 || [B0]  b      .s2     _strasgi_loop
  34 ||       cmpltu .l2     B1, B6, B0
  35 
  36    [B0]  ldw    .d2t1   *B4++, A1
  37 ||       stw    .d1t2   B5, *A4++
  38 ||       mv     .s2x    A5, B5
  39 ||       cmpltu .l2     12, B6, B0
  40 
  41    [B0]  ldw    .d2t1   *B4++, A5
  42 ||       stw    .d1t2   B5, *A4++
  43 ||       mv     .s2x    A7, B5
  44 ||       cmpltu .l2     8, B6, B0
  45 
  46    [B0]  ldw    .d2t1   *B4++, A7
  47 ||       stw    .d1t2   B5, *A4++
  48 ||       mv     .s2x    A8, B5
  49 ||       cmpltu .l2     4, B6, B0
  50 
  51    [B0]  ldw    .d2t1   *B4++, A8
  52 ||       stw    .d1t2   B5, *A4++
  53 ||       mv     .s2x    A9, B5
  54 ||       cmpltu .l2     0, B6, B0
  55 
  56    [B0]  ldw    .d2t1   *B4++, A9
  57 ||       stw    .d1t2   B5, *A4++
  58 ||       mv     .s2x    A0, B5
  59 ||       cmpltu .l2     B2, B7, B0
  60 
  61         ;; loop back branch happens here
  62 
  63          cmpltu .l2     B1, B6, B0
  64 ||       ret    .s2     b3
  65 
  66    [B0]  stw    .d1t1   A1, *A4++
  67 ||       cmpltu .l2     12, B6, B0
  68    [B0]  stw    .d1t1   A5, *A4++
  69 ||       cmpltu .l2     8, B6, B0
  70    [B0]  stw    .d1t1   A7, *A4++
  71 ||       cmpltu .l2     4, B6, B0
  72    [B0]  stw    .d1t1   A8, *A4++
  73 ||       cmpltu .l2     0, B6, B0
  74    [B0]  stw    .d1t1   A9, *A4++
  75 
  76         ;; return happens here
  77 ENDPROC(__c6xabi_strasgi)

/* [<][>][^][v][top][bottom][index][help] */