bzero.S (e5451c8f8330e03ad3cfa16048b4daf961af434f) bzero.S (d3867f0483103b8ff7edfdea3ef1981c03d96891)
1/* bzero.S: Simple prefetching memset, bzero, and clear_user
2 * implementations.
3 *
4 * Copyright (C) 2005 David S. Miller <davem@davemloft.net>
5 */
6
7#include <linux/linkage.h>
1/* bzero.S: Simple prefetching memset, bzero, and clear_user
2 * implementations.
3 *
4 * Copyright (C) 2005 David S. Miller <davem@davemloft.net>
5 */
6
7#include <linux/linkage.h>
8#include <asm/export.h>
8
9 .text
10
11ENTRY(memset) /* %o0=buf, %o1=pat, %o2=len */
12 and %o1, 0xff, %o3
13 mov %o2, %o1
14 sllx %o3, 8, %g1
15 or %g1, %o3, %o2

--- 57 unchanged lines hidden (view full) ---

73 subcc %o1, 1, %o1
74 bne,pt %icc, 1b
75 add %o0, 1, %o0
76__bzero_done:
77 retl
78 mov %o3, %o0
79ENDPROC(__bzero)
80ENDPROC(memset)
9
10 .text
11
12ENTRY(memset) /* %o0=buf, %o1=pat, %o2=len */
13 and %o1, 0xff, %o3
14 mov %o2, %o1
15 sllx %o3, 8, %g1
16 or %g1, %o3, %o2

--- 57 unchanged lines hidden (view full) ---

74 subcc %o1, 1, %o1
75 bne,pt %icc, 1b
76 add %o0, 1, %o0
77__bzero_done:
78 retl
79 mov %o3, %o0
80ENDPROC(__bzero)
81ENDPROC(memset)
82EXPORT_SYMBOL(__bzero)
83EXPORT_SYMBOL(memset)
81
82#define EX_ST(x,y) \
8398: x,y; \
84 .section __ex_table,"a";\
85 .align 4; \
86 .word 98b, __retl_o1; \
87 .text; \
88 .align 4;

--- 49 unchanged lines hidden (view full) ---

1381: EX_ST(stba %g0, [%o0 + 0x00] %asi)
139 subcc %o1, 1, %o1
140 bne,pt %icc, 1b
141 add %o0, 1, %o0
142__clear_user_done:
143 retl
144 clr %o0
145ENDPROC(__clear_user)
84
85#define EX_ST(x,y) \
8698: x,y; \
87 .section __ex_table,"a";\
88 .align 4; \
89 .word 98b, __retl_o1; \
90 .text; \
91 .align 4;

--- 49 unchanged lines hidden (view full) ---

1411: EX_ST(stba %g0, [%o0 + 0x00] %asi)
142 subcc %o1, 1, %o1
143 bne,pt %icc, 1b
144 add %o0, 1, %o0
145__clear_user_done:
146 retl
147 clr %o0
148ENDPROC(__clear_user)
149EXPORT_SYMBOL(__clear_user)