1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* NG4memset.S: Niagara-4 optimized memset/bzero.
4 * Copyright (C) 2012 David S. Miller (davem@davemloft.net)
9 .register %g2, #scratch
10 .register %g3, #scratch
26 .size NG4memset,.-NG4memset
37 brz,pt %g1, .Laligned8
39 1: stb %o4, [%o0 + 0x00]
44 cmp %o1, 64 + (64 - 8)
47 andcc %g1, (64 - 1), %g1
48 brz,pn %g1, .Laligned64
50 1: stx %o4, [%o0 + 0x00]
57 brnz,pn %o4, .Lnon_bzero_loop
59 1: stxa %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
61 stxa %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
67 membar #StoreStore|#StoreLoad
71 1: stx %o4, [%o0 + 0x00]
93 1: stxa %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
95 stxa %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
96 stxa %o4, [%o0 + %g3] ASI_BLK_INIT_QUAD_LDD_P
97 stxa %o4, [%o0 + %o5] ASI_BLK_INIT_QUAD_LDD_P
99 stxa %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
100 stxa %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
101 stxa %o4, [%o0 + %g3] ASI_BLK_INIT_QUAD_LDD_P
102 stxa %o4, [%o0 + %o5] ASI_BLK_INIT_QUAD_LDD_P
105 ba,a,pt %icc, .Lpostloop
107 .size NG4bzero,.-NG4bzero