~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sparc/lib/GENmemcpy.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/sparc/lib/GENmemcpy.S (Version linux-6.12-rc7) and /arch/sparc/lib/GENmemcpy.S (Version linux-2.6.32.71)


  1 /* SPDX-License-Identifier: GPL-2.0 */         << 
  2 /* GENmemcpy.S: Generic sparc64 memcpy.             1 /* GENmemcpy.S: Generic sparc64 memcpy.
  3  *                                                  2  *
  4  * Copyright (C) 2007 David S. Miller (davem@d      3  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
  5  */                                                 4  */
  6                                                     5 
  7 #ifdef __KERNEL__                                   6 #ifdef __KERNEL__
  8 #include <linux/linkage.h>                     << 
  9 #define GLOBAL_SPARE    %g7                         7 #define GLOBAL_SPARE    %g7
 10 #else                                               8 #else
 11 #define GLOBAL_SPARE    %g5                         9 #define GLOBAL_SPARE    %g5
 12 #endif                                             10 #endif
 13                                                    11 
 14 #ifndef EX_LD                                      12 #ifndef EX_LD
 15 #define EX_LD(x,y)      x                      !!  13 #define EX_LD(x)        x
 16 #endif                                             14 #endif
 17                                                    15 
 18 #ifndef EX_ST                                      16 #ifndef EX_ST
 19 #define EX_ST(x,y)      x                      !!  17 #define EX_ST(x)        x
                                                   >>  18 #endif
                                                   >>  19 
                                                   >>  20 #ifndef EX_RETVAL
                                                   >>  21 #define EX_RETVAL(x)    x
 20 #endif                                             22 #endif
 21                                                    23 
 22 #ifndef LOAD                                       24 #ifndef LOAD
 23 #define LOAD(type,addr,dest)    type [addr], d     25 #define LOAD(type,addr,dest)    type [addr], dest
 24 #endif                                             26 #endif
 25                                                    27 
 26 #ifndef STORE                                      28 #ifndef STORE
 27 #define STORE(type,src,addr)    type src, [add     29 #define STORE(type,src,addr)    type src, [addr]
 28 #endif                                             30 #endif
 29                                                    31 
 30 #ifndef FUNC_NAME                                  32 #ifndef FUNC_NAME
 31 #define FUNC_NAME       GENmemcpy                  33 #define FUNC_NAME       GENmemcpy
 32 #endif                                             34 #endif
 33                                                    35 
 34 #ifndef PREAMBLE                                   36 #ifndef PREAMBLE
 35 #define PREAMBLE                                   37 #define PREAMBLE
 36 #endif                                             38 #endif
 37                                                    39 
 38 #ifndef XCC                                        40 #ifndef XCC
 39 #define XCC xcc                                    41 #define XCC xcc
 40 #endif                                             42 #endif
 41                                                    43 
 42         .register       %g2,#scratch               44         .register       %g2,#scratch
 43         .register       %g3,#scratch               45         .register       %g3,#scratch
 44                                                    46 
 45         .text                                      47         .text
 46                                                << 
 47 #ifndef EX_RETVAL                              << 
 48 #define EX_RETVAL(x)    x                      << 
 49 ENTRY(GEN_retl_o4_1)                           << 
 50         add     %o4, %o2, %o4                  << 
 51         retl                                   << 
 52          add    %o4, 1, %o0                    << 
 53 ENDPROC(GEN_retl_o4_1)                         << 
 54 ENTRY(GEN_retl_g1_8)                           << 
 55         add     %g1, %o2, %g1                  << 
 56         retl                                   << 
 57          add    %g1, 8, %o0                    << 
 58 ENDPROC(GEN_retl_g1_8)                         << 
 59 ENTRY(GEN_retl_o2_4)                           << 
 60         retl                                   << 
 61          add    %o2, 4, %o0                    << 
 62 ENDPROC(GEN_retl_o2_4)                         << 
 63 ENTRY(GEN_retl_o2_1)                           << 
 64         retl                                   << 
 65          add    %o2, 1, %o0                    << 
 66 ENDPROC(GEN_retl_o2_1)                         << 
 67 #endif                                         << 
 68                                                << 
 69         .align          64                         48         .align          64
 70                                                    49 
 71         .globl  FUNC_NAME                          50         .globl  FUNC_NAME
 72         .type   FUNC_NAME,#function                51         .type   FUNC_NAME,#function
 73 FUNC_NAME:      /* %o0=dst, %o1=src, %o2=len *     52 FUNC_NAME:      /* %o0=dst, %o1=src, %o2=len */
 74         srlx            %o2, 31, %g2               53         srlx            %o2, 31, %g2
 75         cmp             %g2, 0                     54         cmp             %g2, 0
 76         tne             %XCC, 5                    55         tne             %XCC, 5
 77         PREAMBLE                                   56         PREAMBLE
 78         mov             %o0, GLOBAL_SPARE          57         mov             %o0, GLOBAL_SPARE
 79                                                    58 
 80         cmp             %o2, 0                     59         cmp             %o2, 0
 81         be,pn           %XCC, 85f                  60         be,pn           %XCC, 85f
 82          or             %o0, %o1, %o3              61          or             %o0, %o1, %o3
 83         cmp             %o2, 16                    62         cmp             %o2, 16
 84         blu,a,pn        %XCC, 80f                  63         blu,a,pn        %XCC, 80f
 85          or             %o3, %o2, %o3              64          or             %o3, %o2, %o3
 86                                                    65 
 87         xor             %o0, %o1, %o4              66         xor             %o0, %o1, %o4
 88         andcc           %o4, 0x7, %g0              67         andcc           %o4, 0x7, %g0
 89         bne,a,pn        %XCC, 90f                  68         bne,a,pn        %XCC, 90f
 90          sub            %o0, %o1, %o3              69          sub            %o0, %o1, %o3
 91                                                    70 
 92         and             %o0, 0x7, %o4              71         and             %o0, 0x7, %o4
 93         sub             %o4, 0x8, %o4              72         sub             %o4, 0x8, %o4
 94         sub             %g0, %o4, %o4              73         sub             %g0, %o4, %o4
 95         sub             %o2, %o4, %o2              74         sub             %o2, %o4, %o2
 96 1:      subcc           %o4, 1, %o4                75 1:      subcc           %o4, 1, %o4
 97         EX_LD(LOAD(ldub, %o1, %g1),GEN_retl_o4 !!  76         EX_LD(LOAD(ldub, %o1, %g1))
 98         EX_ST(STORE(stb, %g1, %o0),GEN_retl_o4 !!  77         EX_ST(STORE(stb, %g1, %o0))
 99         add             %o1, 1, %o1                78         add             %o1, 1, %o1
100         bne,pt          %XCC, 1b                   79         bne,pt          %XCC, 1b
101         add             %o0, 1, %o0                80         add             %o0, 1, %o0
102                                                    81 
103         andn            %o2, 0x7, %g1              82         andn            %o2, 0x7, %g1
104         sub             %o2, %g1, %o2              83         sub             %o2, %g1, %o2
105 1:      subcc           %g1, 0x8, %g1              84 1:      subcc           %g1, 0x8, %g1
106         EX_LD(LOAD(ldx, %o1, %g2),GEN_retl_g1_ !!  85         EX_LD(LOAD(ldx, %o1, %g2))
107         EX_ST(STORE(stx, %g2, %o0),GEN_retl_g1 !!  86         EX_ST(STORE(stx, %g2, %o0))
108         add             %o1, 0x8, %o1              87         add             %o1, 0x8, %o1
109         bne,pt          %XCC, 1b                   88         bne,pt          %XCC, 1b
110          add            %o0, 0x8, %o0              89          add            %o0, 0x8, %o0
111                                                    90 
112         brz,pt          %o2, 85f                   91         brz,pt          %o2, 85f
113          sub            %o0, %o1, %o3              92          sub            %o0, %o1, %o3
114         ba,a,pt         %XCC, 90f                  93         ba,a,pt         %XCC, 90f
115                                                    94 
116         .align          64                         95         .align          64
117 80: /* 0 < len <= 16 */                            96 80: /* 0 < len <= 16 */
118         andcc           %o3, 0x3, %g0              97         andcc           %o3, 0x3, %g0
119         bne,pn          %XCC, 90f                  98         bne,pn          %XCC, 90f
120          sub            %o0, %o1, %o3              99          sub            %o0, %o1, %o3
121                                                   100 
122 1:                                                101 1:
123         subcc           %o2, 4, %o2               102         subcc           %o2, 4, %o2
124         EX_LD(LOAD(lduw, %o1, %g1),GEN_retl_o2 !! 103         EX_LD(LOAD(lduw, %o1, %g1))
125         EX_ST(STORE(stw, %g1, %o1 + %o3),GEN_r !! 104         EX_ST(STORE(stw, %g1, %o1 + %o3))
126         bgu,pt          %XCC, 1b                  105         bgu,pt          %XCC, 1b
127          add            %o1, 4, %o1               106          add            %o1, 4, %o1
128                                                   107 
129 85:     retl                                      108 85:     retl
130          mov            EX_RETVAL(GLOBAL_SPARE    109          mov            EX_RETVAL(GLOBAL_SPARE), %o0
131                                                   110 
132         .align          32                        111         .align          32
133 90:                                               112 90:
134         subcc           %o2, 1, %o2               113         subcc           %o2, 1, %o2
135         EX_LD(LOAD(ldub, %o1, %g1),GEN_retl_o2 !! 114         EX_LD(LOAD(ldub, %o1, %g1))
136         EX_ST(STORE(stb, %g1, %o1 + %o3),GEN_r !! 115         EX_ST(STORE(stb, %g1, %o1 + %o3))
137         bgu,pt          %XCC, 90b                 116         bgu,pt          %XCC, 90b
138          add            %o1, 1, %o1               117          add            %o1, 1, %o1
139         retl                                      118         retl
140          mov            EX_RETVAL(GLOBAL_SPARE    119          mov            EX_RETVAL(GLOBAL_SPARE), %o0
141                                                   120 
142         .size           FUNC_NAME, .-FUNC_NAME    121         .size           FUNC_NAME, .-FUNC_NAME
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php