Lines Matching +full:0 +full:- +full:7 +full:a +full:- +full:e
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * arch/alpha/lib/ev6-clear_user.S
4 * 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
8 * We have to make sure that $0 is always up-to-date and contains the
10 * a successful copy). There is also some rather minor exception setup
16 * ftp.digital.com/pub/Digital/info/semiconductor/literature/dsc-library.html
18 * E - either cluster
19 * U - upper subcluster; U0 - subcluster U0; U1 - subcluster U1
20 * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1
24 * a fair assumption that significant fractions of entire pages are zeroed, so
25 * it's going to be worth the effort to hand-unroll a big loop, and use wh64.
27 * The believed purpose of only updating $0 after a store is that a signal
29 * want to leave a hole (and we also want to avoid repeating lots of work)
36 .section __ex_table,"a"; \
37 .long 99b - .; \
38 lda $31, $exception-99b($31); \
47 .frame $30, 0, $26
48 .prologue 0
52 and $17, $17, $0
53 and $16, 7, $4 # .. E .. .. : find dest head misalignment
54 beq $0, $zerolength # U .. .. .. : U L U L
56 addq $0, $4, $1 # .. .. .. E : bias counter
57 and $1, 7, $2 # .. .. E .. : number of misaligned bytes in tail
58 # Note - we never actually use $2, so this is a moot computation
60 srl $1, 3, $1 # .. E .. .. : number of quadwords to clear
64 * Head is not aligned. Write (8 - $4) bytes to head of destination
67 EX( ldq_u $5, 0($16) ) # .. .. .. L : load dst word to mask back in
68 beq $1, $onebyte # .. .. U .. : sub-word store?
70 addq $16, 8, $16 # E .. .. .. : L U U L
72 EX( stq_u $5, -8($16) ) # .. .. .. L :
73 subq $1, 1, $1 # .. .. E .. :
74 addq $0, $4, $0 # .. E .. .. : bytes left -= 8 - misalignment
75 subq $0, 8, $0 # E .. .. .. : U L U L
79 * (The .align directive ought to be a moot point)
81 * $1 is number of quadwords to clear (zero is a valid value)
82 * $2 is number of trailing bytes (0..7) ($2 never used...)
83 * $16 is known to be aligned 0mod8
86 subq $1, 16, $4 # .. .. .. E : If < 16, we can not use the huge loop
87 and $16, 0x3f, $2 # .. .. E .. : Forward work for huge loop
88 subq $2, 0x40, $3 # .. E .. .. : bias counter (huge loop)
94 * Figure out how many quads we need to clear before we are 0mod64 aligned
98 nop # .. .. .. E
99 nop # .. .. E ..
100 nop # .. E .. ..
101 beq $3, $bigalign # U .. .. .. : U L U L : Aligned 0mod64
104 EX( stq_u $31, 0($16) ) # .. .. .. L
105 addq $3, 8, $3 # .. .. E ..
106 subq $0, 8, $0 # .. E .. ..
107 nop # E .. .. .. : U L U L
109 nop # .. .. .. E
110 subq $1, 1, $1 # .. .. E ..
111 addq $16, 8, $16 # .. E .. ..
116 * $0 is the number of bytes left
118 * $16 is aligned 0mod64
119 * we know that we'll be taking a minimum of one trip through
120 * CWG Section 3.7.6: do not expect a sustained store rate of > 1/cycle
121 * We are _not_ going to update $0 after every single store. That
122 * would be silly, because there will be cross-cluster dependencies
132 nop # E :
133 nop # E :
134 nop # E :
135 bis $16,$16,$3 # E : U L U L : Initial wh64 address is dest
140 subq $1, 16, $4 # .. .. E .. : Forward calculation - repeat the loop?
141 EX( stq_u $31, 0($16) ) # .. L .. ..
142 subq $0, 8, $0 # E .. .. .. : U L U L
144 addq $16, 128, $3 # E : Target address of wh64
147 subq $0, 16, $0 # E : U L L U
149 nop # E :
152 subq $0, 168, $5 # E : U L L U : two trips through the loop left?
153 /* 168 = 192 - 24, since we've already completed some stores */
155 subq $0, 16, $0 # E :
158 cmovlt $5, $16, $3 # E : U L L U : Latency 2, extra mapping cycle
160 subq $1, 8, $1 # E :
161 subq $0, 16, $0 # E :
163 nop # E : U L U L
165 nop # E :
166 subq $0, 8, $0 # E :
167 addq $16, 64, $16 # E :
174 nop # .. .. .. E
175 nop # .. .. E ..
176 nop # .. E .. ..
177 beq $1, $trailbytes # U .. .. .. : U L U L : Only 0..7 bytes to go
180 EX( stq_u $31, 0($16) ) # .. .. .. L
181 subq $1, 1, $1 # .. .. E ..
182 subq $0, 8, $0 # .. E .. ..
183 nop # E .. .. .. : U L U L
185 nop # .. .. .. E
186 nop # .. .. E ..
187 addq $16, 8, $16 # .. E .. ..
192 nop # .. .. .. E
193 nop # .. .. E ..
194 nop # .. E .. ..
195 beq $0, $zerolength # U .. .. .. : U L U L
197 # $0 contains the number of bytes left to copy (0..31)
198 # so we will use $0 as the loop counter
199 # We know for a fact that $0 > 0 zero due to previous context
201 EX( stb $31, 0($16) ) # .. .. .. L
202 subq $0, 1, $0 # .. .. E .. :
203 addq $16, 1, $16 # .. E .. .. :
204 bgt $0, $onebyte # U .. .. .. : U L U L
208 nop # .. .. .. E :
209 nop # .. .. E .. :
210 nop # .. E .. .. :