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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/sparc/lib/NG4memset.S (Version linux-6.11.5) and /arch/sparc/lib/NG4memset.S (Version linux-4.4.302)


  1 /* SPDX-License-Identifier: GPL-2.0 */         << 
  2 /* NG4memset.S: Niagara-4 optimized memset/bze      1 /* NG4memset.S: Niagara-4 optimized memset/bzero.
  3  *                                                  2  *
  4  * Copyright (C) 2012 David S. Miller (davem@d      3  * Copyright (C) 2012 David S. Miller (davem@davemloft.net)
  5  */                                                 4  */
  6                                                     5 
  7 #include <asm/asi.h>                                6 #include <asm/asi.h>
  8                                                     7 
  9         .register       %g2, #scratch               8         .register       %g2, #scratch
 10         .register       %g3, #scratch               9         .register       %g3, #scratch
 11                                                    10 
 12         .text                                      11         .text
 13         .align          32                         12         .align          32
 14         .globl          NG4memset                  13         .globl          NG4memset
 15 NG4memset:                                         14 NG4memset:
 16         andcc           %o1, 0xff, %o4             15         andcc           %o1, 0xff, %o4
 17         be,pt           %icc, 1f                   16         be,pt           %icc, 1f
 18          mov            %o2, %o1                   17          mov            %o2, %o1
 19         sllx            %o4, 8, %g1                18         sllx            %o4, 8, %g1
 20         or              %g1, %o4, %o2              19         or              %g1, %o4, %o2
 21         sllx            %o2, 16, %g1               20         sllx            %o2, 16, %g1
 22         or              %g1, %o2, %o2              21         or              %g1, %o2, %o2
 23         sllx            %o2, 32, %g1               22         sllx            %o2, 32, %g1
 24         ba,pt           %icc, 1f                   23         ba,pt           %icc, 1f
 25          or             %g1, %o2, %o4              24          or             %g1, %o2, %o4
 26         .size           NG4memset,.-NG4memset      25         .size           NG4memset,.-NG4memset
 27                                                    26 
 28         .align          32                         27         .align          32
 29         .globl          NG4bzero                   28         .globl          NG4bzero
 30 NG4bzero:                                          29 NG4bzero:
 31         clr             %o4                        30         clr             %o4
 32 1:      cmp             %o1, 16                    31 1:      cmp             %o1, 16
 33         ble             %icc, .Ltiny               32         ble             %icc, .Ltiny
 34          mov            %o0, %o3                   33          mov            %o0, %o3
 35         sub             %g0, %o0, %g1              34         sub             %g0, %o0, %g1
 36         and             %g1, 0x7, %g1              35         and             %g1, 0x7, %g1
 37         brz,pt          %g1, .Laligned8            36         brz,pt          %g1, .Laligned8
 38          sub            %o1, %g1, %o1              37          sub            %o1, %g1, %o1
 39 1:      stb             %o4, [%o0 + 0x00]          38 1:      stb             %o4, [%o0 + 0x00]
 40         subcc           %g1, 1, %g1                39         subcc           %g1, 1, %g1
 41         bne,pt          %icc, 1b                   40         bne,pt          %icc, 1b
 42          add            %o0, 1, %o0                41          add            %o0, 1, %o0
 43 .Laligned8:                                        42 .Laligned8:
 44         cmp             %o1, 64 + (64 - 8)         43         cmp             %o1, 64 + (64 - 8)
 45         ble             .Lmedium                   44         ble             .Lmedium
 46          sub            %g0, %o0, %g1              45          sub            %g0, %o0, %g1
 47         andcc           %g1, (64 - 1), %g1         46         andcc           %g1, (64 - 1), %g1
 48         brz,pn          %g1, .Laligned64           47         brz,pn          %g1, .Laligned64
 49          sub            %o1, %g1, %o1              48          sub            %o1, %g1, %o1
 50 1:      stx             %o4, [%o0 + 0x00]          49 1:      stx             %o4, [%o0 + 0x00]
 51         subcc           %g1, 8, %g1                50         subcc           %g1, 8, %g1
 52         bne,pt          %icc, 1b                   51         bne,pt          %icc, 1b
 53          add            %o0, 0x8, %o0              52          add            %o0, 0x8, %o0
 54 .Laligned64:                                       53 .Laligned64:
 55         andn            %o1, 64 - 1, %g1           54         andn            %o1, 64 - 1, %g1
 56         sub             %o1, %g1, %o1              55         sub             %o1, %g1, %o1
 57         brnz,pn         %o4, .Lnon_bzero_loop      56         brnz,pn         %o4, .Lnon_bzero_loop
 58          mov            0x20, %g2                  57          mov            0x20, %g2
 59 1:      stxa            %o4, [%o0 + %g0] ASI_B     58 1:      stxa            %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
 60         subcc           %g1, 0x40, %g1             59         subcc           %g1, 0x40, %g1
 61         stxa            %o4, [%o0 + %g2] ASI_B     60         stxa            %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
 62         bne,pt          %icc, 1b                   61         bne,pt          %icc, 1b
 63          add            %o0, 0x40, %o0             62          add            %o0, 0x40, %o0
 64 .Lpostloop:                                        63 .Lpostloop:
 65         cmp             %o1, 8                     64         cmp             %o1, 8
 66         bl,pn           %icc, .Ltiny               65         bl,pn           %icc, .Ltiny
 67          membar         #StoreStore|#StoreLoad     66          membar         #StoreStore|#StoreLoad
 68 .Lmedium:                                          67 .Lmedium:
 69         andn            %o1, 0x7, %g1              68         andn            %o1, 0x7, %g1
 70         sub             %o1, %g1, %o1              69         sub             %o1, %g1, %o1
 71 1:      stx             %o4, [%o0 + 0x00]          70 1:      stx             %o4, [%o0 + 0x00]
 72         subcc           %g1, 0x8, %g1              71         subcc           %g1, 0x8, %g1
 73         bne,pt          %icc, 1b                   72         bne,pt          %icc, 1b
 74          add            %o0, 0x08, %o0             73          add            %o0, 0x08, %o0
 75         andcc           %o1, 0x4, %g1              74         andcc           %o1, 0x4, %g1
 76         be,pt           %icc, .Ltiny               75         be,pt           %icc, .Ltiny
 77          sub            %o1, %g1, %o1              76          sub            %o1, %g1, %o1
 78         stw             %o4, [%o0 + 0x00]          77         stw             %o4, [%o0 + 0x00]
 79         add             %o0, 0x4, %o0              78         add             %o0, 0x4, %o0
 80 .Ltiny:                                            79 .Ltiny:
 81         cmp             %o1, 0                     80         cmp             %o1, 0
 82         be,pn           %icc, .Lexit               81         be,pn           %icc, .Lexit
 83 1:       subcc          %o1, 1, %o1                82 1:       subcc          %o1, 1, %o1
 84         stb             %o4, [%o0 + 0x00]          83         stb             %o4, [%o0 + 0x00]
 85         bne,pt          %icc, 1b                   84         bne,pt          %icc, 1b
 86          add            %o0, 1, %o0                85          add            %o0, 1, %o0
 87 .Lexit:                                            86 .Lexit:
 88         retl                                       87         retl
 89          mov            %o3, %o0                   88          mov            %o3, %o0
 90 .Lnon_bzero_loop:                                  89 .Lnon_bzero_loop:
 91         mov             0x08, %g3                  90         mov             0x08, %g3
 92         mov             0x28, %o5                  91         mov             0x28, %o5
 93 1:      stxa            %o4, [%o0 + %g0] ASI_B     92 1:      stxa            %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
 94         subcc           %g1, 0x40, %g1             93         subcc           %g1, 0x40, %g1
 95         stxa            %o4, [%o0 + %g2] ASI_B     94         stxa            %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
 96         stxa            %o4, [%o0 + %g3] ASI_B     95         stxa            %o4, [%o0 + %g3] ASI_BLK_INIT_QUAD_LDD_P
 97         stxa            %o4, [%o0 + %o5] ASI_B     96         stxa            %o4, [%o0 + %o5] ASI_BLK_INIT_QUAD_LDD_P
 98         add             %o0, 0x10, %o0             97         add             %o0, 0x10, %o0
 99         stxa            %o4, [%o0 + %g0] ASI_B     98         stxa            %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
100         stxa            %o4, [%o0 + %g2] ASI_B     99         stxa            %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
101         stxa            %o4, [%o0 + %g3] ASI_B    100         stxa            %o4, [%o0 + %g3] ASI_BLK_INIT_QUAD_LDD_P
102         stxa            %o4, [%o0 + %o5] ASI_B    101         stxa            %o4, [%o0 + %o5] ASI_BLK_INIT_QUAD_LDD_P
103         bne,pt          %icc, 1b                  102         bne,pt          %icc, 1b
104          add            %o0, 0x30, %o0            103          add            %o0, 0x30, %o0
105         ba,a,pt         %icc, .Lpostloop          104         ba,a,pt         %icc, .Lpostloop
106          nop                                   << 
107         .size           NG4bzero,.-NG4bzero       105         .size           NG4bzero,.-NG4bzero
                                                      

~ [ 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