1
2
3 package ssa
4
5 import "cmd/compile/internal/types"
6
7 func rewriteValueMIPS64(v *Value) bool {
8 switch v.Op {
9 case OpAbs:
10 v.Op = OpMIPS64ABSD
11 return true
12 case OpAdd16:
13 v.Op = OpMIPS64ADDV
14 return true
15 case OpAdd32:
16 v.Op = OpMIPS64ADDV
17 return true
18 case OpAdd32F:
19 v.Op = OpMIPS64ADDF
20 return true
21 case OpAdd64:
22 v.Op = OpMIPS64ADDV
23 return true
24 case OpAdd64F:
25 v.Op = OpMIPS64ADDD
26 return true
27 case OpAdd8:
28 v.Op = OpMIPS64ADDV
29 return true
30 case OpAddPtr:
31 v.Op = OpMIPS64ADDV
32 return true
33 case OpAddr:
34 return rewriteValueMIPS64_OpAddr(v)
35 case OpAnd16:
36 v.Op = OpMIPS64AND
37 return true
38 case OpAnd32:
39 v.Op = OpMIPS64AND
40 return true
41 case OpAnd64:
42 v.Op = OpMIPS64AND
43 return true
44 case OpAnd8:
45 v.Op = OpMIPS64AND
46 return true
47 case OpAndB:
48 v.Op = OpMIPS64AND
49 return true
50 case OpAtomicAdd32:
51 v.Op = OpMIPS64LoweredAtomicAdd32
52 return true
53 case OpAtomicAdd64:
54 v.Op = OpMIPS64LoweredAtomicAdd64
55 return true
56 case OpAtomicAnd32:
57 v.Op = OpMIPS64LoweredAtomicAnd32
58 return true
59 case OpAtomicAnd8:
60 return rewriteValueMIPS64_OpAtomicAnd8(v)
61 case OpAtomicCompareAndSwap32:
62 return rewriteValueMIPS64_OpAtomicCompareAndSwap32(v)
63 case OpAtomicCompareAndSwap64:
64 v.Op = OpMIPS64LoweredAtomicCas64
65 return true
66 case OpAtomicExchange32:
67 v.Op = OpMIPS64LoweredAtomicExchange32
68 return true
69 case OpAtomicExchange64:
70 v.Op = OpMIPS64LoweredAtomicExchange64
71 return true
72 case OpAtomicLoad32:
73 v.Op = OpMIPS64LoweredAtomicLoad32
74 return true
75 case OpAtomicLoad64:
76 v.Op = OpMIPS64LoweredAtomicLoad64
77 return true
78 case OpAtomicLoad8:
79 v.Op = OpMIPS64LoweredAtomicLoad8
80 return true
81 case OpAtomicLoadPtr:
82 v.Op = OpMIPS64LoweredAtomicLoad64
83 return true
84 case OpAtomicOr32:
85 v.Op = OpMIPS64LoweredAtomicOr32
86 return true
87 case OpAtomicOr8:
88 return rewriteValueMIPS64_OpAtomicOr8(v)
89 case OpAtomicStore32:
90 v.Op = OpMIPS64LoweredAtomicStore32
91 return true
92 case OpAtomicStore64:
93 v.Op = OpMIPS64LoweredAtomicStore64
94 return true
95 case OpAtomicStore8:
96 v.Op = OpMIPS64LoweredAtomicStore8
97 return true
98 case OpAtomicStorePtrNoWB:
99 v.Op = OpMIPS64LoweredAtomicStore64
100 return true
101 case OpAvg64u:
102 return rewriteValueMIPS64_OpAvg64u(v)
103 case OpClosureCall:
104 v.Op = OpMIPS64CALLclosure
105 return true
106 case OpCom16:
107 return rewriteValueMIPS64_OpCom16(v)
108 case OpCom32:
109 return rewriteValueMIPS64_OpCom32(v)
110 case OpCom64:
111 return rewriteValueMIPS64_OpCom64(v)
112 case OpCom8:
113 return rewriteValueMIPS64_OpCom8(v)
114 case OpConst16:
115 return rewriteValueMIPS64_OpConst16(v)
116 case OpConst32:
117 return rewriteValueMIPS64_OpConst32(v)
118 case OpConst32F:
119 return rewriteValueMIPS64_OpConst32F(v)
120 case OpConst64:
121 return rewriteValueMIPS64_OpConst64(v)
122 case OpConst64F:
123 return rewriteValueMIPS64_OpConst64F(v)
124 case OpConst8:
125 return rewriteValueMIPS64_OpConst8(v)
126 case OpConstBool:
127 return rewriteValueMIPS64_OpConstBool(v)
128 case OpConstNil:
129 return rewriteValueMIPS64_OpConstNil(v)
130 case OpCvt32Fto32:
131 v.Op = OpMIPS64TRUNCFW
132 return true
133 case OpCvt32Fto64:
134 v.Op = OpMIPS64TRUNCFV
135 return true
136 case OpCvt32Fto64F:
137 v.Op = OpMIPS64MOVFD
138 return true
139 case OpCvt32to32F:
140 v.Op = OpMIPS64MOVWF
141 return true
142 case OpCvt32to64F:
143 v.Op = OpMIPS64MOVWD
144 return true
145 case OpCvt64Fto32:
146 v.Op = OpMIPS64TRUNCDW
147 return true
148 case OpCvt64Fto32F:
149 v.Op = OpMIPS64MOVDF
150 return true
151 case OpCvt64Fto64:
152 v.Op = OpMIPS64TRUNCDV
153 return true
154 case OpCvt64to32F:
155 v.Op = OpMIPS64MOVVF
156 return true
157 case OpCvt64to64F:
158 v.Op = OpMIPS64MOVVD
159 return true
160 case OpCvtBoolToUint8:
161 v.Op = OpCopy
162 return true
163 case OpDiv16:
164 return rewriteValueMIPS64_OpDiv16(v)
165 case OpDiv16u:
166 return rewriteValueMIPS64_OpDiv16u(v)
167 case OpDiv32:
168 return rewriteValueMIPS64_OpDiv32(v)
169 case OpDiv32F:
170 v.Op = OpMIPS64DIVF
171 return true
172 case OpDiv32u:
173 return rewriteValueMIPS64_OpDiv32u(v)
174 case OpDiv64:
175 return rewriteValueMIPS64_OpDiv64(v)
176 case OpDiv64F:
177 v.Op = OpMIPS64DIVD
178 return true
179 case OpDiv64u:
180 return rewriteValueMIPS64_OpDiv64u(v)
181 case OpDiv8:
182 return rewriteValueMIPS64_OpDiv8(v)
183 case OpDiv8u:
184 return rewriteValueMIPS64_OpDiv8u(v)
185 case OpEq16:
186 return rewriteValueMIPS64_OpEq16(v)
187 case OpEq32:
188 return rewriteValueMIPS64_OpEq32(v)
189 case OpEq32F:
190 return rewriteValueMIPS64_OpEq32F(v)
191 case OpEq64:
192 return rewriteValueMIPS64_OpEq64(v)
193 case OpEq64F:
194 return rewriteValueMIPS64_OpEq64F(v)
195 case OpEq8:
196 return rewriteValueMIPS64_OpEq8(v)
197 case OpEqB:
198 return rewriteValueMIPS64_OpEqB(v)
199 case OpEqPtr:
200 return rewriteValueMIPS64_OpEqPtr(v)
201 case OpGetCallerPC:
202 v.Op = OpMIPS64LoweredGetCallerPC
203 return true
204 case OpGetCallerSP:
205 v.Op = OpMIPS64LoweredGetCallerSP
206 return true
207 case OpGetClosurePtr:
208 v.Op = OpMIPS64LoweredGetClosurePtr
209 return true
210 case OpHmul32:
211 return rewriteValueMIPS64_OpHmul32(v)
212 case OpHmul32u:
213 return rewriteValueMIPS64_OpHmul32u(v)
214 case OpHmul64:
215 return rewriteValueMIPS64_OpHmul64(v)
216 case OpHmul64u:
217 return rewriteValueMIPS64_OpHmul64u(v)
218 case OpInterCall:
219 v.Op = OpMIPS64CALLinter
220 return true
221 case OpIsInBounds:
222 return rewriteValueMIPS64_OpIsInBounds(v)
223 case OpIsNonNil:
224 return rewriteValueMIPS64_OpIsNonNil(v)
225 case OpIsSliceInBounds:
226 return rewriteValueMIPS64_OpIsSliceInBounds(v)
227 case OpLeq16:
228 return rewriteValueMIPS64_OpLeq16(v)
229 case OpLeq16U:
230 return rewriteValueMIPS64_OpLeq16U(v)
231 case OpLeq32:
232 return rewriteValueMIPS64_OpLeq32(v)
233 case OpLeq32F:
234 return rewriteValueMIPS64_OpLeq32F(v)
235 case OpLeq32U:
236 return rewriteValueMIPS64_OpLeq32U(v)
237 case OpLeq64:
238 return rewriteValueMIPS64_OpLeq64(v)
239 case OpLeq64F:
240 return rewriteValueMIPS64_OpLeq64F(v)
241 case OpLeq64U:
242 return rewriteValueMIPS64_OpLeq64U(v)
243 case OpLeq8:
244 return rewriteValueMIPS64_OpLeq8(v)
245 case OpLeq8U:
246 return rewriteValueMIPS64_OpLeq8U(v)
247 case OpLess16:
248 return rewriteValueMIPS64_OpLess16(v)
249 case OpLess16U:
250 return rewriteValueMIPS64_OpLess16U(v)
251 case OpLess32:
252 return rewriteValueMIPS64_OpLess32(v)
253 case OpLess32F:
254 return rewriteValueMIPS64_OpLess32F(v)
255 case OpLess32U:
256 return rewriteValueMIPS64_OpLess32U(v)
257 case OpLess64:
258 return rewriteValueMIPS64_OpLess64(v)
259 case OpLess64F:
260 return rewriteValueMIPS64_OpLess64F(v)
261 case OpLess64U:
262 return rewriteValueMIPS64_OpLess64U(v)
263 case OpLess8:
264 return rewriteValueMIPS64_OpLess8(v)
265 case OpLess8U:
266 return rewriteValueMIPS64_OpLess8U(v)
267 case OpLoad:
268 return rewriteValueMIPS64_OpLoad(v)
269 case OpLocalAddr:
270 return rewriteValueMIPS64_OpLocalAddr(v)
271 case OpLsh16x16:
272 return rewriteValueMIPS64_OpLsh16x16(v)
273 case OpLsh16x32:
274 return rewriteValueMIPS64_OpLsh16x32(v)
275 case OpLsh16x64:
276 return rewriteValueMIPS64_OpLsh16x64(v)
277 case OpLsh16x8:
278 return rewriteValueMIPS64_OpLsh16x8(v)
279 case OpLsh32x16:
280 return rewriteValueMIPS64_OpLsh32x16(v)
281 case OpLsh32x32:
282 return rewriteValueMIPS64_OpLsh32x32(v)
283 case OpLsh32x64:
284 return rewriteValueMIPS64_OpLsh32x64(v)
285 case OpLsh32x8:
286 return rewriteValueMIPS64_OpLsh32x8(v)
287 case OpLsh64x16:
288 return rewriteValueMIPS64_OpLsh64x16(v)
289 case OpLsh64x32:
290 return rewriteValueMIPS64_OpLsh64x32(v)
291 case OpLsh64x64:
292 return rewriteValueMIPS64_OpLsh64x64(v)
293 case OpLsh64x8:
294 return rewriteValueMIPS64_OpLsh64x8(v)
295 case OpLsh8x16:
296 return rewriteValueMIPS64_OpLsh8x16(v)
297 case OpLsh8x32:
298 return rewriteValueMIPS64_OpLsh8x32(v)
299 case OpLsh8x64:
300 return rewriteValueMIPS64_OpLsh8x64(v)
301 case OpLsh8x8:
302 return rewriteValueMIPS64_OpLsh8x8(v)
303 case OpMIPS64ADDV:
304 return rewriteValueMIPS64_OpMIPS64ADDV(v)
305 case OpMIPS64ADDVconst:
306 return rewriteValueMIPS64_OpMIPS64ADDVconst(v)
307 case OpMIPS64AND:
308 return rewriteValueMIPS64_OpMIPS64AND(v)
309 case OpMIPS64ANDconst:
310 return rewriteValueMIPS64_OpMIPS64ANDconst(v)
311 case OpMIPS64LoweredAtomicAdd32:
312 return rewriteValueMIPS64_OpMIPS64LoweredAtomicAdd32(v)
313 case OpMIPS64LoweredAtomicAdd64:
314 return rewriteValueMIPS64_OpMIPS64LoweredAtomicAdd64(v)
315 case OpMIPS64LoweredAtomicStore32:
316 return rewriteValueMIPS64_OpMIPS64LoweredAtomicStore32(v)
317 case OpMIPS64LoweredAtomicStore64:
318 return rewriteValueMIPS64_OpMIPS64LoweredAtomicStore64(v)
319 case OpMIPS64LoweredPanicBoundsCR:
320 return rewriteValueMIPS64_OpMIPS64LoweredPanicBoundsCR(v)
321 case OpMIPS64LoweredPanicBoundsRC:
322 return rewriteValueMIPS64_OpMIPS64LoweredPanicBoundsRC(v)
323 case OpMIPS64LoweredPanicBoundsRR:
324 return rewriteValueMIPS64_OpMIPS64LoweredPanicBoundsRR(v)
325 case OpMIPS64MOVBUload:
326 return rewriteValueMIPS64_OpMIPS64MOVBUload(v)
327 case OpMIPS64MOVBUreg:
328 return rewriteValueMIPS64_OpMIPS64MOVBUreg(v)
329 case OpMIPS64MOVBload:
330 return rewriteValueMIPS64_OpMIPS64MOVBload(v)
331 case OpMIPS64MOVBreg:
332 return rewriteValueMIPS64_OpMIPS64MOVBreg(v)
333 case OpMIPS64MOVBstore:
334 return rewriteValueMIPS64_OpMIPS64MOVBstore(v)
335 case OpMIPS64MOVDF:
336 return rewriteValueMIPS64_OpMIPS64MOVDF(v)
337 case OpMIPS64MOVDload:
338 return rewriteValueMIPS64_OpMIPS64MOVDload(v)
339 case OpMIPS64MOVDstore:
340 return rewriteValueMIPS64_OpMIPS64MOVDstore(v)
341 case OpMIPS64MOVFload:
342 return rewriteValueMIPS64_OpMIPS64MOVFload(v)
343 case OpMIPS64MOVFstore:
344 return rewriteValueMIPS64_OpMIPS64MOVFstore(v)
345 case OpMIPS64MOVHUload:
346 return rewriteValueMIPS64_OpMIPS64MOVHUload(v)
347 case OpMIPS64MOVHUreg:
348 return rewriteValueMIPS64_OpMIPS64MOVHUreg(v)
349 case OpMIPS64MOVHload:
350 return rewriteValueMIPS64_OpMIPS64MOVHload(v)
351 case OpMIPS64MOVHreg:
352 return rewriteValueMIPS64_OpMIPS64MOVHreg(v)
353 case OpMIPS64MOVHstore:
354 return rewriteValueMIPS64_OpMIPS64MOVHstore(v)
355 case OpMIPS64MOVVload:
356 return rewriteValueMIPS64_OpMIPS64MOVVload(v)
357 case OpMIPS64MOVVnop:
358 return rewriteValueMIPS64_OpMIPS64MOVVnop(v)
359 case OpMIPS64MOVVreg:
360 return rewriteValueMIPS64_OpMIPS64MOVVreg(v)
361 case OpMIPS64MOVVstore:
362 return rewriteValueMIPS64_OpMIPS64MOVVstore(v)
363 case OpMIPS64MOVWUload:
364 return rewriteValueMIPS64_OpMIPS64MOVWUload(v)
365 case OpMIPS64MOVWUreg:
366 return rewriteValueMIPS64_OpMIPS64MOVWUreg(v)
367 case OpMIPS64MOVWload:
368 return rewriteValueMIPS64_OpMIPS64MOVWload(v)
369 case OpMIPS64MOVWreg:
370 return rewriteValueMIPS64_OpMIPS64MOVWreg(v)
371 case OpMIPS64MOVWstore:
372 return rewriteValueMIPS64_OpMIPS64MOVWstore(v)
373 case OpMIPS64NEGV:
374 return rewriteValueMIPS64_OpMIPS64NEGV(v)
375 case OpMIPS64OR:
376 return rewriteValueMIPS64_OpMIPS64OR(v)
377 case OpMIPS64ORconst:
378 return rewriteValueMIPS64_OpMIPS64ORconst(v)
379 case OpMIPS64SGT:
380 return rewriteValueMIPS64_OpMIPS64SGT(v)
381 case OpMIPS64SGTU:
382 return rewriteValueMIPS64_OpMIPS64SGTU(v)
383 case OpMIPS64SGTUconst:
384 return rewriteValueMIPS64_OpMIPS64SGTUconst(v)
385 case OpMIPS64SGTconst:
386 return rewriteValueMIPS64_OpMIPS64SGTconst(v)
387 case OpMIPS64SLLV:
388 return rewriteValueMIPS64_OpMIPS64SLLV(v)
389 case OpMIPS64SLLVconst:
390 return rewriteValueMIPS64_OpMIPS64SLLVconst(v)
391 case OpMIPS64SRAV:
392 return rewriteValueMIPS64_OpMIPS64SRAV(v)
393 case OpMIPS64SRAVconst:
394 return rewriteValueMIPS64_OpMIPS64SRAVconst(v)
395 case OpMIPS64SRLV:
396 return rewriteValueMIPS64_OpMIPS64SRLV(v)
397 case OpMIPS64SRLVconst:
398 return rewriteValueMIPS64_OpMIPS64SRLVconst(v)
399 case OpMIPS64SUBV:
400 return rewriteValueMIPS64_OpMIPS64SUBV(v)
401 case OpMIPS64SUBVconst:
402 return rewriteValueMIPS64_OpMIPS64SUBVconst(v)
403 case OpMIPS64XOR:
404 return rewriteValueMIPS64_OpMIPS64XOR(v)
405 case OpMIPS64XORconst:
406 return rewriteValueMIPS64_OpMIPS64XORconst(v)
407 case OpMod16:
408 return rewriteValueMIPS64_OpMod16(v)
409 case OpMod16u:
410 return rewriteValueMIPS64_OpMod16u(v)
411 case OpMod32:
412 return rewriteValueMIPS64_OpMod32(v)
413 case OpMod32u:
414 return rewriteValueMIPS64_OpMod32u(v)
415 case OpMod64:
416 return rewriteValueMIPS64_OpMod64(v)
417 case OpMod64u:
418 return rewriteValueMIPS64_OpMod64u(v)
419 case OpMod8:
420 return rewriteValueMIPS64_OpMod8(v)
421 case OpMod8u:
422 return rewriteValueMIPS64_OpMod8u(v)
423 case OpMove:
424 return rewriteValueMIPS64_OpMove(v)
425 case OpMul16:
426 return rewriteValueMIPS64_OpMul16(v)
427 case OpMul32:
428 return rewriteValueMIPS64_OpMul32(v)
429 case OpMul32F:
430 v.Op = OpMIPS64MULF
431 return true
432 case OpMul64:
433 return rewriteValueMIPS64_OpMul64(v)
434 case OpMul64F:
435 v.Op = OpMIPS64MULD
436 return true
437 case OpMul64uhilo:
438 v.Op = OpMIPS64MULVU
439 return true
440 case OpMul8:
441 return rewriteValueMIPS64_OpMul8(v)
442 case OpNeg16:
443 v.Op = OpMIPS64NEGV
444 return true
445 case OpNeg32:
446 v.Op = OpMIPS64NEGV
447 return true
448 case OpNeg32F:
449 v.Op = OpMIPS64NEGF
450 return true
451 case OpNeg64:
452 v.Op = OpMIPS64NEGV
453 return true
454 case OpNeg64F:
455 v.Op = OpMIPS64NEGD
456 return true
457 case OpNeg8:
458 v.Op = OpMIPS64NEGV
459 return true
460 case OpNeq16:
461 return rewriteValueMIPS64_OpNeq16(v)
462 case OpNeq32:
463 return rewriteValueMIPS64_OpNeq32(v)
464 case OpNeq32F:
465 return rewriteValueMIPS64_OpNeq32F(v)
466 case OpNeq64:
467 return rewriteValueMIPS64_OpNeq64(v)
468 case OpNeq64F:
469 return rewriteValueMIPS64_OpNeq64F(v)
470 case OpNeq8:
471 return rewriteValueMIPS64_OpNeq8(v)
472 case OpNeqB:
473 v.Op = OpMIPS64XOR
474 return true
475 case OpNeqPtr:
476 return rewriteValueMIPS64_OpNeqPtr(v)
477 case OpNilCheck:
478 v.Op = OpMIPS64LoweredNilCheck
479 return true
480 case OpNot:
481 return rewriteValueMIPS64_OpNot(v)
482 case OpOffPtr:
483 return rewriteValueMIPS64_OpOffPtr(v)
484 case OpOr16:
485 v.Op = OpMIPS64OR
486 return true
487 case OpOr32:
488 v.Op = OpMIPS64OR
489 return true
490 case OpOr64:
491 v.Op = OpMIPS64OR
492 return true
493 case OpOr8:
494 v.Op = OpMIPS64OR
495 return true
496 case OpOrB:
497 v.Op = OpMIPS64OR
498 return true
499 case OpPanicBounds:
500 v.Op = OpMIPS64LoweredPanicBoundsRR
501 return true
502 case OpPubBarrier:
503 v.Op = OpMIPS64LoweredPubBarrier
504 return true
505 case OpRotateLeft16:
506 return rewriteValueMIPS64_OpRotateLeft16(v)
507 case OpRotateLeft32:
508 return rewriteValueMIPS64_OpRotateLeft32(v)
509 case OpRotateLeft64:
510 return rewriteValueMIPS64_OpRotateLeft64(v)
511 case OpRotateLeft8:
512 return rewriteValueMIPS64_OpRotateLeft8(v)
513 case OpRound32F:
514 v.Op = OpCopy
515 return true
516 case OpRound64F:
517 v.Op = OpCopy
518 return true
519 case OpRsh16Ux16:
520 return rewriteValueMIPS64_OpRsh16Ux16(v)
521 case OpRsh16Ux32:
522 return rewriteValueMIPS64_OpRsh16Ux32(v)
523 case OpRsh16Ux64:
524 return rewriteValueMIPS64_OpRsh16Ux64(v)
525 case OpRsh16Ux8:
526 return rewriteValueMIPS64_OpRsh16Ux8(v)
527 case OpRsh16x16:
528 return rewriteValueMIPS64_OpRsh16x16(v)
529 case OpRsh16x32:
530 return rewriteValueMIPS64_OpRsh16x32(v)
531 case OpRsh16x64:
532 return rewriteValueMIPS64_OpRsh16x64(v)
533 case OpRsh16x8:
534 return rewriteValueMIPS64_OpRsh16x8(v)
535 case OpRsh32Ux16:
536 return rewriteValueMIPS64_OpRsh32Ux16(v)
537 case OpRsh32Ux32:
538 return rewriteValueMIPS64_OpRsh32Ux32(v)
539 case OpRsh32Ux64:
540 return rewriteValueMIPS64_OpRsh32Ux64(v)
541 case OpRsh32Ux8:
542 return rewriteValueMIPS64_OpRsh32Ux8(v)
543 case OpRsh32x16:
544 return rewriteValueMIPS64_OpRsh32x16(v)
545 case OpRsh32x32:
546 return rewriteValueMIPS64_OpRsh32x32(v)
547 case OpRsh32x64:
548 return rewriteValueMIPS64_OpRsh32x64(v)
549 case OpRsh32x8:
550 return rewriteValueMIPS64_OpRsh32x8(v)
551 case OpRsh64Ux16:
552 return rewriteValueMIPS64_OpRsh64Ux16(v)
553 case OpRsh64Ux32:
554 return rewriteValueMIPS64_OpRsh64Ux32(v)
555 case OpRsh64Ux64:
556 return rewriteValueMIPS64_OpRsh64Ux64(v)
557 case OpRsh64Ux8:
558 return rewriteValueMIPS64_OpRsh64Ux8(v)
559 case OpRsh64x16:
560 return rewriteValueMIPS64_OpRsh64x16(v)
561 case OpRsh64x32:
562 return rewriteValueMIPS64_OpRsh64x32(v)
563 case OpRsh64x64:
564 return rewriteValueMIPS64_OpRsh64x64(v)
565 case OpRsh64x8:
566 return rewriteValueMIPS64_OpRsh64x8(v)
567 case OpRsh8Ux16:
568 return rewriteValueMIPS64_OpRsh8Ux16(v)
569 case OpRsh8Ux32:
570 return rewriteValueMIPS64_OpRsh8Ux32(v)
571 case OpRsh8Ux64:
572 return rewriteValueMIPS64_OpRsh8Ux64(v)
573 case OpRsh8Ux8:
574 return rewriteValueMIPS64_OpRsh8Ux8(v)
575 case OpRsh8x16:
576 return rewriteValueMIPS64_OpRsh8x16(v)
577 case OpRsh8x32:
578 return rewriteValueMIPS64_OpRsh8x32(v)
579 case OpRsh8x64:
580 return rewriteValueMIPS64_OpRsh8x64(v)
581 case OpRsh8x8:
582 return rewriteValueMIPS64_OpRsh8x8(v)
583 case OpSelect0:
584 return rewriteValueMIPS64_OpSelect0(v)
585 case OpSelect1:
586 return rewriteValueMIPS64_OpSelect1(v)
587 case OpSignExt16to32:
588 v.Op = OpMIPS64MOVHreg
589 return true
590 case OpSignExt16to64:
591 v.Op = OpMIPS64MOVHreg
592 return true
593 case OpSignExt32to64:
594 v.Op = OpMIPS64MOVWreg
595 return true
596 case OpSignExt8to16:
597 v.Op = OpMIPS64MOVBreg
598 return true
599 case OpSignExt8to32:
600 v.Op = OpMIPS64MOVBreg
601 return true
602 case OpSignExt8to64:
603 v.Op = OpMIPS64MOVBreg
604 return true
605 case OpSlicemask:
606 return rewriteValueMIPS64_OpSlicemask(v)
607 case OpSqrt:
608 v.Op = OpMIPS64SQRTD
609 return true
610 case OpSqrt32:
611 v.Op = OpMIPS64SQRTF
612 return true
613 case OpStaticCall:
614 v.Op = OpMIPS64CALLstatic
615 return true
616 case OpStore:
617 return rewriteValueMIPS64_OpStore(v)
618 case OpSub16:
619 v.Op = OpMIPS64SUBV
620 return true
621 case OpSub32:
622 v.Op = OpMIPS64SUBV
623 return true
624 case OpSub32F:
625 v.Op = OpMIPS64SUBF
626 return true
627 case OpSub64:
628 v.Op = OpMIPS64SUBV
629 return true
630 case OpSub64F:
631 v.Op = OpMIPS64SUBD
632 return true
633 case OpSub8:
634 v.Op = OpMIPS64SUBV
635 return true
636 case OpSubPtr:
637 v.Op = OpMIPS64SUBV
638 return true
639 case OpTailCall:
640 v.Op = OpMIPS64CALLtail
641 return true
642 case OpTailCallInter:
643 v.Op = OpMIPS64CALLtailinter
644 return true
645 case OpTrunc16to8:
646 v.Op = OpCopy
647 return true
648 case OpTrunc32to16:
649 v.Op = OpCopy
650 return true
651 case OpTrunc32to8:
652 v.Op = OpCopy
653 return true
654 case OpTrunc64to16:
655 v.Op = OpCopy
656 return true
657 case OpTrunc64to32:
658 v.Op = OpCopy
659 return true
660 case OpTrunc64to8:
661 v.Op = OpCopy
662 return true
663 case OpWB:
664 v.Op = OpMIPS64LoweredWB
665 return true
666 case OpXor16:
667 v.Op = OpMIPS64XOR
668 return true
669 case OpXor32:
670 v.Op = OpMIPS64XOR
671 return true
672 case OpXor64:
673 v.Op = OpMIPS64XOR
674 return true
675 case OpXor8:
676 v.Op = OpMIPS64XOR
677 return true
678 case OpZero:
679 return rewriteValueMIPS64_OpZero(v)
680 case OpZeroExt16to32:
681 v.Op = OpMIPS64MOVHUreg
682 return true
683 case OpZeroExt16to64:
684 v.Op = OpMIPS64MOVHUreg
685 return true
686 case OpZeroExt32to64:
687 v.Op = OpMIPS64MOVWUreg
688 return true
689 case OpZeroExt8to16:
690 v.Op = OpMIPS64MOVBUreg
691 return true
692 case OpZeroExt8to32:
693 v.Op = OpMIPS64MOVBUreg
694 return true
695 case OpZeroExt8to64:
696 v.Op = OpMIPS64MOVBUreg
697 return true
698 }
699 return false
700 }
701 func rewriteValueMIPS64_OpAddr(v *Value) bool {
702 v_0 := v.Args[0]
703
704
705 for {
706 sym := auxToSym(v.Aux)
707 base := v_0
708 v.reset(OpMIPS64MOVVaddr)
709 v.Aux = symToAux(sym)
710 v.AddArg(base)
711 return true
712 }
713 }
714 func rewriteValueMIPS64_OpAtomicAnd8(v *Value) bool {
715 v_2 := v.Args[2]
716 v_1 := v.Args[1]
717 v_0 := v.Args[0]
718 b := v.Block
719 config := b.Func.Config
720 typ := &b.Func.Config.Types
721
722
723
724 for {
725 ptr := v_0
726 val := v_1
727 mem := v_2
728 if !(!config.BigEndian) {
729 break
730 }
731 v.reset(OpMIPS64LoweredAtomicAnd32)
732 v0 := b.NewValue0(v.Pos, OpMIPS64AND, typ.UInt32Ptr)
733 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
734 v1.AuxInt = int64ToAuxInt(^3)
735 v0.AddArg2(v1, ptr)
736 v2 := b.NewValue0(v.Pos, OpMIPS64OR, typ.UInt64)
737 v3 := b.NewValue0(v.Pos, OpMIPS64SLLV, typ.UInt32)
738 v4 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
739 v4.AddArg(val)
740 v5 := b.NewValue0(v.Pos, OpMIPS64SLLVconst, typ.UInt64)
741 v5.AuxInt = int64ToAuxInt(3)
742 v6 := b.NewValue0(v.Pos, OpMIPS64ANDconst, typ.UInt64)
743 v6.AuxInt = int64ToAuxInt(3)
744 v6.AddArg(ptr)
745 v5.AddArg(v6)
746 v3.AddArg2(v4, v5)
747 v7 := b.NewValue0(v.Pos, OpMIPS64NOR, typ.UInt64)
748 v8 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
749 v8.AuxInt = int64ToAuxInt(0)
750 v9 := b.NewValue0(v.Pos, OpMIPS64SLLV, typ.UInt64)
751 v10 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
752 v10.AuxInt = int64ToAuxInt(0xff)
753 v9.AddArg2(v10, v5)
754 v7.AddArg2(v8, v9)
755 v2.AddArg2(v3, v7)
756 v.AddArg3(v0, v2, mem)
757 return true
758 }
759
760
761
762 for {
763 ptr := v_0
764 val := v_1
765 mem := v_2
766 if !(config.BigEndian) {
767 break
768 }
769 v.reset(OpMIPS64LoweredAtomicAnd32)
770 v0 := b.NewValue0(v.Pos, OpMIPS64AND, typ.UInt32Ptr)
771 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
772 v1.AuxInt = int64ToAuxInt(^3)
773 v0.AddArg2(v1, ptr)
774 v2 := b.NewValue0(v.Pos, OpMIPS64OR, typ.UInt64)
775 v3 := b.NewValue0(v.Pos, OpMIPS64SLLV, typ.UInt32)
776 v4 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
777 v4.AddArg(val)
778 v5 := b.NewValue0(v.Pos, OpMIPS64SLLVconst, typ.UInt64)
779 v5.AuxInt = int64ToAuxInt(3)
780 v6 := b.NewValue0(v.Pos, OpMIPS64ANDconst, typ.UInt64)
781 v6.AuxInt = int64ToAuxInt(3)
782 v7 := b.NewValue0(v.Pos, OpMIPS64XORconst, typ.UInt64)
783 v7.AuxInt = int64ToAuxInt(3)
784 v7.AddArg(ptr)
785 v6.AddArg(v7)
786 v5.AddArg(v6)
787 v3.AddArg2(v4, v5)
788 v8 := b.NewValue0(v.Pos, OpMIPS64NOR, typ.UInt64)
789 v9 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
790 v9.AuxInt = int64ToAuxInt(0)
791 v10 := b.NewValue0(v.Pos, OpMIPS64SLLV, typ.UInt64)
792 v11 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
793 v11.AuxInt = int64ToAuxInt(0xff)
794 v10.AddArg2(v11, v5)
795 v8.AddArg2(v9, v10)
796 v2.AddArg2(v3, v8)
797 v.AddArg3(v0, v2, mem)
798 return true
799 }
800 return false
801 }
802 func rewriteValueMIPS64_OpAtomicCompareAndSwap32(v *Value) bool {
803 v_3 := v.Args[3]
804 v_2 := v.Args[2]
805 v_1 := v.Args[1]
806 v_0 := v.Args[0]
807 b := v.Block
808 typ := &b.Func.Config.Types
809
810
811 for {
812 ptr := v_0
813 old := v_1
814 new := v_2
815 mem := v_3
816 v.reset(OpMIPS64LoweredAtomicCas32)
817 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
818 v0.AddArg(old)
819 v.AddArg4(ptr, v0, new, mem)
820 return true
821 }
822 }
823 func rewriteValueMIPS64_OpAtomicOr8(v *Value) bool {
824 v_2 := v.Args[2]
825 v_1 := v.Args[1]
826 v_0 := v.Args[0]
827 b := v.Block
828 config := b.Func.Config
829 typ := &b.Func.Config.Types
830
831
832
833 for {
834 ptr := v_0
835 val := v_1
836 mem := v_2
837 if !(!config.BigEndian) {
838 break
839 }
840 v.reset(OpMIPS64LoweredAtomicOr32)
841 v0 := b.NewValue0(v.Pos, OpMIPS64AND, typ.UInt32Ptr)
842 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
843 v1.AuxInt = int64ToAuxInt(^3)
844 v0.AddArg2(v1, ptr)
845 v2 := b.NewValue0(v.Pos, OpMIPS64SLLV, typ.UInt32)
846 v3 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
847 v3.AddArg(val)
848 v4 := b.NewValue0(v.Pos, OpMIPS64SLLVconst, typ.UInt64)
849 v4.AuxInt = int64ToAuxInt(3)
850 v5 := b.NewValue0(v.Pos, OpMIPS64ANDconst, typ.UInt64)
851 v5.AuxInt = int64ToAuxInt(3)
852 v5.AddArg(ptr)
853 v4.AddArg(v5)
854 v2.AddArg2(v3, v4)
855 v.AddArg3(v0, v2, mem)
856 return true
857 }
858
859
860
861 for {
862 ptr := v_0
863 val := v_1
864 mem := v_2
865 if !(config.BigEndian) {
866 break
867 }
868 v.reset(OpMIPS64LoweredAtomicOr32)
869 v0 := b.NewValue0(v.Pos, OpMIPS64AND, typ.UInt32Ptr)
870 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
871 v1.AuxInt = int64ToAuxInt(^3)
872 v0.AddArg2(v1, ptr)
873 v2 := b.NewValue0(v.Pos, OpMIPS64SLLV, typ.UInt32)
874 v3 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
875 v3.AddArg(val)
876 v4 := b.NewValue0(v.Pos, OpMIPS64SLLVconst, typ.UInt64)
877 v4.AuxInt = int64ToAuxInt(3)
878 v5 := b.NewValue0(v.Pos, OpMIPS64ANDconst, typ.UInt64)
879 v5.AuxInt = int64ToAuxInt(3)
880 v6 := b.NewValue0(v.Pos, OpMIPS64XORconst, typ.UInt64)
881 v6.AuxInt = int64ToAuxInt(3)
882 v6.AddArg(ptr)
883 v5.AddArg(v6)
884 v4.AddArg(v5)
885 v2.AddArg2(v3, v4)
886 v.AddArg3(v0, v2, mem)
887 return true
888 }
889 return false
890 }
891 func rewriteValueMIPS64_OpAvg64u(v *Value) bool {
892 v_1 := v.Args[1]
893 v_0 := v.Args[0]
894 b := v.Block
895
896
897 for {
898 t := v.Type
899 x := v_0
900 y := v_1
901 v.reset(OpMIPS64ADDV)
902 v0 := b.NewValue0(v.Pos, OpMIPS64SRLVconst, t)
903 v0.AuxInt = int64ToAuxInt(1)
904 v1 := b.NewValue0(v.Pos, OpMIPS64SUBV, t)
905 v1.AddArg2(x, y)
906 v0.AddArg(v1)
907 v.AddArg2(v0, y)
908 return true
909 }
910 }
911 func rewriteValueMIPS64_OpCom16(v *Value) bool {
912 v_0 := v.Args[0]
913 b := v.Block
914 typ := &b.Func.Config.Types
915
916
917 for {
918 x := v_0
919 v.reset(OpMIPS64NOR)
920 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
921 v0.AuxInt = int64ToAuxInt(0)
922 v.AddArg2(v0, x)
923 return true
924 }
925 }
926 func rewriteValueMIPS64_OpCom32(v *Value) bool {
927 v_0 := v.Args[0]
928 b := v.Block
929 typ := &b.Func.Config.Types
930
931
932 for {
933 x := v_0
934 v.reset(OpMIPS64NOR)
935 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
936 v0.AuxInt = int64ToAuxInt(0)
937 v.AddArg2(v0, x)
938 return true
939 }
940 }
941 func rewriteValueMIPS64_OpCom64(v *Value) bool {
942 v_0 := v.Args[0]
943 b := v.Block
944 typ := &b.Func.Config.Types
945
946
947 for {
948 x := v_0
949 v.reset(OpMIPS64NOR)
950 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
951 v0.AuxInt = int64ToAuxInt(0)
952 v.AddArg2(v0, x)
953 return true
954 }
955 }
956 func rewriteValueMIPS64_OpCom8(v *Value) bool {
957 v_0 := v.Args[0]
958 b := v.Block
959 typ := &b.Func.Config.Types
960
961
962 for {
963 x := v_0
964 v.reset(OpMIPS64NOR)
965 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
966 v0.AuxInt = int64ToAuxInt(0)
967 v.AddArg2(v0, x)
968 return true
969 }
970 }
971 func rewriteValueMIPS64_OpConst16(v *Value) bool {
972
973
974 for {
975 val := auxIntToInt16(v.AuxInt)
976 v.reset(OpMIPS64MOVVconst)
977 v.AuxInt = int64ToAuxInt(int64(val))
978 return true
979 }
980 }
981 func rewriteValueMIPS64_OpConst32(v *Value) bool {
982
983
984 for {
985 val := auxIntToInt32(v.AuxInt)
986 v.reset(OpMIPS64MOVVconst)
987 v.AuxInt = int64ToAuxInt(int64(val))
988 return true
989 }
990 }
991 func rewriteValueMIPS64_OpConst32F(v *Value) bool {
992
993
994 for {
995 val := auxIntToFloat32(v.AuxInt)
996 v.reset(OpMIPS64MOVFconst)
997 v.AuxInt = float64ToAuxInt(float64(val))
998 return true
999 }
1000 }
1001 func rewriteValueMIPS64_OpConst64(v *Value) bool {
1002
1003
1004 for {
1005 val := auxIntToInt64(v.AuxInt)
1006 v.reset(OpMIPS64MOVVconst)
1007 v.AuxInt = int64ToAuxInt(int64(val))
1008 return true
1009 }
1010 }
1011 func rewriteValueMIPS64_OpConst64F(v *Value) bool {
1012
1013
1014 for {
1015 val := auxIntToFloat64(v.AuxInt)
1016 v.reset(OpMIPS64MOVDconst)
1017 v.AuxInt = float64ToAuxInt(float64(val))
1018 return true
1019 }
1020 }
1021 func rewriteValueMIPS64_OpConst8(v *Value) bool {
1022
1023
1024 for {
1025 val := auxIntToInt8(v.AuxInt)
1026 v.reset(OpMIPS64MOVVconst)
1027 v.AuxInt = int64ToAuxInt(int64(val))
1028 return true
1029 }
1030 }
1031 func rewriteValueMIPS64_OpConstBool(v *Value) bool {
1032
1033
1034 for {
1035 t := auxIntToBool(v.AuxInt)
1036 v.reset(OpMIPS64MOVVconst)
1037 v.AuxInt = int64ToAuxInt(int64(b2i(t)))
1038 return true
1039 }
1040 }
1041 func rewriteValueMIPS64_OpConstNil(v *Value) bool {
1042
1043
1044 for {
1045 v.reset(OpMIPS64MOVVconst)
1046 v.AuxInt = int64ToAuxInt(0)
1047 return true
1048 }
1049 }
1050 func rewriteValueMIPS64_OpDiv16(v *Value) bool {
1051 v_1 := v.Args[1]
1052 v_0 := v.Args[0]
1053 b := v.Block
1054 typ := &b.Func.Config.Types
1055
1056
1057 for {
1058 x := v_0
1059 y := v_1
1060 v.reset(OpSelect1)
1061 v0 := b.NewValue0(v.Pos, OpMIPS64DIVV, types.NewTuple(typ.Int64, typ.Int64))
1062 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1063 v1.AddArg(x)
1064 v2 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1065 v2.AddArg(y)
1066 v0.AddArg2(v1, v2)
1067 v.AddArg(v0)
1068 return true
1069 }
1070 }
1071 func rewriteValueMIPS64_OpDiv16u(v *Value) bool {
1072 v_1 := v.Args[1]
1073 v_0 := v.Args[0]
1074 b := v.Block
1075 typ := &b.Func.Config.Types
1076
1077
1078 for {
1079 x := v_0
1080 y := v_1
1081 v.reset(OpSelect1)
1082 v0 := b.NewValue0(v.Pos, OpMIPS64DIVVU, types.NewTuple(typ.UInt64, typ.UInt64))
1083 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1084 v1.AddArg(x)
1085 v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1086 v2.AddArg(y)
1087 v0.AddArg2(v1, v2)
1088 v.AddArg(v0)
1089 return true
1090 }
1091 }
1092 func rewriteValueMIPS64_OpDiv32(v *Value) bool {
1093 v_1 := v.Args[1]
1094 v_0 := v.Args[0]
1095 b := v.Block
1096 typ := &b.Func.Config.Types
1097
1098
1099 for {
1100 x := v_0
1101 y := v_1
1102 v.reset(OpSelect1)
1103 v0 := b.NewValue0(v.Pos, OpMIPS64DIVV, types.NewTuple(typ.Int64, typ.Int64))
1104 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1105 v1.AddArg(x)
1106 v2 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1107 v2.AddArg(y)
1108 v0.AddArg2(v1, v2)
1109 v.AddArg(v0)
1110 return true
1111 }
1112 }
1113 func rewriteValueMIPS64_OpDiv32u(v *Value) bool {
1114 v_1 := v.Args[1]
1115 v_0 := v.Args[0]
1116 b := v.Block
1117 typ := &b.Func.Config.Types
1118
1119
1120 for {
1121 x := v_0
1122 y := v_1
1123 v.reset(OpSelect1)
1124 v0 := b.NewValue0(v.Pos, OpMIPS64DIVVU, types.NewTuple(typ.UInt64, typ.UInt64))
1125 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1126 v1.AddArg(x)
1127 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1128 v2.AddArg(y)
1129 v0.AddArg2(v1, v2)
1130 v.AddArg(v0)
1131 return true
1132 }
1133 }
1134 func rewriteValueMIPS64_OpDiv64(v *Value) bool {
1135 v_1 := v.Args[1]
1136 v_0 := v.Args[0]
1137 b := v.Block
1138 typ := &b.Func.Config.Types
1139
1140
1141 for {
1142 x := v_0
1143 y := v_1
1144 v.reset(OpSelect1)
1145 v0 := b.NewValue0(v.Pos, OpMIPS64DIVV, types.NewTuple(typ.Int64, typ.Int64))
1146 v0.AddArg2(x, y)
1147 v.AddArg(v0)
1148 return true
1149 }
1150 }
1151 func rewriteValueMIPS64_OpDiv64u(v *Value) bool {
1152 v_1 := v.Args[1]
1153 v_0 := v.Args[0]
1154 b := v.Block
1155 typ := &b.Func.Config.Types
1156
1157
1158 for {
1159 x := v_0
1160 y := v_1
1161 v.reset(OpSelect1)
1162 v0 := b.NewValue0(v.Pos, OpMIPS64DIVVU, types.NewTuple(typ.UInt64, typ.UInt64))
1163 v0.AddArg2(x, y)
1164 v.AddArg(v0)
1165 return true
1166 }
1167 }
1168 func rewriteValueMIPS64_OpDiv8(v *Value) bool {
1169 v_1 := v.Args[1]
1170 v_0 := v.Args[0]
1171 b := v.Block
1172 typ := &b.Func.Config.Types
1173
1174
1175 for {
1176 x := v_0
1177 y := v_1
1178 v.reset(OpSelect1)
1179 v0 := b.NewValue0(v.Pos, OpMIPS64DIVV, types.NewTuple(typ.Int64, typ.Int64))
1180 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1181 v1.AddArg(x)
1182 v2 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1183 v2.AddArg(y)
1184 v0.AddArg2(v1, v2)
1185 v.AddArg(v0)
1186 return true
1187 }
1188 }
1189 func rewriteValueMIPS64_OpDiv8u(v *Value) bool {
1190 v_1 := v.Args[1]
1191 v_0 := v.Args[0]
1192 b := v.Block
1193 typ := &b.Func.Config.Types
1194
1195
1196 for {
1197 x := v_0
1198 y := v_1
1199 v.reset(OpSelect1)
1200 v0 := b.NewValue0(v.Pos, OpMIPS64DIVVU, types.NewTuple(typ.UInt64, typ.UInt64))
1201 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1202 v1.AddArg(x)
1203 v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1204 v2.AddArg(y)
1205 v0.AddArg2(v1, v2)
1206 v.AddArg(v0)
1207 return true
1208 }
1209 }
1210 func rewriteValueMIPS64_OpEq16(v *Value) bool {
1211 v_1 := v.Args[1]
1212 v_0 := v.Args[0]
1213 b := v.Block
1214 typ := &b.Func.Config.Types
1215
1216
1217 for {
1218 x := v_0
1219 y := v_1
1220 v.reset(OpMIPS64SGTU)
1221 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1222 v0.AuxInt = int64ToAuxInt(1)
1223 v1 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.UInt64)
1224 v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1225 v2.AddArg(x)
1226 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1227 v3.AddArg(y)
1228 v1.AddArg2(v2, v3)
1229 v.AddArg2(v0, v1)
1230 return true
1231 }
1232 }
1233 func rewriteValueMIPS64_OpEq32(v *Value) bool {
1234 v_1 := v.Args[1]
1235 v_0 := v.Args[0]
1236 b := v.Block
1237 typ := &b.Func.Config.Types
1238
1239
1240 for {
1241 x := v_0
1242 y := v_1
1243 v.reset(OpMIPS64SGTU)
1244 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1245 v0.AuxInt = int64ToAuxInt(1)
1246 v1 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.UInt64)
1247 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1248 v2.AddArg(x)
1249 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1250 v3.AddArg(y)
1251 v1.AddArg2(v2, v3)
1252 v.AddArg2(v0, v1)
1253 return true
1254 }
1255 }
1256 func rewriteValueMIPS64_OpEq32F(v *Value) bool {
1257 v_1 := v.Args[1]
1258 v_0 := v.Args[0]
1259 b := v.Block
1260
1261
1262 for {
1263 x := v_0
1264 y := v_1
1265 v.reset(OpMIPS64FPFlagTrue)
1266 v0 := b.NewValue0(v.Pos, OpMIPS64CMPEQF, types.TypeFlags)
1267 v0.AddArg2(x, y)
1268 v.AddArg(v0)
1269 return true
1270 }
1271 }
1272 func rewriteValueMIPS64_OpEq64(v *Value) bool {
1273 v_1 := v.Args[1]
1274 v_0 := v.Args[0]
1275 b := v.Block
1276 typ := &b.Func.Config.Types
1277
1278
1279 for {
1280 x := v_0
1281 y := v_1
1282 v.reset(OpMIPS64SGTU)
1283 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1284 v0.AuxInt = int64ToAuxInt(1)
1285 v1 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.UInt64)
1286 v1.AddArg2(x, y)
1287 v.AddArg2(v0, v1)
1288 return true
1289 }
1290 }
1291 func rewriteValueMIPS64_OpEq64F(v *Value) bool {
1292 v_1 := v.Args[1]
1293 v_0 := v.Args[0]
1294 b := v.Block
1295
1296
1297 for {
1298 x := v_0
1299 y := v_1
1300 v.reset(OpMIPS64FPFlagTrue)
1301 v0 := b.NewValue0(v.Pos, OpMIPS64CMPEQD, types.TypeFlags)
1302 v0.AddArg2(x, y)
1303 v.AddArg(v0)
1304 return true
1305 }
1306 }
1307 func rewriteValueMIPS64_OpEq8(v *Value) bool {
1308 v_1 := v.Args[1]
1309 v_0 := v.Args[0]
1310 b := v.Block
1311 typ := &b.Func.Config.Types
1312
1313
1314 for {
1315 x := v_0
1316 y := v_1
1317 v.reset(OpMIPS64SGTU)
1318 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1319 v0.AuxInt = int64ToAuxInt(1)
1320 v1 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.UInt64)
1321 v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1322 v2.AddArg(x)
1323 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1324 v3.AddArg(y)
1325 v1.AddArg2(v2, v3)
1326 v.AddArg2(v0, v1)
1327 return true
1328 }
1329 }
1330 func rewriteValueMIPS64_OpEqB(v *Value) bool {
1331 v_1 := v.Args[1]
1332 v_0 := v.Args[0]
1333 b := v.Block
1334 typ := &b.Func.Config.Types
1335
1336
1337 for {
1338 x := v_0
1339 y := v_1
1340 v.reset(OpMIPS64XOR)
1341 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1342 v0.AuxInt = int64ToAuxInt(1)
1343 v1 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.Bool)
1344 v1.AddArg2(x, y)
1345 v.AddArg2(v0, v1)
1346 return true
1347 }
1348 }
1349 func rewriteValueMIPS64_OpEqPtr(v *Value) bool {
1350 v_1 := v.Args[1]
1351 v_0 := v.Args[0]
1352 b := v.Block
1353 typ := &b.Func.Config.Types
1354
1355
1356 for {
1357 x := v_0
1358 y := v_1
1359 v.reset(OpMIPS64SGTU)
1360 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1361 v0.AuxInt = int64ToAuxInt(1)
1362 v1 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.UInt64)
1363 v1.AddArg2(x, y)
1364 v.AddArg2(v0, v1)
1365 return true
1366 }
1367 }
1368 func rewriteValueMIPS64_OpHmul32(v *Value) bool {
1369 v_1 := v.Args[1]
1370 v_0 := v.Args[0]
1371 b := v.Block
1372 typ := &b.Func.Config.Types
1373
1374
1375 for {
1376 x := v_0
1377 y := v_1
1378 v.reset(OpMIPS64SRAVconst)
1379 v.AuxInt = int64ToAuxInt(32)
1380 v0 := b.NewValue0(v.Pos, OpSelect1, typ.Int64)
1381 v1 := b.NewValue0(v.Pos, OpMIPS64MULV, types.NewTuple(typ.Int64, typ.Int64))
1382 v2 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1383 v2.AddArg(x)
1384 v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1385 v3.AddArg(y)
1386 v1.AddArg2(v2, v3)
1387 v0.AddArg(v1)
1388 v.AddArg(v0)
1389 return true
1390 }
1391 }
1392 func rewriteValueMIPS64_OpHmul32u(v *Value) bool {
1393 v_1 := v.Args[1]
1394 v_0 := v.Args[0]
1395 b := v.Block
1396 typ := &b.Func.Config.Types
1397
1398
1399 for {
1400 x := v_0
1401 y := v_1
1402 v.reset(OpMIPS64SRLVconst)
1403 v.AuxInt = int64ToAuxInt(32)
1404 v0 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
1405 v1 := b.NewValue0(v.Pos, OpMIPS64MULVU, types.NewTuple(typ.UInt64, typ.UInt64))
1406 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1407 v2.AddArg(x)
1408 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1409 v3.AddArg(y)
1410 v1.AddArg2(v2, v3)
1411 v0.AddArg(v1)
1412 v.AddArg(v0)
1413 return true
1414 }
1415 }
1416 func rewriteValueMIPS64_OpHmul64(v *Value) bool {
1417 v_1 := v.Args[1]
1418 v_0 := v.Args[0]
1419 b := v.Block
1420 typ := &b.Func.Config.Types
1421
1422
1423 for {
1424 x := v_0
1425 y := v_1
1426 v.reset(OpSelect0)
1427 v0 := b.NewValue0(v.Pos, OpMIPS64MULV, types.NewTuple(typ.Int64, typ.Int64))
1428 v0.AddArg2(x, y)
1429 v.AddArg(v0)
1430 return true
1431 }
1432 }
1433 func rewriteValueMIPS64_OpHmul64u(v *Value) bool {
1434 v_1 := v.Args[1]
1435 v_0 := v.Args[0]
1436 b := v.Block
1437 typ := &b.Func.Config.Types
1438
1439
1440 for {
1441 x := v_0
1442 y := v_1
1443 v.reset(OpSelect0)
1444 v0 := b.NewValue0(v.Pos, OpMIPS64MULVU, types.NewTuple(typ.UInt64, typ.UInt64))
1445 v0.AddArg2(x, y)
1446 v.AddArg(v0)
1447 return true
1448 }
1449 }
1450 func rewriteValueMIPS64_OpIsInBounds(v *Value) bool {
1451 v_1 := v.Args[1]
1452 v_0 := v.Args[0]
1453
1454
1455 for {
1456 idx := v_0
1457 len := v_1
1458 v.reset(OpMIPS64SGTU)
1459 v.AddArg2(len, idx)
1460 return true
1461 }
1462 }
1463 func rewriteValueMIPS64_OpIsNonNil(v *Value) bool {
1464 v_0 := v.Args[0]
1465 b := v.Block
1466 typ := &b.Func.Config.Types
1467
1468
1469 for {
1470 ptr := v_0
1471 v.reset(OpMIPS64SGTU)
1472 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1473 v0.AuxInt = int64ToAuxInt(0)
1474 v.AddArg2(ptr, v0)
1475 return true
1476 }
1477 }
1478 func rewriteValueMIPS64_OpIsSliceInBounds(v *Value) bool {
1479 v_1 := v.Args[1]
1480 v_0 := v.Args[0]
1481 b := v.Block
1482 typ := &b.Func.Config.Types
1483
1484
1485 for {
1486 idx := v_0
1487 len := v_1
1488 v.reset(OpMIPS64XOR)
1489 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1490 v0.AuxInt = int64ToAuxInt(1)
1491 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
1492 v1.AddArg2(idx, len)
1493 v.AddArg2(v0, v1)
1494 return true
1495 }
1496 }
1497 func rewriteValueMIPS64_OpLeq16(v *Value) bool {
1498 v_1 := v.Args[1]
1499 v_0 := v.Args[0]
1500 b := v.Block
1501 typ := &b.Func.Config.Types
1502
1503
1504 for {
1505 x := v_0
1506 y := v_1
1507 v.reset(OpMIPS64XOR)
1508 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1509 v0.AuxInt = int64ToAuxInt(1)
1510 v1 := b.NewValue0(v.Pos, OpMIPS64SGT, typ.Bool)
1511 v2 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1512 v2.AddArg(x)
1513 v3 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1514 v3.AddArg(y)
1515 v1.AddArg2(v2, v3)
1516 v.AddArg2(v0, v1)
1517 return true
1518 }
1519 }
1520 func rewriteValueMIPS64_OpLeq16U(v *Value) bool {
1521 v_1 := v.Args[1]
1522 v_0 := v.Args[0]
1523 b := v.Block
1524 typ := &b.Func.Config.Types
1525
1526
1527 for {
1528 x := v_0
1529 y := v_1
1530 v.reset(OpMIPS64XOR)
1531 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1532 v0.AuxInt = int64ToAuxInt(1)
1533 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
1534 v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1535 v2.AddArg(x)
1536 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1537 v3.AddArg(y)
1538 v1.AddArg2(v2, v3)
1539 v.AddArg2(v0, v1)
1540 return true
1541 }
1542 }
1543 func rewriteValueMIPS64_OpLeq32(v *Value) bool {
1544 v_1 := v.Args[1]
1545 v_0 := v.Args[0]
1546 b := v.Block
1547 typ := &b.Func.Config.Types
1548
1549
1550 for {
1551 x := v_0
1552 y := v_1
1553 v.reset(OpMIPS64XOR)
1554 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1555 v0.AuxInt = int64ToAuxInt(1)
1556 v1 := b.NewValue0(v.Pos, OpMIPS64SGT, typ.Bool)
1557 v2 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1558 v2.AddArg(x)
1559 v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1560 v3.AddArg(y)
1561 v1.AddArg2(v2, v3)
1562 v.AddArg2(v0, v1)
1563 return true
1564 }
1565 }
1566 func rewriteValueMIPS64_OpLeq32F(v *Value) bool {
1567 v_1 := v.Args[1]
1568 v_0 := v.Args[0]
1569 b := v.Block
1570
1571
1572 for {
1573 x := v_0
1574 y := v_1
1575 v.reset(OpMIPS64FPFlagTrue)
1576 v0 := b.NewValue0(v.Pos, OpMIPS64CMPGEF, types.TypeFlags)
1577 v0.AddArg2(y, x)
1578 v.AddArg(v0)
1579 return true
1580 }
1581 }
1582 func rewriteValueMIPS64_OpLeq32U(v *Value) bool {
1583 v_1 := v.Args[1]
1584 v_0 := v.Args[0]
1585 b := v.Block
1586 typ := &b.Func.Config.Types
1587
1588
1589 for {
1590 x := v_0
1591 y := v_1
1592 v.reset(OpMIPS64XOR)
1593 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1594 v0.AuxInt = int64ToAuxInt(1)
1595 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
1596 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1597 v2.AddArg(x)
1598 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1599 v3.AddArg(y)
1600 v1.AddArg2(v2, v3)
1601 v.AddArg2(v0, v1)
1602 return true
1603 }
1604 }
1605 func rewriteValueMIPS64_OpLeq64(v *Value) bool {
1606 v_1 := v.Args[1]
1607 v_0 := v.Args[0]
1608 b := v.Block
1609 typ := &b.Func.Config.Types
1610
1611
1612 for {
1613 x := v_0
1614 y := v_1
1615 v.reset(OpMIPS64XOR)
1616 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1617 v0.AuxInt = int64ToAuxInt(1)
1618 v1 := b.NewValue0(v.Pos, OpMIPS64SGT, typ.Bool)
1619 v1.AddArg2(x, y)
1620 v.AddArg2(v0, v1)
1621 return true
1622 }
1623 }
1624 func rewriteValueMIPS64_OpLeq64F(v *Value) bool {
1625 v_1 := v.Args[1]
1626 v_0 := v.Args[0]
1627 b := v.Block
1628
1629
1630 for {
1631 x := v_0
1632 y := v_1
1633 v.reset(OpMIPS64FPFlagTrue)
1634 v0 := b.NewValue0(v.Pos, OpMIPS64CMPGED, types.TypeFlags)
1635 v0.AddArg2(y, x)
1636 v.AddArg(v0)
1637 return true
1638 }
1639 }
1640 func rewriteValueMIPS64_OpLeq64U(v *Value) bool {
1641 v_1 := v.Args[1]
1642 v_0 := v.Args[0]
1643 b := v.Block
1644 typ := &b.Func.Config.Types
1645
1646
1647 for {
1648 x := v_0
1649 y := v_1
1650 v.reset(OpMIPS64XOR)
1651 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1652 v0.AuxInt = int64ToAuxInt(1)
1653 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
1654 v1.AddArg2(x, y)
1655 v.AddArg2(v0, v1)
1656 return true
1657 }
1658 }
1659 func rewriteValueMIPS64_OpLeq8(v *Value) bool {
1660 v_1 := v.Args[1]
1661 v_0 := v.Args[0]
1662 b := v.Block
1663 typ := &b.Func.Config.Types
1664
1665
1666 for {
1667 x := v_0
1668 y := v_1
1669 v.reset(OpMIPS64XOR)
1670 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1671 v0.AuxInt = int64ToAuxInt(1)
1672 v1 := b.NewValue0(v.Pos, OpMIPS64SGT, typ.Bool)
1673 v2 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1674 v2.AddArg(x)
1675 v3 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1676 v3.AddArg(y)
1677 v1.AddArg2(v2, v3)
1678 v.AddArg2(v0, v1)
1679 return true
1680 }
1681 }
1682 func rewriteValueMIPS64_OpLeq8U(v *Value) bool {
1683 v_1 := v.Args[1]
1684 v_0 := v.Args[0]
1685 b := v.Block
1686 typ := &b.Func.Config.Types
1687
1688
1689 for {
1690 x := v_0
1691 y := v_1
1692 v.reset(OpMIPS64XOR)
1693 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
1694 v0.AuxInt = int64ToAuxInt(1)
1695 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
1696 v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1697 v2.AddArg(x)
1698 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1699 v3.AddArg(y)
1700 v1.AddArg2(v2, v3)
1701 v.AddArg2(v0, v1)
1702 return true
1703 }
1704 }
1705 func rewriteValueMIPS64_OpLess16(v *Value) bool {
1706 v_1 := v.Args[1]
1707 v_0 := v.Args[0]
1708 b := v.Block
1709 typ := &b.Func.Config.Types
1710
1711
1712 for {
1713 x := v_0
1714 y := v_1
1715 v.reset(OpMIPS64SGT)
1716 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1717 v0.AddArg(y)
1718 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1719 v1.AddArg(x)
1720 v.AddArg2(v0, v1)
1721 return true
1722 }
1723 }
1724 func rewriteValueMIPS64_OpLess16U(v *Value) bool {
1725 v_1 := v.Args[1]
1726 v_0 := v.Args[0]
1727 b := v.Block
1728 typ := &b.Func.Config.Types
1729
1730
1731 for {
1732 x := v_0
1733 y := v_1
1734 v.reset(OpMIPS64SGTU)
1735 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1736 v0.AddArg(y)
1737 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1738 v1.AddArg(x)
1739 v.AddArg2(v0, v1)
1740 return true
1741 }
1742 }
1743 func rewriteValueMIPS64_OpLess32(v *Value) bool {
1744 v_1 := v.Args[1]
1745 v_0 := v.Args[0]
1746 b := v.Block
1747 typ := &b.Func.Config.Types
1748
1749
1750 for {
1751 x := v_0
1752 y := v_1
1753 v.reset(OpMIPS64SGT)
1754 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1755 v0.AddArg(y)
1756 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1757 v1.AddArg(x)
1758 v.AddArg2(v0, v1)
1759 return true
1760 }
1761 }
1762 func rewriteValueMIPS64_OpLess32F(v *Value) bool {
1763 v_1 := v.Args[1]
1764 v_0 := v.Args[0]
1765 b := v.Block
1766
1767
1768 for {
1769 x := v_0
1770 y := v_1
1771 v.reset(OpMIPS64FPFlagTrue)
1772 v0 := b.NewValue0(v.Pos, OpMIPS64CMPGTF, types.TypeFlags)
1773 v0.AddArg2(y, x)
1774 v.AddArg(v0)
1775 return true
1776 }
1777 }
1778 func rewriteValueMIPS64_OpLess32U(v *Value) bool {
1779 v_1 := v.Args[1]
1780 v_0 := v.Args[0]
1781 b := v.Block
1782 typ := &b.Func.Config.Types
1783
1784
1785 for {
1786 x := v_0
1787 y := v_1
1788 v.reset(OpMIPS64SGTU)
1789 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1790 v0.AddArg(y)
1791 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1792 v1.AddArg(x)
1793 v.AddArg2(v0, v1)
1794 return true
1795 }
1796 }
1797 func rewriteValueMIPS64_OpLess64(v *Value) bool {
1798 v_1 := v.Args[1]
1799 v_0 := v.Args[0]
1800
1801
1802 for {
1803 x := v_0
1804 y := v_1
1805 v.reset(OpMIPS64SGT)
1806 v.AddArg2(y, x)
1807 return true
1808 }
1809 }
1810 func rewriteValueMIPS64_OpLess64F(v *Value) bool {
1811 v_1 := v.Args[1]
1812 v_0 := v.Args[0]
1813 b := v.Block
1814
1815
1816 for {
1817 x := v_0
1818 y := v_1
1819 v.reset(OpMIPS64FPFlagTrue)
1820 v0 := b.NewValue0(v.Pos, OpMIPS64CMPGTD, types.TypeFlags)
1821 v0.AddArg2(y, x)
1822 v.AddArg(v0)
1823 return true
1824 }
1825 }
1826 func rewriteValueMIPS64_OpLess64U(v *Value) bool {
1827 v_1 := v.Args[1]
1828 v_0 := v.Args[0]
1829
1830
1831 for {
1832 x := v_0
1833 y := v_1
1834 v.reset(OpMIPS64SGTU)
1835 v.AddArg2(y, x)
1836 return true
1837 }
1838 }
1839 func rewriteValueMIPS64_OpLess8(v *Value) bool {
1840 v_1 := v.Args[1]
1841 v_0 := v.Args[0]
1842 b := v.Block
1843 typ := &b.Func.Config.Types
1844
1845
1846 for {
1847 x := v_0
1848 y := v_1
1849 v.reset(OpMIPS64SGT)
1850 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1851 v0.AddArg(y)
1852 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1853 v1.AddArg(x)
1854 v.AddArg2(v0, v1)
1855 return true
1856 }
1857 }
1858 func rewriteValueMIPS64_OpLess8U(v *Value) bool {
1859 v_1 := v.Args[1]
1860 v_0 := v.Args[0]
1861 b := v.Block
1862 typ := &b.Func.Config.Types
1863
1864
1865 for {
1866 x := v_0
1867 y := v_1
1868 v.reset(OpMIPS64SGTU)
1869 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1870 v0.AddArg(y)
1871 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1872 v1.AddArg(x)
1873 v.AddArg2(v0, v1)
1874 return true
1875 }
1876 }
1877 func rewriteValueMIPS64_OpLoad(v *Value) bool {
1878 v_1 := v.Args[1]
1879 v_0 := v.Args[0]
1880
1881
1882
1883 for {
1884 t := v.Type
1885 ptr := v_0
1886 mem := v_1
1887 if !(t.IsBoolean()) {
1888 break
1889 }
1890 v.reset(OpMIPS64MOVBUload)
1891 v.AddArg2(ptr, mem)
1892 return true
1893 }
1894
1895
1896
1897 for {
1898 t := v.Type
1899 ptr := v_0
1900 mem := v_1
1901 if !(is8BitInt(t) && t.IsSigned()) {
1902 break
1903 }
1904 v.reset(OpMIPS64MOVBload)
1905 v.AddArg2(ptr, mem)
1906 return true
1907 }
1908
1909
1910
1911 for {
1912 t := v.Type
1913 ptr := v_0
1914 mem := v_1
1915 if !(is8BitInt(t) && !t.IsSigned()) {
1916 break
1917 }
1918 v.reset(OpMIPS64MOVBUload)
1919 v.AddArg2(ptr, mem)
1920 return true
1921 }
1922
1923
1924
1925 for {
1926 t := v.Type
1927 ptr := v_0
1928 mem := v_1
1929 if !(is16BitInt(t) && t.IsSigned()) {
1930 break
1931 }
1932 v.reset(OpMIPS64MOVHload)
1933 v.AddArg2(ptr, mem)
1934 return true
1935 }
1936
1937
1938
1939 for {
1940 t := v.Type
1941 ptr := v_0
1942 mem := v_1
1943 if !(is16BitInt(t) && !t.IsSigned()) {
1944 break
1945 }
1946 v.reset(OpMIPS64MOVHUload)
1947 v.AddArg2(ptr, mem)
1948 return true
1949 }
1950
1951
1952
1953 for {
1954 t := v.Type
1955 ptr := v_0
1956 mem := v_1
1957 if !(is32BitInt(t) && t.IsSigned()) {
1958 break
1959 }
1960 v.reset(OpMIPS64MOVWload)
1961 v.AddArg2(ptr, mem)
1962 return true
1963 }
1964
1965
1966
1967 for {
1968 t := v.Type
1969 ptr := v_0
1970 mem := v_1
1971 if !(is32BitInt(t) && !t.IsSigned()) {
1972 break
1973 }
1974 v.reset(OpMIPS64MOVWUload)
1975 v.AddArg2(ptr, mem)
1976 return true
1977 }
1978
1979
1980
1981 for {
1982 t := v.Type
1983 ptr := v_0
1984 mem := v_1
1985 if !(is64BitInt(t) || isPtr(t)) {
1986 break
1987 }
1988 v.reset(OpMIPS64MOVVload)
1989 v.AddArg2(ptr, mem)
1990 return true
1991 }
1992
1993
1994
1995 for {
1996 t := v.Type
1997 ptr := v_0
1998 mem := v_1
1999 if !(is32BitFloat(t)) {
2000 break
2001 }
2002 v.reset(OpMIPS64MOVFload)
2003 v.AddArg2(ptr, mem)
2004 return true
2005 }
2006
2007
2008
2009 for {
2010 t := v.Type
2011 ptr := v_0
2012 mem := v_1
2013 if !(is64BitFloat(t)) {
2014 break
2015 }
2016 v.reset(OpMIPS64MOVDload)
2017 v.AddArg2(ptr, mem)
2018 return true
2019 }
2020 return false
2021 }
2022 func rewriteValueMIPS64_OpLocalAddr(v *Value) bool {
2023 v_1 := v.Args[1]
2024 v_0 := v.Args[0]
2025 b := v.Block
2026 typ := &b.Func.Config.Types
2027
2028
2029
2030 for {
2031 t := v.Type
2032 sym := auxToSym(v.Aux)
2033 base := v_0
2034 mem := v_1
2035 if !(t.Elem().HasPointers()) {
2036 break
2037 }
2038 v.reset(OpMIPS64MOVVaddr)
2039 v.Aux = symToAux(sym)
2040 v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
2041 v0.AddArg2(base, mem)
2042 v.AddArg(v0)
2043 return true
2044 }
2045
2046
2047
2048 for {
2049 t := v.Type
2050 sym := auxToSym(v.Aux)
2051 base := v_0
2052 if !(!t.Elem().HasPointers()) {
2053 break
2054 }
2055 v.reset(OpMIPS64MOVVaddr)
2056 v.Aux = symToAux(sym)
2057 v.AddArg(base)
2058 return true
2059 }
2060 return false
2061 }
2062 func rewriteValueMIPS64_OpLsh16x16(v *Value) bool {
2063 v_1 := v.Args[1]
2064 v_0 := v.Args[0]
2065 b := v.Block
2066 typ := &b.Func.Config.Types
2067
2068
2069 for {
2070 t := v.Type
2071 x := v_0
2072 y := v_1
2073 v.reset(OpMIPS64AND)
2074 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2075 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2076 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2077 v2.AuxInt = int64ToAuxInt(64)
2078 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2079 v3.AddArg(y)
2080 v1.AddArg2(v2, v3)
2081 v0.AddArg(v1)
2082 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2083 v4.AddArg2(x, v3)
2084 v.AddArg2(v0, v4)
2085 return true
2086 }
2087 }
2088 func rewriteValueMIPS64_OpLsh16x32(v *Value) bool {
2089 v_1 := v.Args[1]
2090 v_0 := v.Args[0]
2091 b := v.Block
2092 typ := &b.Func.Config.Types
2093
2094
2095 for {
2096 t := v.Type
2097 x := v_0
2098 y := v_1
2099 v.reset(OpMIPS64AND)
2100 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2101 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2102 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2103 v2.AuxInt = int64ToAuxInt(64)
2104 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2105 v3.AddArg(y)
2106 v1.AddArg2(v2, v3)
2107 v0.AddArg(v1)
2108 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2109 v4.AddArg2(x, v3)
2110 v.AddArg2(v0, v4)
2111 return true
2112 }
2113 }
2114 func rewriteValueMIPS64_OpLsh16x64(v *Value) bool {
2115 v_1 := v.Args[1]
2116 v_0 := v.Args[0]
2117 b := v.Block
2118 typ := &b.Func.Config.Types
2119
2120
2121 for {
2122 t := v.Type
2123 x := v_0
2124 y := v_1
2125 v.reset(OpMIPS64AND)
2126 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2127 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2128 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2129 v2.AuxInt = int64ToAuxInt(64)
2130 v1.AddArg2(v2, y)
2131 v0.AddArg(v1)
2132 v3 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2133 v3.AddArg2(x, y)
2134 v.AddArg2(v0, v3)
2135 return true
2136 }
2137 }
2138 func rewriteValueMIPS64_OpLsh16x8(v *Value) bool {
2139 v_1 := v.Args[1]
2140 v_0 := v.Args[0]
2141 b := v.Block
2142 typ := &b.Func.Config.Types
2143
2144
2145 for {
2146 t := v.Type
2147 x := v_0
2148 y := v_1
2149 v.reset(OpMIPS64AND)
2150 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2151 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2152 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2153 v2.AuxInt = int64ToAuxInt(64)
2154 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2155 v3.AddArg(y)
2156 v1.AddArg2(v2, v3)
2157 v0.AddArg(v1)
2158 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2159 v4.AddArg2(x, v3)
2160 v.AddArg2(v0, v4)
2161 return true
2162 }
2163 }
2164 func rewriteValueMIPS64_OpLsh32x16(v *Value) bool {
2165 v_1 := v.Args[1]
2166 v_0 := v.Args[0]
2167 b := v.Block
2168 typ := &b.Func.Config.Types
2169
2170
2171 for {
2172 t := v.Type
2173 x := v_0
2174 y := v_1
2175 v.reset(OpMIPS64AND)
2176 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2177 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2178 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2179 v2.AuxInt = int64ToAuxInt(64)
2180 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2181 v3.AddArg(y)
2182 v1.AddArg2(v2, v3)
2183 v0.AddArg(v1)
2184 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2185 v4.AddArg2(x, v3)
2186 v.AddArg2(v0, v4)
2187 return true
2188 }
2189 }
2190 func rewriteValueMIPS64_OpLsh32x32(v *Value) bool {
2191 v_1 := v.Args[1]
2192 v_0 := v.Args[0]
2193 b := v.Block
2194 typ := &b.Func.Config.Types
2195
2196
2197 for {
2198 t := v.Type
2199 x := v_0
2200 y := v_1
2201 v.reset(OpMIPS64AND)
2202 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2203 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2204 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2205 v2.AuxInt = int64ToAuxInt(64)
2206 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2207 v3.AddArg(y)
2208 v1.AddArg2(v2, v3)
2209 v0.AddArg(v1)
2210 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2211 v4.AddArg2(x, v3)
2212 v.AddArg2(v0, v4)
2213 return true
2214 }
2215 }
2216 func rewriteValueMIPS64_OpLsh32x64(v *Value) bool {
2217 v_1 := v.Args[1]
2218 v_0 := v.Args[0]
2219 b := v.Block
2220 typ := &b.Func.Config.Types
2221
2222
2223 for {
2224 t := v.Type
2225 x := v_0
2226 y := v_1
2227 v.reset(OpMIPS64AND)
2228 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2229 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2230 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2231 v2.AuxInt = int64ToAuxInt(64)
2232 v1.AddArg2(v2, y)
2233 v0.AddArg(v1)
2234 v3 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2235 v3.AddArg2(x, y)
2236 v.AddArg2(v0, v3)
2237 return true
2238 }
2239 }
2240 func rewriteValueMIPS64_OpLsh32x8(v *Value) bool {
2241 v_1 := v.Args[1]
2242 v_0 := v.Args[0]
2243 b := v.Block
2244 typ := &b.Func.Config.Types
2245
2246
2247 for {
2248 t := v.Type
2249 x := v_0
2250 y := v_1
2251 v.reset(OpMIPS64AND)
2252 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2253 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2254 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2255 v2.AuxInt = int64ToAuxInt(64)
2256 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2257 v3.AddArg(y)
2258 v1.AddArg2(v2, v3)
2259 v0.AddArg(v1)
2260 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2261 v4.AddArg2(x, v3)
2262 v.AddArg2(v0, v4)
2263 return true
2264 }
2265 }
2266 func rewriteValueMIPS64_OpLsh64x16(v *Value) bool {
2267 v_1 := v.Args[1]
2268 v_0 := v.Args[0]
2269 b := v.Block
2270 typ := &b.Func.Config.Types
2271
2272
2273 for {
2274 t := v.Type
2275 x := v_0
2276 y := v_1
2277 v.reset(OpMIPS64AND)
2278 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2279 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2280 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2281 v2.AuxInt = int64ToAuxInt(64)
2282 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2283 v3.AddArg(y)
2284 v1.AddArg2(v2, v3)
2285 v0.AddArg(v1)
2286 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2287 v4.AddArg2(x, v3)
2288 v.AddArg2(v0, v4)
2289 return true
2290 }
2291 }
2292 func rewriteValueMIPS64_OpLsh64x32(v *Value) bool {
2293 v_1 := v.Args[1]
2294 v_0 := v.Args[0]
2295 b := v.Block
2296 typ := &b.Func.Config.Types
2297
2298
2299 for {
2300 t := v.Type
2301 x := v_0
2302 y := v_1
2303 v.reset(OpMIPS64AND)
2304 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2305 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2306 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2307 v2.AuxInt = int64ToAuxInt(64)
2308 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2309 v3.AddArg(y)
2310 v1.AddArg2(v2, v3)
2311 v0.AddArg(v1)
2312 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2313 v4.AddArg2(x, v3)
2314 v.AddArg2(v0, v4)
2315 return true
2316 }
2317 }
2318 func rewriteValueMIPS64_OpLsh64x64(v *Value) bool {
2319 v_1 := v.Args[1]
2320 v_0 := v.Args[0]
2321 b := v.Block
2322 typ := &b.Func.Config.Types
2323
2324
2325 for {
2326 t := v.Type
2327 x := v_0
2328 y := v_1
2329 v.reset(OpMIPS64AND)
2330 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2331 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2332 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2333 v2.AuxInt = int64ToAuxInt(64)
2334 v1.AddArg2(v2, y)
2335 v0.AddArg(v1)
2336 v3 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2337 v3.AddArg2(x, y)
2338 v.AddArg2(v0, v3)
2339 return true
2340 }
2341 }
2342 func rewriteValueMIPS64_OpLsh64x8(v *Value) bool {
2343 v_1 := v.Args[1]
2344 v_0 := v.Args[0]
2345 b := v.Block
2346 typ := &b.Func.Config.Types
2347
2348
2349 for {
2350 t := v.Type
2351 x := v_0
2352 y := v_1
2353 v.reset(OpMIPS64AND)
2354 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2355 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2356 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2357 v2.AuxInt = int64ToAuxInt(64)
2358 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2359 v3.AddArg(y)
2360 v1.AddArg2(v2, v3)
2361 v0.AddArg(v1)
2362 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2363 v4.AddArg2(x, v3)
2364 v.AddArg2(v0, v4)
2365 return true
2366 }
2367 }
2368 func rewriteValueMIPS64_OpLsh8x16(v *Value) bool {
2369 v_1 := v.Args[1]
2370 v_0 := v.Args[0]
2371 b := v.Block
2372 typ := &b.Func.Config.Types
2373
2374
2375 for {
2376 t := v.Type
2377 x := v_0
2378 y := v_1
2379 v.reset(OpMIPS64AND)
2380 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2381 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2382 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2383 v2.AuxInt = int64ToAuxInt(64)
2384 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2385 v3.AddArg(y)
2386 v1.AddArg2(v2, v3)
2387 v0.AddArg(v1)
2388 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2389 v4.AddArg2(x, v3)
2390 v.AddArg2(v0, v4)
2391 return true
2392 }
2393 }
2394 func rewriteValueMIPS64_OpLsh8x32(v *Value) bool {
2395 v_1 := v.Args[1]
2396 v_0 := v.Args[0]
2397 b := v.Block
2398 typ := &b.Func.Config.Types
2399
2400
2401 for {
2402 t := v.Type
2403 x := v_0
2404 y := v_1
2405 v.reset(OpMIPS64AND)
2406 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2407 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2408 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2409 v2.AuxInt = int64ToAuxInt(64)
2410 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2411 v3.AddArg(y)
2412 v1.AddArg2(v2, v3)
2413 v0.AddArg(v1)
2414 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2415 v4.AddArg2(x, v3)
2416 v.AddArg2(v0, v4)
2417 return true
2418 }
2419 }
2420 func rewriteValueMIPS64_OpLsh8x64(v *Value) bool {
2421 v_1 := v.Args[1]
2422 v_0 := v.Args[0]
2423 b := v.Block
2424 typ := &b.Func.Config.Types
2425
2426
2427 for {
2428 t := v.Type
2429 x := v_0
2430 y := v_1
2431 v.reset(OpMIPS64AND)
2432 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2433 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2434 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2435 v2.AuxInt = int64ToAuxInt(64)
2436 v1.AddArg2(v2, y)
2437 v0.AddArg(v1)
2438 v3 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2439 v3.AddArg2(x, y)
2440 v.AddArg2(v0, v3)
2441 return true
2442 }
2443 }
2444 func rewriteValueMIPS64_OpLsh8x8(v *Value) bool {
2445 v_1 := v.Args[1]
2446 v_0 := v.Args[0]
2447 b := v.Block
2448 typ := &b.Func.Config.Types
2449
2450
2451 for {
2452 t := v.Type
2453 x := v_0
2454 y := v_1
2455 v.reset(OpMIPS64AND)
2456 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
2457 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
2458 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
2459 v2.AuxInt = int64ToAuxInt(64)
2460 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2461 v3.AddArg(y)
2462 v1.AddArg2(v2, v3)
2463 v0.AddArg(v1)
2464 v4 := b.NewValue0(v.Pos, OpMIPS64SLLV, t)
2465 v4.AddArg2(x, v3)
2466 v.AddArg2(v0, v4)
2467 return true
2468 }
2469 }
2470 func rewriteValueMIPS64_OpMIPS64ADDV(v *Value) bool {
2471 v_1 := v.Args[1]
2472 v_0 := v.Args[0]
2473
2474
2475
2476 for {
2477 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2478 x := v_0
2479 if v_1.Op != OpMIPS64MOVVconst {
2480 continue
2481 }
2482 t := v_1.Type
2483 c := auxIntToInt64(v_1.AuxInt)
2484 if !(is32Bit(c) && !t.IsPtr()) {
2485 continue
2486 }
2487 v.reset(OpMIPS64ADDVconst)
2488 v.AuxInt = int64ToAuxInt(c)
2489 v.AddArg(x)
2490 return true
2491 }
2492 break
2493 }
2494
2495
2496 for {
2497 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2498 x := v_0
2499 if v_1.Op != OpMIPS64NEGV {
2500 continue
2501 }
2502 y := v_1.Args[0]
2503 v.reset(OpMIPS64SUBV)
2504 v.AddArg2(x, y)
2505 return true
2506 }
2507 break
2508 }
2509 return false
2510 }
2511 func rewriteValueMIPS64_OpMIPS64ADDVconst(v *Value) bool {
2512 v_0 := v.Args[0]
2513
2514
2515
2516 for {
2517 off1 := auxIntToInt64(v.AuxInt)
2518 if v_0.Op != OpMIPS64MOVVaddr {
2519 break
2520 }
2521 off2 := auxIntToInt32(v_0.AuxInt)
2522 sym := auxToSym(v_0.Aux)
2523 ptr := v_0.Args[0]
2524 if !(is32Bit(off1 + int64(off2))) {
2525 break
2526 }
2527 v.reset(OpMIPS64MOVVaddr)
2528 v.AuxInt = int32ToAuxInt(int32(off1) + int32(off2))
2529 v.Aux = symToAux(sym)
2530 v.AddArg(ptr)
2531 return true
2532 }
2533
2534
2535 for {
2536 if auxIntToInt64(v.AuxInt) != 0 {
2537 break
2538 }
2539 x := v_0
2540 v.copyOf(x)
2541 return true
2542 }
2543
2544
2545 for {
2546 c := auxIntToInt64(v.AuxInt)
2547 if v_0.Op != OpMIPS64MOVVconst {
2548 break
2549 }
2550 d := auxIntToInt64(v_0.AuxInt)
2551 v.reset(OpMIPS64MOVVconst)
2552 v.AuxInt = int64ToAuxInt(c + d)
2553 return true
2554 }
2555
2556
2557
2558 for {
2559 c := auxIntToInt64(v.AuxInt)
2560 if v_0.Op != OpMIPS64ADDVconst {
2561 break
2562 }
2563 d := auxIntToInt64(v_0.AuxInt)
2564 x := v_0.Args[0]
2565 if !(is32Bit(c + d)) {
2566 break
2567 }
2568 v.reset(OpMIPS64ADDVconst)
2569 v.AuxInt = int64ToAuxInt(c + d)
2570 v.AddArg(x)
2571 return true
2572 }
2573
2574
2575
2576 for {
2577 c := auxIntToInt64(v.AuxInt)
2578 if v_0.Op != OpMIPS64SUBVconst {
2579 break
2580 }
2581 d := auxIntToInt64(v_0.AuxInt)
2582 x := v_0.Args[0]
2583 if !(is32Bit(c - d)) {
2584 break
2585 }
2586 v.reset(OpMIPS64ADDVconst)
2587 v.AuxInt = int64ToAuxInt(c - d)
2588 v.AddArg(x)
2589 return true
2590 }
2591 return false
2592 }
2593 func rewriteValueMIPS64_OpMIPS64AND(v *Value) bool {
2594 v_1 := v.Args[1]
2595 v_0 := v.Args[0]
2596
2597
2598
2599 for {
2600 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2601 x := v_0
2602 if v_1.Op != OpMIPS64MOVVconst {
2603 continue
2604 }
2605 c := auxIntToInt64(v_1.AuxInt)
2606 if !(is32Bit(c)) {
2607 continue
2608 }
2609 v.reset(OpMIPS64ANDconst)
2610 v.AuxInt = int64ToAuxInt(c)
2611 v.AddArg(x)
2612 return true
2613 }
2614 break
2615 }
2616
2617
2618 for {
2619 x := v_0
2620 if x != v_1 {
2621 break
2622 }
2623 v.copyOf(x)
2624 return true
2625 }
2626 return false
2627 }
2628 func rewriteValueMIPS64_OpMIPS64ANDconst(v *Value) bool {
2629 v_0 := v.Args[0]
2630
2631
2632 for {
2633 if auxIntToInt64(v.AuxInt) != 0 {
2634 break
2635 }
2636 v.reset(OpMIPS64MOVVconst)
2637 v.AuxInt = int64ToAuxInt(0)
2638 return true
2639 }
2640
2641
2642 for {
2643 if auxIntToInt64(v.AuxInt) != -1 {
2644 break
2645 }
2646 x := v_0
2647 v.copyOf(x)
2648 return true
2649 }
2650
2651
2652 for {
2653 c := auxIntToInt64(v.AuxInt)
2654 if v_0.Op != OpMIPS64MOVVconst {
2655 break
2656 }
2657 d := auxIntToInt64(v_0.AuxInt)
2658 v.reset(OpMIPS64MOVVconst)
2659 v.AuxInt = int64ToAuxInt(c & d)
2660 return true
2661 }
2662
2663
2664 for {
2665 c := auxIntToInt64(v.AuxInt)
2666 if v_0.Op != OpMIPS64ANDconst {
2667 break
2668 }
2669 d := auxIntToInt64(v_0.AuxInt)
2670 x := v_0.Args[0]
2671 v.reset(OpMIPS64ANDconst)
2672 v.AuxInt = int64ToAuxInt(c & d)
2673 v.AddArg(x)
2674 return true
2675 }
2676 return false
2677 }
2678 func rewriteValueMIPS64_OpMIPS64LoweredAtomicAdd32(v *Value) bool {
2679 v_2 := v.Args[2]
2680 v_1 := v.Args[1]
2681 v_0 := v.Args[0]
2682
2683
2684
2685 for {
2686 ptr := v_0
2687 if v_1.Op != OpMIPS64MOVVconst {
2688 break
2689 }
2690 c := auxIntToInt64(v_1.AuxInt)
2691 mem := v_2
2692 if !(is32Bit(c)) {
2693 break
2694 }
2695 v.reset(OpMIPS64LoweredAtomicAddconst32)
2696 v.AuxInt = int32ToAuxInt(int32(c))
2697 v.AddArg2(ptr, mem)
2698 return true
2699 }
2700 return false
2701 }
2702 func rewriteValueMIPS64_OpMIPS64LoweredAtomicAdd64(v *Value) bool {
2703 v_2 := v.Args[2]
2704 v_1 := v.Args[1]
2705 v_0 := v.Args[0]
2706
2707
2708
2709 for {
2710 ptr := v_0
2711 if v_1.Op != OpMIPS64MOVVconst {
2712 break
2713 }
2714 c := auxIntToInt64(v_1.AuxInt)
2715 mem := v_2
2716 if !(is32Bit(c)) {
2717 break
2718 }
2719 v.reset(OpMIPS64LoweredAtomicAddconst64)
2720 v.AuxInt = int64ToAuxInt(c)
2721 v.AddArg2(ptr, mem)
2722 return true
2723 }
2724 return false
2725 }
2726 func rewriteValueMIPS64_OpMIPS64LoweredAtomicStore32(v *Value) bool {
2727 v_2 := v.Args[2]
2728 v_1 := v.Args[1]
2729 v_0 := v.Args[0]
2730
2731
2732 for {
2733 ptr := v_0
2734 if v_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_1.AuxInt) != 0 {
2735 break
2736 }
2737 mem := v_2
2738 v.reset(OpMIPS64LoweredAtomicStorezero32)
2739 v.AddArg2(ptr, mem)
2740 return true
2741 }
2742 return false
2743 }
2744 func rewriteValueMIPS64_OpMIPS64LoweredAtomicStore64(v *Value) bool {
2745 v_2 := v.Args[2]
2746 v_1 := v.Args[1]
2747 v_0 := v.Args[0]
2748
2749
2750 for {
2751 ptr := v_0
2752 if v_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_1.AuxInt) != 0 {
2753 break
2754 }
2755 mem := v_2
2756 v.reset(OpMIPS64LoweredAtomicStorezero64)
2757 v.AddArg2(ptr, mem)
2758 return true
2759 }
2760 return false
2761 }
2762 func rewriteValueMIPS64_OpMIPS64LoweredPanicBoundsCR(v *Value) bool {
2763 v_1 := v.Args[1]
2764 v_0 := v.Args[0]
2765
2766
2767 for {
2768 kind := auxIntToInt64(v.AuxInt)
2769 p := auxToPanicBoundsC(v.Aux)
2770 if v_0.Op != OpMIPS64MOVVconst {
2771 break
2772 }
2773 c := auxIntToInt64(v_0.AuxInt)
2774 mem := v_1
2775 v.reset(OpMIPS64LoweredPanicBoundsCC)
2776 v.AuxInt = int64ToAuxInt(kind)
2777 v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: p.C, Cy: c})
2778 v.AddArg(mem)
2779 return true
2780 }
2781 return false
2782 }
2783 func rewriteValueMIPS64_OpMIPS64LoweredPanicBoundsRC(v *Value) bool {
2784 v_1 := v.Args[1]
2785 v_0 := v.Args[0]
2786
2787
2788 for {
2789 kind := auxIntToInt64(v.AuxInt)
2790 p := auxToPanicBoundsC(v.Aux)
2791 if v_0.Op != OpMIPS64MOVVconst {
2792 break
2793 }
2794 c := auxIntToInt64(v_0.AuxInt)
2795 mem := v_1
2796 v.reset(OpMIPS64LoweredPanicBoundsCC)
2797 v.AuxInt = int64ToAuxInt(kind)
2798 v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: c, Cy: p.C})
2799 v.AddArg(mem)
2800 return true
2801 }
2802 return false
2803 }
2804 func rewriteValueMIPS64_OpMIPS64LoweredPanicBoundsRR(v *Value) bool {
2805 v_2 := v.Args[2]
2806 v_1 := v.Args[1]
2807 v_0 := v.Args[0]
2808
2809
2810 for {
2811 kind := auxIntToInt64(v.AuxInt)
2812 x := v_0
2813 if v_1.Op != OpMIPS64MOVVconst {
2814 break
2815 }
2816 c := auxIntToInt64(v_1.AuxInt)
2817 mem := v_2
2818 v.reset(OpMIPS64LoweredPanicBoundsRC)
2819 v.AuxInt = int64ToAuxInt(kind)
2820 v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
2821 v.AddArg2(x, mem)
2822 return true
2823 }
2824
2825
2826 for {
2827 kind := auxIntToInt64(v.AuxInt)
2828 if v_0.Op != OpMIPS64MOVVconst {
2829 break
2830 }
2831 c := auxIntToInt64(v_0.AuxInt)
2832 y := v_1
2833 mem := v_2
2834 v.reset(OpMIPS64LoweredPanicBoundsCR)
2835 v.AuxInt = int64ToAuxInt(kind)
2836 v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
2837 v.AddArg2(y, mem)
2838 return true
2839 }
2840 return false
2841 }
2842 func rewriteValueMIPS64_OpMIPS64MOVBUload(v *Value) bool {
2843 v_1 := v.Args[1]
2844 v_0 := v.Args[0]
2845 b := v.Block
2846 config := b.Func.Config
2847
2848
2849
2850 for {
2851 off1 := auxIntToInt32(v.AuxInt)
2852 sym := auxToSym(v.Aux)
2853 if v_0.Op != OpMIPS64ADDVconst {
2854 break
2855 }
2856 off2 := auxIntToInt64(v_0.AuxInt)
2857 ptr := v_0.Args[0]
2858 mem := v_1
2859 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
2860 break
2861 }
2862 v.reset(OpMIPS64MOVBUload)
2863 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
2864 v.Aux = symToAux(sym)
2865 v.AddArg2(ptr, mem)
2866 return true
2867 }
2868
2869
2870
2871 for {
2872 off1 := auxIntToInt32(v.AuxInt)
2873 sym1 := auxToSym(v.Aux)
2874 if v_0.Op != OpMIPS64MOVVaddr {
2875 break
2876 }
2877 off2 := auxIntToInt32(v_0.AuxInt)
2878 sym2 := auxToSym(v_0.Aux)
2879 ptr := v_0.Args[0]
2880 mem := v_1
2881 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
2882 break
2883 }
2884 v.reset(OpMIPS64MOVBUload)
2885 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
2886 v.Aux = symToAux(mergeSym(sym1, sym2))
2887 v.AddArg2(ptr, mem)
2888 return true
2889 }
2890
2891
2892
2893 for {
2894 off := auxIntToInt32(v.AuxInt)
2895 sym := auxToSym(v.Aux)
2896 if v_0.Op != OpSB || !(symIsRO(sym)) {
2897 break
2898 }
2899 v.reset(OpMIPS64MOVVconst)
2900 v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
2901 return true
2902 }
2903 return false
2904 }
2905 func rewriteValueMIPS64_OpMIPS64MOVBUreg(v *Value) bool {
2906 v_0 := v.Args[0]
2907
2908
2909 for {
2910 x := v_0
2911 if x.Op != OpMIPS64MOVBUload {
2912 break
2913 }
2914 v.reset(OpMIPS64MOVVreg)
2915 v.AddArg(x)
2916 return true
2917 }
2918
2919
2920 for {
2921 x := v_0
2922 if x.Op != OpMIPS64MOVBUreg {
2923 break
2924 }
2925 v.reset(OpMIPS64MOVVreg)
2926 v.AddArg(x)
2927 return true
2928 }
2929
2930
2931 for {
2932 if v_0.Op != OpMIPS64MOVVconst {
2933 break
2934 }
2935 c := auxIntToInt64(v_0.AuxInt)
2936 v.reset(OpMIPS64MOVVconst)
2937 v.AuxInt = int64ToAuxInt(int64(uint8(c)))
2938 return true
2939 }
2940 return false
2941 }
2942 func rewriteValueMIPS64_OpMIPS64MOVBload(v *Value) bool {
2943 v_1 := v.Args[1]
2944 v_0 := v.Args[0]
2945 b := v.Block
2946 config := b.Func.Config
2947
2948
2949
2950 for {
2951 off1 := auxIntToInt32(v.AuxInt)
2952 sym := auxToSym(v.Aux)
2953 if v_0.Op != OpMIPS64ADDVconst {
2954 break
2955 }
2956 off2 := auxIntToInt64(v_0.AuxInt)
2957 ptr := v_0.Args[0]
2958 mem := v_1
2959 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
2960 break
2961 }
2962 v.reset(OpMIPS64MOVBload)
2963 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
2964 v.Aux = symToAux(sym)
2965 v.AddArg2(ptr, mem)
2966 return true
2967 }
2968
2969
2970
2971 for {
2972 off1 := auxIntToInt32(v.AuxInt)
2973 sym1 := auxToSym(v.Aux)
2974 if v_0.Op != OpMIPS64MOVVaddr {
2975 break
2976 }
2977 off2 := auxIntToInt32(v_0.AuxInt)
2978 sym2 := auxToSym(v_0.Aux)
2979 ptr := v_0.Args[0]
2980 mem := v_1
2981 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
2982 break
2983 }
2984 v.reset(OpMIPS64MOVBload)
2985 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
2986 v.Aux = symToAux(mergeSym(sym1, sym2))
2987 v.AddArg2(ptr, mem)
2988 return true
2989 }
2990
2991
2992
2993 for {
2994 off := auxIntToInt32(v.AuxInt)
2995 sym := auxToSym(v.Aux)
2996 if v_0.Op != OpSB || !(symIsRO(sym)) {
2997 break
2998 }
2999 v.reset(OpMIPS64MOVVconst)
3000 v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, int64(off)))))
3001 return true
3002 }
3003 return false
3004 }
3005 func rewriteValueMIPS64_OpMIPS64MOVBreg(v *Value) bool {
3006 v_0 := v.Args[0]
3007
3008
3009 for {
3010 x := v_0
3011 if x.Op != OpMIPS64MOVBload {
3012 break
3013 }
3014 v.reset(OpMIPS64MOVVreg)
3015 v.AddArg(x)
3016 return true
3017 }
3018
3019
3020 for {
3021 x := v_0
3022 if x.Op != OpMIPS64MOVBreg {
3023 break
3024 }
3025 v.reset(OpMIPS64MOVVreg)
3026 v.AddArg(x)
3027 return true
3028 }
3029
3030
3031 for {
3032 if v_0.Op != OpMIPS64MOVVconst {
3033 break
3034 }
3035 c := auxIntToInt64(v_0.AuxInt)
3036 v.reset(OpMIPS64MOVVconst)
3037 v.AuxInt = int64ToAuxInt(int64(int8(c)))
3038 return true
3039 }
3040 return false
3041 }
3042 func rewriteValueMIPS64_OpMIPS64MOVBstore(v *Value) bool {
3043 v_2 := v.Args[2]
3044 v_1 := v.Args[1]
3045 v_0 := v.Args[0]
3046 b := v.Block
3047 config := b.Func.Config
3048
3049
3050
3051 for {
3052 off1 := auxIntToInt32(v.AuxInt)
3053 sym := auxToSym(v.Aux)
3054 if v_0.Op != OpMIPS64ADDVconst {
3055 break
3056 }
3057 off2 := auxIntToInt64(v_0.AuxInt)
3058 ptr := v_0.Args[0]
3059 val := v_1
3060 mem := v_2
3061 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3062 break
3063 }
3064 v.reset(OpMIPS64MOVBstore)
3065 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3066 v.Aux = symToAux(sym)
3067 v.AddArg3(ptr, val, mem)
3068 return true
3069 }
3070
3071
3072
3073 for {
3074 off1 := auxIntToInt32(v.AuxInt)
3075 sym1 := auxToSym(v.Aux)
3076 if v_0.Op != OpMIPS64MOVVaddr {
3077 break
3078 }
3079 off2 := auxIntToInt32(v_0.AuxInt)
3080 sym2 := auxToSym(v_0.Aux)
3081 ptr := v_0.Args[0]
3082 val := v_1
3083 mem := v_2
3084 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3085 break
3086 }
3087 v.reset(OpMIPS64MOVBstore)
3088 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3089 v.Aux = symToAux(mergeSym(sym1, sym2))
3090 v.AddArg3(ptr, val, mem)
3091 return true
3092 }
3093
3094
3095 for {
3096 off := auxIntToInt32(v.AuxInt)
3097 sym := auxToSym(v.Aux)
3098 ptr := v_0
3099 if v_1.Op != OpMIPS64MOVBreg {
3100 break
3101 }
3102 x := v_1.Args[0]
3103 mem := v_2
3104 v.reset(OpMIPS64MOVBstore)
3105 v.AuxInt = int32ToAuxInt(off)
3106 v.Aux = symToAux(sym)
3107 v.AddArg3(ptr, x, mem)
3108 return true
3109 }
3110
3111
3112 for {
3113 off := auxIntToInt32(v.AuxInt)
3114 sym := auxToSym(v.Aux)
3115 ptr := v_0
3116 if v_1.Op != OpMIPS64MOVBUreg {
3117 break
3118 }
3119 x := v_1.Args[0]
3120 mem := v_2
3121 v.reset(OpMIPS64MOVBstore)
3122 v.AuxInt = int32ToAuxInt(off)
3123 v.Aux = symToAux(sym)
3124 v.AddArg3(ptr, x, mem)
3125 return true
3126 }
3127
3128
3129 for {
3130 off := auxIntToInt32(v.AuxInt)
3131 sym := auxToSym(v.Aux)
3132 ptr := v_0
3133 if v_1.Op != OpMIPS64MOVHreg {
3134 break
3135 }
3136 x := v_1.Args[0]
3137 mem := v_2
3138 v.reset(OpMIPS64MOVBstore)
3139 v.AuxInt = int32ToAuxInt(off)
3140 v.Aux = symToAux(sym)
3141 v.AddArg3(ptr, x, mem)
3142 return true
3143 }
3144
3145
3146 for {
3147 off := auxIntToInt32(v.AuxInt)
3148 sym := auxToSym(v.Aux)
3149 ptr := v_0
3150 if v_1.Op != OpMIPS64MOVHUreg {
3151 break
3152 }
3153 x := v_1.Args[0]
3154 mem := v_2
3155 v.reset(OpMIPS64MOVBstore)
3156 v.AuxInt = int32ToAuxInt(off)
3157 v.Aux = symToAux(sym)
3158 v.AddArg3(ptr, x, mem)
3159 return true
3160 }
3161
3162
3163 for {
3164 off := auxIntToInt32(v.AuxInt)
3165 sym := auxToSym(v.Aux)
3166 ptr := v_0
3167 if v_1.Op != OpMIPS64MOVWreg {
3168 break
3169 }
3170 x := v_1.Args[0]
3171 mem := v_2
3172 v.reset(OpMIPS64MOVBstore)
3173 v.AuxInt = int32ToAuxInt(off)
3174 v.Aux = symToAux(sym)
3175 v.AddArg3(ptr, x, mem)
3176 return true
3177 }
3178
3179
3180 for {
3181 off := auxIntToInt32(v.AuxInt)
3182 sym := auxToSym(v.Aux)
3183 ptr := v_0
3184 if v_1.Op != OpMIPS64MOVWUreg {
3185 break
3186 }
3187 x := v_1.Args[0]
3188 mem := v_2
3189 v.reset(OpMIPS64MOVBstore)
3190 v.AuxInt = int32ToAuxInt(off)
3191 v.Aux = symToAux(sym)
3192 v.AddArg3(ptr, x, mem)
3193 return true
3194 }
3195 return false
3196 }
3197 func rewriteValueMIPS64_OpMIPS64MOVDF(v *Value) bool {
3198 v_0 := v.Args[0]
3199
3200
3201 for {
3202 if v_0.Op != OpMIPS64ABSD {
3203 break
3204 }
3205 v_0_0 := v_0.Args[0]
3206 if v_0_0.Op != OpMIPS64MOVFD {
3207 break
3208 }
3209 x := v_0_0.Args[0]
3210 v.reset(OpMIPS64ABSF)
3211 v.AddArg(x)
3212 return true
3213 }
3214
3215
3216 for {
3217 if v_0.Op != OpMIPS64SQRTD {
3218 break
3219 }
3220 v_0_0 := v_0.Args[0]
3221 if v_0_0.Op != OpMIPS64MOVFD {
3222 break
3223 }
3224 x := v_0_0.Args[0]
3225 v.reset(OpMIPS64SQRTF)
3226 v.AddArg(x)
3227 return true
3228 }
3229 return false
3230 }
3231 func rewriteValueMIPS64_OpMIPS64MOVDload(v *Value) bool {
3232 v_1 := v.Args[1]
3233 v_0 := v.Args[0]
3234 b := v.Block
3235 config := b.Func.Config
3236
3237
3238 for {
3239 off := auxIntToInt32(v.AuxInt)
3240 sym := auxToSym(v.Aux)
3241 ptr := v_0
3242 if v_1.Op != OpMIPS64MOVVstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
3243 break
3244 }
3245 val := v_1.Args[1]
3246 if ptr != v_1.Args[0] {
3247 break
3248 }
3249 v.reset(OpMIPS64MOVVgpfp)
3250 v.AddArg(val)
3251 return true
3252 }
3253
3254
3255
3256 for {
3257 off1 := auxIntToInt32(v.AuxInt)
3258 sym := auxToSym(v.Aux)
3259 if v_0.Op != OpMIPS64ADDVconst {
3260 break
3261 }
3262 off2 := auxIntToInt64(v_0.AuxInt)
3263 ptr := v_0.Args[0]
3264 mem := v_1
3265 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3266 break
3267 }
3268 v.reset(OpMIPS64MOVDload)
3269 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3270 v.Aux = symToAux(sym)
3271 v.AddArg2(ptr, mem)
3272 return true
3273 }
3274
3275
3276
3277 for {
3278 off1 := auxIntToInt32(v.AuxInt)
3279 sym1 := auxToSym(v.Aux)
3280 if v_0.Op != OpMIPS64MOVVaddr {
3281 break
3282 }
3283 off2 := auxIntToInt32(v_0.AuxInt)
3284 sym2 := auxToSym(v_0.Aux)
3285 ptr := v_0.Args[0]
3286 mem := v_1
3287 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3288 break
3289 }
3290 v.reset(OpMIPS64MOVDload)
3291 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3292 v.Aux = symToAux(mergeSym(sym1, sym2))
3293 v.AddArg2(ptr, mem)
3294 return true
3295 }
3296 return false
3297 }
3298 func rewriteValueMIPS64_OpMIPS64MOVDstore(v *Value) bool {
3299 v_2 := v.Args[2]
3300 v_1 := v.Args[1]
3301 v_0 := v.Args[0]
3302 b := v.Block
3303 config := b.Func.Config
3304
3305
3306 for {
3307 off := auxIntToInt32(v.AuxInt)
3308 sym := auxToSym(v.Aux)
3309 ptr := v_0
3310 if v_1.Op != OpMIPS64MOVVgpfp {
3311 break
3312 }
3313 val := v_1.Args[0]
3314 mem := v_2
3315 v.reset(OpMIPS64MOVVstore)
3316 v.AuxInt = int32ToAuxInt(off)
3317 v.Aux = symToAux(sym)
3318 v.AddArg3(ptr, val, mem)
3319 return true
3320 }
3321
3322
3323
3324 for {
3325 off1 := auxIntToInt32(v.AuxInt)
3326 sym := auxToSym(v.Aux)
3327 if v_0.Op != OpMIPS64ADDVconst {
3328 break
3329 }
3330 off2 := auxIntToInt64(v_0.AuxInt)
3331 ptr := v_0.Args[0]
3332 val := v_1
3333 mem := v_2
3334 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3335 break
3336 }
3337 v.reset(OpMIPS64MOVDstore)
3338 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3339 v.Aux = symToAux(sym)
3340 v.AddArg3(ptr, val, mem)
3341 return true
3342 }
3343
3344
3345
3346 for {
3347 off1 := auxIntToInt32(v.AuxInt)
3348 sym1 := auxToSym(v.Aux)
3349 if v_0.Op != OpMIPS64MOVVaddr {
3350 break
3351 }
3352 off2 := auxIntToInt32(v_0.AuxInt)
3353 sym2 := auxToSym(v_0.Aux)
3354 ptr := v_0.Args[0]
3355 val := v_1
3356 mem := v_2
3357 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3358 break
3359 }
3360 v.reset(OpMIPS64MOVDstore)
3361 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3362 v.Aux = symToAux(mergeSym(sym1, sym2))
3363 v.AddArg3(ptr, val, mem)
3364 return true
3365 }
3366 return false
3367 }
3368 func rewriteValueMIPS64_OpMIPS64MOVFload(v *Value) bool {
3369 v_1 := v.Args[1]
3370 v_0 := v.Args[0]
3371 b := v.Block
3372 config := b.Func.Config
3373
3374
3375 for {
3376 off := auxIntToInt32(v.AuxInt)
3377 sym := auxToSym(v.Aux)
3378 ptr := v_0
3379 if v_1.Op != OpMIPS64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
3380 break
3381 }
3382 val := v_1.Args[1]
3383 if ptr != v_1.Args[0] {
3384 break
3385 }
3386 v.reset(OpMIPS64MOVWgpfp)
3387 v.AddArg(val)
3388 return true
3389 }
3390
3391
3392
3393 for {
3394 off1 := auxIntToInt32(v.AuxInt)
3395 sym := auxToSym(v.Aux)
3396 if v_0.Op != OpMIPS64ADDVconst {
3397 break
3398 }
3399 off2 := auxIntToInt64(v_0.AuxInt)
3400 ptr := v_0.Args[0]
3401 mem := v_1
3402 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3403 break
3404 }
3405 v.reset(OpMIPS64MOVFload)
3406 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3407 v.Aux = symToAux(sym)
3408 v.AddArg2(ptr, mem)
3409 return true
3410 }
3411
3412
3413
3414 for {
3415 off1 := auxIntToInt32(v.AuxInt)
3416 sym1 := auxToSym(v.Aux)
3417 if v_0.Op != OpMIPS64MOVVaddr {
3418 break
3419 }
3420 off2 := auxIntToInt32(v_0.AuxInt)
3421 sym2 := auxToSym(v_0.Aux)
3422 ptr := v_0.Args[0]
3423 mem := v_1
3424 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3425 break
3426 }
3427 v.reset(OpMIPS64MOVFload)
3428 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3429 v.Aux = symToAux(mergeSym(sym1, sym2))
3430 v.AddArg2(ptr, mem)
3431 return true
3432 }
3433 return false
3434 }
3435 func rewriteValueMIPS64_OpMIPS64MOVFstore(v *Value) bool {
3436 v_2 := v.Args[2]
3437 v_1 := v.Args[1]
3438 v_0 := v.Args[0]
3439 b := v.Block
3440 config := b.Func.Config
3441
3442
3443 for {
3444 off := auxIntToInt32(v.AuxInt)
3445 sym := auxToSym(v.Aux)
3446 ptr := v_0
3447 if v_1.Op != OpMIPS64MOVWgpfp {
3448 break
3449 }
3450 val := v_1.Args[0]
3451 mem := v_2
3452 v.reset(OpMIPS64MOVWstore)
3453 v.AuxInt = int32ToAuxInt(off)
3454 v.Aux = symToAux(sym)
3455 v.AddArg3(ptr, val, mem)
3456 return true
3457 }
3458
3459
3460
3461 for {
3462 off1 := auxIntToInt32(v.AuxInt)
3463 sym := auxToSym(v.Aux)
3464 if v_0.Op != OpMIPS64ADDVconst {
3465 break
3466 }
3467 off2 := auxIntToInt64(v_0.AuxInt)
3468 ptr := v_0.Args[0]
3469 val := v_1
3470 mem := v_2
3471 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3472 break
3473 }
3474 v.reset(OpMIPS64MOVFstore)
3475 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3476 v.Aux = symToAux(sym)
3477 v.AddArg3(ptr, val, mem)
3478 return true
3479 }
3480
3481
3482
3483 for {
3484 off1 := auxIntToInt32(v.AuxInt)
3485 sym1 := auxToSym(v.Aux)
3486 if v_0.Op != OpMIPS64MOVVaddr {
3487 break
3488 }
3489 off2 := auxIntToInt32(v_0.AuxInt)
3490 sym2 := auxToSym(v_0.Aux)
3491 ptr := v_0.Args[0]
3492 val := v_1
3493 mem := v_2
3494 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3495 break
3496 }
3497 v.reset(OpMIPS64MOVFstore)
3498 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3499 v.Aux = symToAux(mergeSym(sym1, sym2))
3500 v.AddArg3(ptr, val, mem)
3501 return true
3502 }
3503 return false
3504 }
3505 func rewriteValueMIPS64_OpMIPS64MOVHUload(v *Value) bool {
3506 v_1 := v.Args[1]
3507 v_0 := v.Args[0]
3508 b := v.Block
3509 config := b.Func.Config
3510
3511
3512
3513 for {
3514 off1 := auxIntToInt32(v.AuxInt)
3515 sym := auxToSym(v.Aux)
3516 if v_0.Op != OpMIPS64ADDVconst {
3517 break
3518 }
3519 off2 := auxIntToInt64(v_0.AuxInt)
3520 ptr := v_0.Args[0]
3521 mem := v_1
3522 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3523 break
3524 }
3525 v.reset(OpMIPS64MOVHUload)
3526 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3527 v.Aux = symToAux(sym)
3528 v.AddArg2(ptr, mem)
3529 return true
3530 }
3531
3532
3533
3534 for {
3535 off1 := auxIntToInt32(v.AuxInt)
3536 sym1 := auxToSym(v.Aux)
3537 if v_0.Op != OpMIPS64MOVVaddr {
3538 break
3539 }
3540 off2 := auxIntToInt32(v_0.AuxInt)
3541 sym2 := auxToSym(v_0.Aux)
3542 ptr := v_0.Args[0]
3543 mem := v_1
3544 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3545 break
3546 }
3547 v.reset(OpMIPS64MOVHUload)
3548 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3549 v.Aux = symToAux(mergeSym(sym1, sym2))
3550 v.AddArg2(ptr, mem)
3551 return true
3552 }
3553
3554
3555
3556 for {
3557 off := auxIntToInt32(v.AuxInt)
3558 sym := auxToSym(v.Aux)
3559 if v_0.Op != OpSB || !(symIsRO(sym)) {
3560 break
3561 }
3562 v.reset(OpMIPS64MOVVconst)
3563 v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
3564 return true
3565 }
3566 return false
3567 }
3568 func rewriteValueMIPS64_OpMIPS64MOVHUreg(v *Value) bool {
3569 v_0 := v.Args[0]
3570
3571
3572 for {
3573 x := v_0
3574 if x.Op != OpMIPS64MOVBUload {
3575 break
3576 }
3577 v.reset(OpMIPS64MOVVreg)
3578 v.AddArg(x)
3579 return true
3580 }
3581
3582
3583 for {
3584 x := v_0
3585 if x.Op != OpMIPS64MOVHUload {
3586 break
3587 }
3588 v.reset(OpMIPS64MOVVreg)
3589 v.AddArg(x)
3590 return true
3591 }
3592
3593
3594 for {
3595 x := v_0
3596 if x.Op != OpMIPS64MOVBUreg {
3597 break
3598 }
3599 v.reset(OpMIPS64MOVVreg)
3600 v.AddArg(x)
3601 return true
3602 }
3603
3604
3605 for {
3606 x := v_0
3607 if x.Op != OpMIPS64MOVHUreg {
3608 break
3609 }
3610 v.reset(OpMIPS64MOVVreg)
3611 v.AddArg(x)
3612 return true
3613 }
3614
3615
3616 for {
3617 if v_0.Op != OpMIPS64MOVVconst {
3618 break
3619 }
3620 c := auxIntToInt64(v_0.AuxInt)
3621 v.reset(OpMIPS64MOVVconst)
3622 v.AuxInt = int64ToAuxInt(int64(uint16(c)))
3623 return true
3624 }
3625 return false
3626 }
3627 func rewriteValueMIPS64_OpMIPS64MOVHload(v *Value) bool {
3628 v_1 := v.Args[1]
3629 v_0 := v.Args[0]
3630 b := v.Block
3631 config := b.Func.Config
3632
3633
3634
3635 for {
3636 off1 := auxIntToInt32(v.AuxInt)
3637 sym := auxToSym(v.Aux)
3638 if v_0.Op != OpMIPS64ADDVconst {
3639 break
3640 }
3641 off2 := auxIntToInt64(v_0.AuxInt)
3642 ptr := v_0.Args[0]
3643 mem := v_1
3644 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3645 break
3646 }
3647 v.reset(OpMIPS64MOVHload)
3648 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3649 v.Aux = symToAux(sym)
3650 v.AddArg2(ptr, mem)
3651 return true
3652 }
3653
3654
3655
3656 for {
3657 off1 := auxIntToInt32(v.AuxInt)
3658 sym1 := auxToSym(v.Aux)
3659 if v_0.Op != OpMIPS64MOVVaddr {
3660 break
3661 }
3662 off2 := auxIntToInt32(v_0.AuxInt)
3663 sym2 := auxToSym(v_0.Aux)
3664 ptr := v_0.Args[0]
3665 mem := v_1
3666 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3667 break
3668 }
3669 v.reset(OpMIPS64MOVHload)
3670 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3671 v.Aux = symToAux(mergeSym(sym1, sym2))
3672 v.AddArg2(ptr, mem)
3673 return true
3674 }
3675
3676
3677
3678 for {
3679 off := auxIntToInt32(v.AuxInt)
3680 sym := auxToSym(v.Aux)
3681 if v_0.Op != OpSB || !(symIsRO(sym)) {
3682 break
3683 }
3684 v.reset(OpMIPS64MOVVconst)
3685 v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
3686 return true
3687 }
3688 return false
3689 }
3690 func rewriteValueMIPS64_OpMIPS64MOVHreg(v *Value) bool {
3691 v_0 := v.Args[0]
3692
3693
3694 for {
3695 x := v_0
3696 if x.Op != OpMIPS64MOVBload {
3697 break
3698 }
3699 v.reset(OpMIPS64MOVVreg)
3700 v.AddArg(x)
3701 return true
3702 }
3703
3704
3705 for {
3706 x := v_0
3707 if x.Op != OpMIPS64MOVBUload {
3708 break
3709 }
3710 v.reset(OpMIPS64MOVVreg)
3711 v.AddArg(x)
3712 return true
3713 }
3714
3715
3716 for {
3717 x := v_0
3718 if x.Op != OpMIPS64MOVHload {
3719 break
3720 }
3721 v.reset(OpMIPS64MOVVreg)
3722 v.AddArg(x)
3723 return true
3724 }
3725
3726
3727 for {
3728 x := v_0
3729 if x.Op != OpMIPS64MOVBreg {
3730 break
3731 }
3732 v.reset(OpMIPS64MOVVreg)
3733 v.AddArg(x)
3734 return true
3735 }
3736
3737
3738 for {
3739 x := v_0
3740 if x.Op != OpMIPS64MOVBUreg {
3741 break
3742 }
3743 v.reset(OpMIPS64MOVVreg)
3744 v.AddArg(x)
3745 return true
3746 }
3747
3748
3749 for {
3750 x := v_0
3751 if x.Op != OpMIPS64MOVHreg {
3752 break
3753 }
3754 v.reset(OpMIPS64MOVVreg)
3755 v.AddArg(x)
3756 return true
3757 }
3758
3759
3760 for {
3761 if v_0.Op != OpMIPS64MOVVconst {
3762 break
3763 }
3764 c := auxIntToInt64(v_0.AuxInt)
3765 v.reset(OpMIPS64MOVVconst)
3766 v.AuxInt = int64ToAuxInt(int64(int16(c)))
3767 return true
3768 }
3769 return false
3770 }
3771 func rewriteValueMIPS64_OpMIPS64MOVHstore(v *Value) bool {
3772 v_2 := v.Args[2]
3773 v_1 := v.Args[1]
3774 v_0 := v.Args[0]
3775 b := v.Block
3776 config := b.Func.Config
3777
3778
3779
3780 for {
3781 off1 := auxIntToInt32(v.AuxInt)
3782 sym := auxToSym(v.Aux)
3783 if v_0.Op != OpMIPS64ADDVconst {
3784 break
3785 }
3786 off2 := auxIntToInt64(v_0.AuxInt)
3787 ptr := v_0.Args[0]
3788 val := v_1
3789 mem := v_2
3790 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3791 break
3792 }
3793 v.reset(OpMIPS64MOVHstore)
3794 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3795 v.Aux = symToAux(sym)
3796 v.AddArg3(ptr, val, mem)
3797 return true
3798 }
3799
3800
3801
3802 for {
3803 off1 := auxIntToInt32(v.AuxInt)
3804 sym1 := auxToSym(v.Aux)
3805 if v_0.Op != OpMIPS64MOVVaddr {
3806 break
3807 }
3808 off2 := auxIntToInt32(v_0.AuxInt)
3809 sym2 := auxToSym(v_0.Aux)
3810 ptr := v_0.Args[0]
3811 val := v_1
3812 mem := v_2
3813 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3814 break
3815 }
3816 v.reset(OpMIPS64MOVHstore)
3817 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3818 v.Aux = symToAux(mergeSym(sym1, sym2))
3819 v.AddArg3(ptr, val, mem)
3820 return true
3821 }
3822
3823
3824 for {
3825 off := auxIntToInt32(v.AuxInt)
3826 sym := auxToSym(v.Aux)
3827 ptr := v_0
3828 if v_1.Op != OpMIPS64MOVHreg {
3829 break
3830 }
3831 x := v_1.Args[0]
3832 mem := v_2
3833 v.reset(OpMIPS64MOVHstore)
3834 v.AuxInt = int32ToAuxInt(off)
3835 v.Aux = symToAux(sym)
3836 v.AddArg3(ptr, x, mem)
3837 return true
3838 }
3839
3840
3841 for {
3842 off := auxIntToInt32(v.AuxInt)
3843 sym := auxToSym(v.Aux)
3844 ptr := v_0
3845 if v_1.Op != OpMIPS64MOVHUreg {
3846 break
3847 }
3848 x := v_1.Args[0]
3849 mem := v_2
3850 v.reset(OpMIPS64MOVHstore)
3851 v.AuxInt = int32ToAuxInt(off)
3852 v.Aux = symToAux(sym)
3853 v.AddArg3(ptr, x, mem)
3854 return true
3855 }
3856
3857
3858 for {
3859 off := auxIntToInt32(v.AuxInt)
3860 sym := auxToSym(v.Aux)
3861 ptr := v_0
3862 if v_1.Op != OpMIPS64MOVWreg {
3863 break
3864 }
3865 x := v_1.Args[0]
3866 mem := v_2
3867 v.reset(OpMIPS64MOVHstore)
3868 v.AuxInt = int32ToAuxInt(off)
3869 v.Aux = symToAux(sym)
3870 v.AddArg3(ptr, x, mem)
3871 return true
3872 }
3873
3874
3875 for {
3876 off := auxIntToInt32(v.AuxInt)
3877 sym := auxToSym(v.Aux)
3878 ptr := v_0
3879 if v_1.Op != OpMIPS64MOVWUreg {
3880 break
3881 }
3882 x := v_1.Args[0]
3883 mem := v_2
3884 v.reset(OpMIPS64MOVHstore)
3885 v.AuxInt = int32ToAuxInt(off)
3886 v.Aux = symToAux(sym)
3887 v.AddArg3(ptr, x, mem)
3888 return true
3889 }
3890 return false
3891 }
3892 func rewriteValueMIPS64_OpMIPS64MOVVload(v *Value) bool {
3893 v_1 := v.Args[1]
3894 v_0 := v.Args[0]
3895 b := v.Block
3896 config := b.Func.Config
3897
3898
3899 for {
3900 off := auxIntToInt32(v.AuxInt)
3901 sym := auxToSym(v.Aux)
3902 ptr := v_0
3903 if v_1.Op != OpMIPS64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
3904 break
3905 }
3906 val := v_1.Args[1]
3907 if ptr != v_1.Args[0] {
3908 break
3909 }
3910 v.reset(OpMIPS64MOVVfpgp)
3911 v.AddArg(val)
3912 return true
3913 }
3914
3915
3916
3917 for {
3918 off1 := auxIntToInt32(v.AuxInt)
3919 sym := auxToSym(v.Aux)
3920 if v_0.Op != OpMIPS64ADDVconst {
3921 break
3922 }
3923 off2 := auxIntToInt64(v_0.AuxInt)
3924 ptr := v_0.Args[0]
3925 mem := v_1
3926 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3927 break
3928 }
3929 v.reset(OpMIPS64MOVVload)
3930 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3931 v.Aux = symToAux(sym)
3932 v.AddArg2(ptr, mem)
3933 return true
3934 }
3935
3936
3937
3938 for {
3939 off1 := auxIntToInt32(v.AuxInt)
3940 sym1 := auxToSym(v.Aux)
3941 if v_0.Op != OpMIPS64MOVVaddr {
3942 break
3943 }
3944 off2 := auxIntToInt32(v_0.AuxInt)
3945 sym2 := auxToSym(v_0.Aux)
3946 ptr := v_0.Args[0]
3947 mem := v_1
3948 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
3949 break
3950 }
3951 v.reset(OpMIPS64MOVVload)
3952 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
3953 v.Aux = symToAux(mergeSym(sym1, sym2))
3954 v.AddArg2(ptr, mem)
3955 return true
3956 }
3957
3958
3959
3960 for {
3961 off := auxIntToInt32(v.AuxInt)
3962 sym := auxToSym(v.Aux)
3963 if v_0.Op != OpSB || !(symIsRO(sym)) {
3964 break
3965 }
3966 v.reset(OpMIPS64MOVVconst)
3967 v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
3968 return true
3969 }
3970 return false
3971 }
3972 func rewriteValueMIPS64_OpMIPS64MOVVnop(v *Value) bool {
3973 v_0 := v.Args[0]
3974
3975
3976 for {
3977 if v_0.Op != OpMIPS64MOVVconst {
3978 break
3979 }
3980 c := auxIntToInt64(v_0.AuxInt)
3981 v.reset(OpMIPS64MOVVconst)
3982 v.AuxInt = int64ToAuxInt(c)
3983 return true
3984 }
3985 return false
3986 }
3987 func rewriteValueMIPS64_OpMIPS64MOVVreg(v *Value) bool {
3988 v_0 := v.Args[0]
3989
3990
3991
3992 for {
3993 x := v_0
3994 if !(x.Uses == 1) {
3995 break
3996 }
3997 v.reset(OpMIPS64MOVVnop)
3998 v.AddArg(x)
3999 return true
4000 }
4001
4002
4003 for {
4004 if v_0.Op != OpMIPS64MOVVconst {
4005 break
4006 }
4007 c := auxIntToInt64(v_0.AuxInt)
4008 v.reset(OpMIPS64MOVVconst)
4009 v.AuxInt = int64ToAuxInt(c)
4010 return true
4011 }
4012 return false
4013 }
4014 func rewriteValueMIPS64_OpMIPS64MOVVstore(v *Value) bool {
4015 v_2 := v.Args[2]
4016 v_1 := v.Args[1]
4017 v_0 := v.Args[0]
4018 b := v.Block
4019 config := b.Func.Config
4020
4021
4022 for {
4023 off := auxIntToInt32(v.AuxInt)
4024 sym := auxToSym(v.Aux)
4025 ptr := v_0
4026 if v_1.Op != OpMIPS64MOVVfpgp {
4027 break
4028 }
4029 val := v_1.Args[0]
4030 mem := v_2
4031 v.reset(OpMIPS64MOVDstore)
4032 v.AuxInt = int32ToAuxInt(off)
4033 v.Aux = symToAux(sym)
4034 v.AddArg3(ptr, val, mem)
4035 return true
4036 }
4037
4038
4039
4040 for {
4041 off1 := auxIntToInt32(v.AuxInt)
4042 sym := auxToSym(v.Aux)
4043 if v_0.Op != OpMIPS64ADDVconst {
4044 break
4045 }
4046 off2 := auxIntToInt64(v_0.AuxInt)
4047 ptr := v_0.Args[0]
4048 val := v_1
4049 mem := v_2
4050 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
4051 break
4052 }
4053 v.reset(OpMIPS64MOVVstore)
4054 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
4055 v.Aux = symToAux(sym)
4056 v.AddArg3(ptr, val, mem)
4057 return true
4058 }
4059
4060
4061
4062 for {
4063 off1 := auxIntToInt32(v.AuxInt)
4064 sym1 := auxToSym(v.Aux)
4065 if v_0.Op != OpMIPS64MOVVaddr {
4066 break
4067 }
4068 off2 := auxIntToInt32(v_0.AuxInt)
4069 sym2 := auxToSym(v_0.Aux)
4070 ptr := v_0.Args[0]
4071 val := v_1
4072 mem := v_2
4073 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
4074 break
4075 }
4076 v.reset(OpMIPS64MOVVstore)
4077 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
4078 v.Aux = symToAux(mergeSym(sym1, sym2))
4079 v.AddArg3(ptr, val, mem)
4080 return true
4081 }
4082 return false
4083 }
4084 func rewriteValueMIPS64_OpMIPS64MOVWUload(v *Value) bool {
4085 v_1 := v.Args[1]
4086 v_0 := v.Args[0]
4087 b := v.Block
4088 config := b.Func.Config
4089 typ := &b.Func.Config.Types
4090
4091
4092 for {
4093 off := auxIntToInt32(v.AuxInt)
4094 sym := auxToSym(v.Aux)
4095 ptr := v_0
4096 if v_1.Op != OpMIPS64MOVFstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
4097 break
4098 }
4099 val := v_1.Args[1]
4100 if ptr != v_1.Args[0] {
4101 break
4102 }
4103 v.reset(OpZeroExt32to64)
4104 v0 := b.NewValue0(v_1.Pos, OpMIPS64MOVWfpgp, typ.Float32)
4105 v0.AddArg(val)
4106 v.AddArg(v0)
4107 return true
4108 }
4109
4110
4111
4112 for {
4113 off1 := auxIntToInt32(v.AuxInt)
4114 sym := auxToSym(v.Aux)
4115 if v_0.Op != OpMIPS64ADDVconst {
4116 break
4117 }
4118 off2 := auxIntToInt64(v_0.AuxInt)
4119 ptr := v_0.Args[0]
4120 mem := v_1
4121 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
4122 break
4123 }
4124 v.reset(OpMIPS64MOVWUload)
4125 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
4126 v.Aux = symToAux(sym)
4127 v.AddArg2(ptr, mem)
4128 return true
4129 }
4130
4131
4132
4133 for {
4134 off1 := auxIntToInt32(v.AuxInt)
4135 sym1 := auxToSym(v.Aux)
4136 if v_0.Op != OpMIPS64MOVVaddr {
4137 break
4138 }
4139 off2 := auxIntToInt32(v_0.AuxInt)
4140 sym2 := auxToSym(v_0.Aux)
4141 ptr := v_0.Args[0]
4142 mem := v_1
4143 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
4144 break
4145 }
4146 v.reset(OpMIPS64MOVWUload)
4147 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
4148 v.Aux = symToAux(mergeSym(sym1, sym2))
4149 v.AddArg2(ptr, mem)
4150 return true
4151 }
4152
4153
4154
4155 for {
4156 off := auxIntToInt32(v.AuxInt)
4157 sym := auxToSym(v.Aux)
4158 if v_0.Op != OpSB || !(symIsRO(sym)) {
4159 break
4160 }
4161 v.reset(OpMIPS64MOVVconst)
4162 v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
4163 return true
4164 }
4165 return false
4166 }
4167 func rewriteValueMIPS64_OpMIPS64MOVWUreg(v *Value) bool {
4168 v_0 := v.Args[0]
4169
4170
4171 for {
4172 x := v_0
4173 if x.Op != OpMIPS64MOVBUload {
4174 break
4175 }
4176 v.reset(OpMIPS64MOVVreg)
4177 v.AddArg(x)
4178 return true
4179 }
4180
4181
4182 for {
4183 x := v_0
4184 if x.Op != OpMIPS64MOVHUload {
4185 break
4186 }
4187 v.reset(OpMIPS64MOVVreg)
4188 v.AddArg(x)
4189 return true
4190 }
4191
4192
4193 for {
4194 x := v_0
4195 if x.Op != OpMIPS64MOVWUload {
4196 break
4197 }
4198 v.reset(OpMIPS64MOVVreg)
4199 v.AddArg(x)
4200 return true
4201 }
4202
4203
4204 for {
4205 x := v_0
4206 if x.Op != OpMIPS64MOVBUreg {
4207 break
4208 }
4209 v.reset(OpMIPS64MOVVreg)
4210 v.AddArg(x)
4211 return true
4212 }
4213
4214
4215 for {
4216 x := v_0
4217 if x.Op != OpMIPS64MOVHUreg {
4218 break
4219 }
4220 v.reset(OpMIPS64MOVVreg)
4221 v.AddArg(x)
4222 return true
4223 }
4224
4225
4226 for {
4227 x := v_0
4228 if x.Op != OpMIPS64MOVWUreg {
4229 break
4230 }
4231 v.reset(OpMIPS64MOVVreg)
4232 v.AddArg(x)
4233 return true
4234 }
4235
4236
4237 for {
4238 if v_0.Op != OpMIPS64MOVVconst {
4239 break
4240 }
4241 c := auxIntToInt64(v_0.AuxInt)
4242 v.reset(OpMIPS64MOVVconst)
4243 v.AuxInt = int64ToAuxInt(int64(uint32(c)))
4244 return true
4245 }
4246 return false
4247 }
4248 func rewriteValueMIPS64_OpMIPS64MOVWload(v *Value) bool {
4249 v_1 := v.Args[1]
4250 v_0 := v.Args[0]
4251 b := v.Block
4252 config := b.Func.Config
4253
4254
4255
4256 for {
4257 off1 := auxIntToInt32(v.AuxInt)
4258 sym := auxToSym(v.Aux)
4259 if v_0.Op != OpMIPS64ADDVconst {
4260 break
4261 }
4262 off2 := auxIntToInt64(v_0.AuxInt)
4263 ptr := v_0.Args[0]
4264 mem := v_1
4265 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
4266 break
4267 }
4268 v.reset(OpMIPS64MOVWload)
4269 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
4270 v.Aux = symToAux(sym)
4271 v.AddArg2(ptr, mem)
4272 return true
4273 }
4274
4275
4276
4277 for {
4278 off1 := auxIntToInt32(v.AuxInt)
4279 sym1 := auxToSym(v.Aux)
4280 if v_0.Op != OpMIPS64MOVVaddr {
4281 break
4282 }
4283 off2 := auxIntToInt32(v_0.AuxInt)
4284 sym2 := auxToSym(v_0.Aux)
4285 ptr := v_0.Args[0]
4286 mem := v_1
4287 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
4288 break
4289 }
4290 v.reset(OpMIPS64MOVWload)
4291 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
4292 v.Aux = symToAux(mergeSym(sym1, sym2))
4293 v.AddArg2(ptr, mem)
4294 return true
4295 }
4296
4297
4298
4299 for {
4300 off := auxIntToInt32(v.AuxInt)
4301 sym := auxToSym(v.Aux)
4302 if v_0.Op != OpSB || !(symIsRO(sym)) {
4303 break
4304 }
4305 v.reset(OpMIPS64MOVVconst)
4306 v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))))
4307 return true
4308 }
4309 return false
4310 }
4311 func rewriteValueMIPS64_OpMIPS64MOVWreg(v *Value) bool {
4312 v_0 := v.Args[0]
4313
4314
4315 for {
4316 x := v_0
4317 if x.Op != OpMIPS64MOVBload {
4318 break
4319 }
4320 v.reset(OpMIPS64MOVVreg)
4321 v.AddArg(x)
4322 return true
4323 }
4324
4325
4326 for {
4327 x := v_0
4328 if x.Op != OpMIPS64MOVBUload {
4329 break
4330 }
4331 v.reset(OpMIPS64MOVVreg)
4332 v.AddArg(x)
4333 return true
4334 }
4335
4336
4337 for {
4338 x := v_0
4339 if x.Op != OpMIPS64MOVHload {
4340 break
4341 }
4342 v.reset(OpMIPS64MOVVreg)
4343 v.AddArg(x)
4344 return true
4345 }
4346
4347
4348 for {
4349 x := v_0
4350 if x.Op != OpMIPS64MOVHUload {
4351 break
4352 }
4353 v.reset(OpMIPS64MOVVreg)
4354 v.AddArg(x)
4355 return true
4356 }
4357
4358
4359 for {
4360 x := v_0
4361 if x.Op != OpMIPS64MOVWload {
4362 break
4363 }
4364 v.reset(OpMIPS64MOVVreg)
4365 v.AddArg(x)
4366 return true
4367 }
4368
4369
4370 for {
4371 x := v_0
4372 if x.Op != OpMIPS64MOVBreg {
4373 break
4374 }
4375 v.reset(OpMIPS64MOVVreg)
4376 v.AddArg(x)
4377 return true
4378 }
4379
4380
4381 for {
4382 x := v_0
4383 if x.Op != OpMIPS64MOVBUreg {
4384 break
4385 }
4386 v.reset(OpMIPS64MOVVreg)
4387 v.AddArg(x)
4388 return true
4389 }
4390
4391
4392 for {
4393 x := v_0
4394 if x.Op != OpMIPS64MOVHreg {
4395 break
4396 }
4397 v.reset(OpMIPS64MOVVreg)
4398 v.AddArg(x)
4399 return true
4400 }
4401
4402
4403 for {
4404 x := v_0
4405 if x.Op != OpMIPS64MOVWreg {
4406 break
4407 }
4408 v.reset(OpMIPS64MOVVreg)
4409 v.AddArg(x)
4410 return true
4411 }
4412
4413
4414 for {
4415 if v_0.Op != OpMIPS64MOVVconst {
4416 break
4417 }
4418 c := auxIntToInt64(v_0.AuxInt)
4419 v.reset(OpMIPS64MOVVconst)
4420 v.AuxInt = int64ToAuxInt(int64(int32(c)))
4421 return true
4422 }
4423 return false
4424 }
4425 func rewriteValueMIPS64_OpMIPS64MOVWstore(v *Value) bool {
4426 v_2 := v.Args[2]
4427 v_1 := v.Args[1]
4428 v_0 := v.Args[0]
4429 b := v.Block
4430 config := b.Func.Config
4431
4432
4433 for {
4434 off := auxIntToInt32(v.AuxInt)
4435 sym := auxToSym(v.Aux)
4436 ptr := v_0
4437 if v_1.Op != OpMIPS64MOVWfpgp {
4438 break
4439 }
4440 val := v_1.Args[0]
4441 mem := v_2
4442 v.reset(OpMIPS64MOVFstore)
4443 v.AuxInt = int32ToAuxInt(off)
4444 v.Aux = symToAux(sym)
4445 v.AddArg3(ptr, val, mem)
4446 return true
4447 }
4448
4449
4450
4451 for {
4452 off1 := auxIntToInt32(v.AuxInt)
4453 sym := auxToSym(v.Aux)
4454 if v_0.Op != OpMIPS64ADDVconst {
4455 break
4456 }
4457 off2 := auxIntToInt64(v_0.AuxInt)
4458 ptr := v_0.Args[0]
4459 val := v_1
4460 mem := v_2
4461 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
4462 break
4463 }
4464 v.reset(OpMIPS64MOVWstore)
4465 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
4466 v.Aux = symToAux(sym)
4467 v.AddArg3(ptr, val, mem)
4468 return true
4469 }
4470
4471
4472
4473 for {
4474 off1 := auxIntToInt32(v.AuxInt)
4475 sym1 := auxToSym(v.Aux)
4476 if v_0.Op != OpMIPS64MOVVaddr {
4477 break
4478 }
4479 off2 := auxIntToInt32(v_0.AuxInt)
4480 sym2 := auxToSym(v_0.Aux)
4481 ptr := v_0.Args[0]
4482 val := v_1
4483 mem := v_2
4484 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
4485 break
4486 }
4487 v.reset(OpMIPS64MOVWstore)
4488 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
4489 v.Aux = symToAux(mergeSym(sym1, sym2))
4490 v.AddArg3(ptr, val, mem)
4491 return true
4492 }
4493
4494
4495 for {
4496 off := auxIntToInt32(v.AuxInt)
4497 sym := auxToSym(v.Aux)
4498 ptr := v_0
4499 if v_1.Op != OpMIPS64MOVWreg {
4500 break
4501 }
4502 x := v_1.Args[0]
4503 mem := v_2
4504 v.reset(OpMIPS64MOVWstore)
4505 v.AuxInt = int32ToAuxInt(off)
4506 v.Aux = symToAux(sym)
4507 v.AddArg3(ptr, x, mem)
4508 return true
4509 }
4510
4511
4512 for {
4513 off := auxIntToInt32(v.AuxInt)
4514 sym := auxToSym(v.Aux)
4515 ptr := v_0
4516 if v_1.Op != OpMIPS64MOVWUreg {
4517 break
4518 }
4519 x := v_1.Args[0]
4520 mem := v_2
4521 v.reset(OpMIPS64MOVWstore)
4522 v.AuxInt = int32ToAuxInt(off)
4523 v.Aux = symToAux(sym)
4524 v.AddArg3(ptr, x, mem)
4525 return true
4526 }
4527 return false
4528 }
4529 func rewriteValueMIPS64_OpMIPS64NEGV(v *Value) bool {
4530 v_0 := v.Args[0]
4531
4532
4533 for {
4534 if v_0.Op != OpMIPS64SUBV {
4535 break
4536 }
4537 y := v_0.Args[1]
4538 x := v_0.Args[0]
4539 v.reset(OpMIPS64SUBV)
4540 v.AddArg2(y, x)
4541 return true
4542 }
4543
4544
4545 for {
4546 if v_0.Op != OpMIPS64NEGV {
4547 break
4548 }
4549 x := v_0.Args[0]
4550 v.copyOf(x)
4551 return true
4552 }
4553
4554
4555 for {
4556 if v_0.Op != OpMIPS64MOVVconst {
4557 break
4558 }
4559 c := auxIntToInt64(v_0.AuxInt)
4560 v.reset(OpMIPS64MOVVconst)
4561 v.AuxInt = int64ToAuxInt(-c)
4562 return true
4563 }
4564 return false
4565 }
4566 func rewriteValueMIPS64_OpMIPS64OR(v *Value) bool {
4567 v_1 := v.Args[1]
4568 v_0 := v.Args[0]
4569
4570
4571
4572 for {
4573 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4574 x := v_0
4575 if v_1.Op != OpMIPS64MOVVconst {
4576 continue
4577 }
4578 c := auxIntToInt64(v_1.AuxInt)
4579 if !(is32Bit(c)) {
4580 continue
4581 }
4582 v.reset(OpMIPS64ORconst)
4583 v.AuxInt = int64ToAuxInt(c)
4584 v.AddArg(x)
4585 return true
4586 }
4587 break
4588 }
4589
4590
4591 for {
4592 x := v_0
4593 if x != v_1 {
4594 break
4595 }
4596 v.copyOf(x)
4597 return true
4598 }
4599 return false
4600 }
4601 func rewriteValueMIPS64_OpMIPS64ORconst(v *Value) bool {
4602 v_0 := v.Args[0]
4603
4604
4605 for {
4606 if auxIntToInt64(v.AuxInt) != 0 {
4607 break
4608 }
4609 x := v_0
4610 v.copyOf(x)
4611 return true
4612 }
4613
4614
4615 for {
4616 if auxIntToInt64(v.AuxInt) != -1 {
4617 break
4618 }
4619 v.reset(OpMIPS64MOVVconst)
4620 v.AuxInt = int64ToAuxInt(-1)
4621 return true
4622 }
4623
4624
4625 for {
4626 c := auxIntToInt64(v.AuxInt)
4627 if v_0.Op != OpMIPS64MOVVconst {
4628 break
4629 }
4630 d := auxIntToInt64(v_0.AuxInt)
4631 v.reset(OpMIPS64MOVVconst)
4632 v.AuxInt = int64ToAuxInt(c | d)
4633 return true
4634 }
4635
4636
4637
4638 for {
4639 c := auxIntToInt64(v.AuxInt)
4640 if v_0.Op != OpMIPS64ORconst {
4641 break
4642 }
4643 d := auxIntToInt64(v_0.AuxInt)
4644 x := v_0.Args[0]
4645 if !(is32Bit(c | d)) {
4646 break
4647 }
4648 v.reset(OpMIPS64ORconst)
4649 v.AuxInt = int64ToAuxInt(c | d)
4650 v.AddArg(x)
4651 return true
4652 }
4653 return false
4654 }
4655 func rewriteValueMIPS64_OpMIPS64SGT(v *Value) bool {
4656 v_1 := v.Args[1]
4657 v_0 := v.Args[0]
4658
4659
4660
4661 for {
4662 if v_0.Op != OpMIPS64MOVVconst {
4663 break
4664 }
4665 c := auxIntToInt64(v_0.AuxInt)
4666 x := v_1
4667 if !(is32Bit(c)) {
4668 break
4669 }
4670 v.reset(OpMIPS64SGTconst)
4671 v.AuxInt = int64ToAuxInt(c)
4672 v.AddArg(x)
4673 return true
4674 }
4675
4676
4677 for {
4678 x := v_0
4679 if x != v_1 {
4680 break
4681 }
4682 v.reset(OpMIPS64MOVVconst)
4683 v.AuxInt = int64ToAuxInt(0)
4684 return true
4685 }
4686 return false
4687 }
4688 func rewriteValueMIPS64_OpMIPS64SGTU(v *Value) bool {
4689 v_1 := v.Args[1]
4690 v_0 := v.Args[0]
4691
4692
4693
4694 for {
4695 if v_0.Op != OpMIPS64MOVVconst {
4696 break
4697 }
4698 c := auxIntToInt64(v_0.AuxInt)
4699 x := v_1
4700 if !(is32Bit(c)) {
4701 break
4702 }
4703 v.reset(OpMIPS64SGTUconst)
4704 v.AuxInt = int64ToAuxInt(c)
4705 v.AddArg(x)
4706 return true
4707 }
4708
4709
4710 for {
4711 x := v_0
4712 if x != v_1 {
4713 break
4714 }
4715 v.reset(OpMIPS64MOVVconst)
4716 v.AuxInt = int64ToAuxInt(0)
4717 return true
4718 }
4719 return false
4720 }
4721 func rewriteValueMIPS64_OpMIPS64SGTUconst(v *Value) bool {
4722 v_0 := v.Args[0]
4723
4724
4725
4726 for {
4727 c := auxIntToInt64(v.AuxInt)
4728 if v_0.Op != OpMIPS64MOVVconst {
4729 break
4730 }
4731 d := auxIntToInt64(v_0.AuxInt)
4732 if !(uint64(c) > uint64(d)) {
4733 break
4734 }
4735 v.reset(OpMIPS64MOVVconst)
4736 v.AuxInt = int64ToAuxInt(1)
4737 return true
4738 }
4739
4740
4741
4742 for {
4743 c := auxIntToInt64(v.AuxInt)
4744 if v_0.Op != OpMIPS64MOVVconst {
4745 break
4746 }
4747 d := auxIntToInt64(v_0.AuxInt)
4748 if !(uint64(c) <= uint64(d)) {
4749 break
4750 }
4751 v.reset(OpMIPS64MOVVconst)
4752 v.AuxInt = int64ToAuxInt(0)
4753 return true
4754 }
4755
4756
4757
4758 for {
4759 c := auxIntToInt64(v.AuxInt)
4760 if v_0.Op != OpMIPS64MOVBUreg || !(0xff < uint64(c)) {
4761 break
4762 }
4763 v.reset(OpMIPS64MOVVconst)
4764 v.AuxInt = int64ToAuxInt(1)
4765 return true
4766 }
4767
4768
4769
4770 for {
4771 c := auxIntToInt64(v.AuxInt)
4772 if v_0.Op != OpMIPS64MOVHUreg || !(0xffff < uint64(c)) {
4773 break
4774 }
4775 v.reset(OpMIPS64MOVVconst)
4776 v.AuxInt = int64ToAuxInt(1)
4777 return true
4778 }
4779
4780
4781
4782 for {
4783 c := auxIntToInt64(v.AuxInt)
4784 if v_0.Op != OpMIPS64ANDconst {
4785 break
4786 }
4787 m := auxIntToInt64(v_0.AuxInt)
4788 if !(uint64(m) < uint64(c)) {
4789 break
4790 }
4791 v.reset(OpMIPS64MOVVconst)
4792 v.AuxInt = int64ToAuxInt(1)
4793 return true
4794 }
4795
4796
4797
4798 for {
4799 c := auxIntToInt64(v.AuxInt)
4800 if v_0.Op != OpMIPS64SRLVconst {
4801 break
4802 }
4803 d := auxIntToInt64(v_0.AuxInt)
4804 if !(0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
4805 break
4806 }
4807 v.reset(OpMIPS64MOVVconst)
4808 v.AuxInt = int64ToAuxInt(1)
4809 return true
4810 }
4811 return false
4812 }
4813 func rewriteValueMIPS64_OpMIPS64SGTconst(v *Value) bool {
4814 v_0 := v.Args[0]
4815
4816
4817
4818 for {
4819 c := auxIntToInt64(v.AuxInt)
4820 if v_0.Op != OpMIPS64MOVVconst {
4821 break
4822 }
4823 d := auxIntToInt64(v_0.AuxInt)
4824 if !(c > d) {
4825 break
4826 }
4827 v.reset(OpMIPS64MOVVconst)
4828 v.AuxInt = int64ToAuxInt(1)
4829 return true
4830 }
4831
4832
4833
4834 for {
4835 c := auxIntToInt64(v.AuxInt)
4836 if v_0.Op != OpMIPS64MOVVconst {
4837 break
4838 }
4839 d := auxIntToInt64(v_0.AuxInt)
4840 if !(c <= d) {
4841 break
4842 }
4843 v.reset(OpMIPS64MOVVconst)
4844 v.AuxInt = int64ToAuxInt(0)
4845 return true
4846 }
4847
4848
4849
4850 for {
4851 c := auxIntToInt64(v.AuxInt)
4852 if v_0.Op != OpMIPS64MOVBreg || !(0x7f < c) {
4853 break
4854 }
4855 v.reset(OpMIPS64MOVVconst)
4856 v.AuxInt = int64ToAuxInt(1)
4857 return true
4858 }
4859
4860
4861
4862 for {
4863 c := auxIntToInt64(v.AuxInt)
4864 if v_0.Op != OpMIPS64MOVBreg || !(c <= -0x80) {
4865 break
4866 }
4867 v.reset(OpMIPS64MOVVconst)
4868 v.AuxInt = int64ToAuxInt(0)
4869 return true
4870 }
4871
4872
4873
4874 for {
4875 c := auxIntToInt64(v.AuxInt)
4876 if v_0.Op != OpMIPS64MOVBUreg || !(0xff < c) {
4877 break
4878 }
4879 v.reset(OpMIPS64MOVVconst)
4880 v.AuxInt = int64ToAuxInt(1)
4881 return true
4882 }
4883
4884
4885
4886 for {
4887 c := auxIntToInt64(v.AuxInt)
4888 if v_0.Op != OpMIPS64MOVBUreg || !(c < 0) {
4889 break
4890 }
4891 v.reset(OpMIPS64MOVVconst)
4892 v.AuxInt = int64ToAuxInt(0)
4893 return true
4894 }
4895
4896
4897
4898 for {
4899 c := auxIntToInt64(v.AuxInt)
4900 if v_0.Op != OpMIPS64MOVHreg || !(0x7fff < c) {
4901 break
4902 }
4903 v.reset(OpMIPS64MOVVconst)
4904 v.AuxInt = int64ToAuxInt(1)
4905 return true
4906 }
4907
4908
4909
4910 for {
4911 c := auxIntToInt64(v.AuxInt)
4912 if v_0.Op != OpMIPS64MOVHreg || !(c <= -0x8000) {
4913 break
4914 }
4915 v.reset(OpMIPS64MOVVconst)
4916 v.AuxInt = int64ToAuxInt(0)
4917 return true
4918 }
4919
4920
4921
4922 for {
4923 c := auxIntToInt64(v.AuxInt)
4924 if v_0.Op != OpMIPS64MOVHUreg || !(0xffff < c) {
4925 break
4926 }
4927 v.reset(OpMIPS64MOVVconst)
4928 v.AuxInt = int64ToAuxInt(1)
4929 return true
4930 }
4931
4932
4933
4934 for {
4935 c := auxIntToInt64(v.AuxInt)
4936 if v_0.Op != OpMIPS64MOVHUreg || !(c < 0) {
4937 break
4938 }
4939 v.reset(OpMIPS64MOVVconst)
4940 v.AuxInt = int64ToAuxInt(0)
4941 return true
4942 }
4943
4944
4945
4946 for {
4947 c := auxIntToInt64(v.AuxInt)
4948 if v_0.Op != OpMIPS64MOVWUreg || !(c < 0) {
4949 break
4950 }
4951 v.reset(OpMIPS64MOVVconst)
4952 v.AuxInt = int64ToAuxInt(0)
4953 return true
4954 }
4955
4956
4957
4958 for {
4959 c := auxIntToInt64(v.AuxInt)
4960 if v_0.Op != OpMIPS64ANDconst {
4961 break
4962 }
4963 m := auxIntToInt64(v_0.AuxInt)
4964 if !(0 <= m && m < c) {
4965 break
4966 }
4967 v.reset(OpMIPS64MOVVconst)
4968 v.AuxInt = int64ToAuxInt(1)
4969 return true
4970 }
4971
4972
4973
4974 for {
4975 c := auxIntToInt64(v.AuxInt)
4976 if v_0.Op != OpMIPS64SRLVconst {
4977 break
4978 }
4979 d := auxIntToInt64(v_0.AuxInt)
4980 if !(0 <= c && 0 < d && d <= 63 && 0xffffffffffffffff>>uint64(d) < uint64(c)) {
4981 break
4982 }
4983 v.reset(OpMIPS64MOVVconst)
4984 v.AuxInt = int64ToAuxInt(1)
4985 return true
4986 }
4987 return false
4988 }
4989 func rewriteValueMIPS64_OpMIPS64SLLV(v *Value) bool {
4990 v_1 := v.Args[1]
4991 v_0 := v.Args[0]
4992
4993
4994
4995 for {
4996 if v_1.Op != OpMIPS64MOVVconst {
4997 break
4998 }
4999 c := auxIntToInt64(v_1.AuxInt)
5000 if !(uint64(c) >= 64) {
5001 break
5002 }
5003 v.reset(OpMIPS64MOVVconst)
5004 v.AuxInt = int64ToAuxInt(0)
5005 return true
5006 }
5007
5008
5009 for {
5010 x := v_0
5011 if v_1.Op != OpMIPS64MOVVconst {
5012 break
5013 }
5014 c := auxIntToInt64(v_1.AuxInt)
5015 v.reset(OpMIPS64SLLVconst)
5016 v.AuxInt = int64ToAuxInt(c)
5017 v.AddArg(x)
5018 return true
5019 }
5020 return false
5021 }
5022 func rewriteValueMIPS64_OpMIPS64SLLVconst(v *Value) bool {
5023 v_0 := v.Args[0]
5024
5025
5026 for {
5027 c := auxIntToInt64(v.AuxInt)
5028 if v_0.Op != OpMIPS64MOVVconst {
5029 break
5030 }
5031 d := auxIntToInt64(v_0.AuxInt)
5032 v.reset(OpMIPS64MOVVconst)
5033 v.AuxInt = int64ToAuxInt(d << uint64(c))
5034 return true
5035 }
5036 return false
5037 }
5038 func rewriteValueMIPS64_OpMIPS64SRAV(v *Value) bool {
5039 v_1 := v.Args[1]
5040 v_0 := v.Args[0]
5041
5042
5043
5044 for {
5045 x := v_0
5046 if v_1.Op != OpMIPS64MOVVconst {
5047 break
5048 }
5049 c := auxIntToInt64(v_1.AuxInt)
5050 if !(uint64(c) >= 64) {
5051 break
5052 }
5053 v.reset(OpMIPS64SRAVconst)
5054 v.AuxInt = int64ToAuxInt(63)
5055 v.AddArg(x)
5056 return true
5057 }
5058
5059
5060 for {
5061 x := v_0
5062 if v_1.Op != OpMIPS64MOVVconst {
5063 break
5064 }
5065 c := auxIntToInt64(v_1.AuxInt)
5066 v.reset(OpMIPS64SRAVconst)
5067 v.AuxInt = int64ToAuxInt(c)
5068 v.AddArg(x)
5069 return true
5070 }
5071 return false
5072 }
5073 func rewriteValueMIPS64_OpMIPS64SRAVconst(v *Value) bool {
5074 v_0 := v.Args[0]
5075
5076
5077 for {
5078 c := auxIntToInt64(v.AuxInt)
5079 if v_0.Op != OpMIPS64MOVVconst {
5080 break
5081 }
5082 d := auxIntToInt64(v_0.AuxInt)
5083 v.reset(OpMIPS64MOVVconst)
5084 v.AuxInt = int64ToAuxInt(d >> uint64(c))
5085 return true
5086 }
5087 return false
5088 }
5089 func rewriteValueMIPS64_OpMIPS64SRLV(v *Value) bool {
5090 v_1 := v.Args[1]
5091 v_0 := v.Args[0]
5092
5093
5094
5095 for {
5096 if v_1.Op != OpMIPS64MOVVconst {
5097 break
5098 }
5099 c := auxIntToInt64(v_1.AuxInt)
5100 if !(uint64(c) >= 64) {
5101 break
5102 }
5103 v.reset(OpMIPS64MOVVconst)
5104 v.AuxInt = int64ToAuxInt(0)
5105 return true
5106 }
5107
5108
5109 for {
5110 x := v_0
5111 if v_1.Op != OpMIPS64MOVVconst {
5112 break
5113 }
5114 c := auxIntToInt64(v_1.AuxInt)
5115 v.reset(OpMIPS64SRLVconst)
5116 v.AuxInt = int64ToAuxInt(c)
5117 v.AddArg(x)
5118 return true
5119 }
5120 return false
5121 }
5122 func rewriteValueMIPS64_OpMIPS64SRLVconst(v *Value) bool {
5123 v_0 := v.Args[0]
5124
5125
5126 for {
5127 c := auxIntToInt64(v.AuxInt)
5128 if v_0.Op != OpMIPS64MOVVconst {
5129 break
5130 }
5131 d := auxIntToInt64(v_0.AuxInt)
5132 v.reset(OpMIPS64MOVVconst)
5133 v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
5134 return true
5135 }
5136 return false
5137 }
5138 func rewriteValueMIPS64_OpMIPS64SUBV(v *Value) bool {
5139 v_1 := v.Args[1]
5140 v_0 := v.Args[0]
5141
5142
5143
5144 for {
5145 x := v_0
5146 if v_1.Op != OpMIPS64MOVVconst {
5147 break
5148 }
5149 c := auxIntToInt64(v_1.AuxInt)
5150 if !(is32Bit(c)) {
5151 break
5152 }
5153 v.reset(OpMIPS64SUBVconst)
5154 v.AuxInt = int64ToAuxInt(c)
5155 v.AddArg(x)
5156 return true
5157 }
5158
5159
5160 for {
5161 x := v_0
5162 if v_1.Op != OpMIPS64NEGV {
5163 break
5164 }
5165 y := v_1.Args[0]
5166 v.reset(OpMIPS64ADDV)
5167 v.AddArg2(x, y)
5168 return true
5169 }
5170
5171
5172 for {
5173 x := v_0
5174 if x != v_1 {
5175 break
5176 }
5177 v.reset(OpMIPS64MOVVconst)
5178 v.AuxInt = int64ToAuxInt(0)
5179 return true
5180 }
5181
5182
5183 for {
5184 if v_0.Op != OpMIPS64MOVVconst || auxIntToInt64(v_0.AuxInt) != 0 {
5185 break
5186 }
5187 x := v_1
5188 v.reset(OpMIPS64NEGV)
5189 v.AddArg(x)
5190 return true
5191 }
5192 return false
5193 }
5194 func rewriteValueMIPS64_OpMIPS64SUBVconst(v *Value) bool {
5195 v_0 := v.Args[0]
5196
5197
5198 for {
5199 if auxIntToInt64(v.AuxInt) != 0 {
5200 break
5201 }
5202 x := v_0
5203 v.copyOf(x)
5204 return true
5205 }
5206
5207
5208 for {
5209 c := auxIntToInt64(v.AuxInt)
5210 if v_0.Op != OpMIPS64MOVVconst {
5211 break
5212 }
5213 d := auxIntToInt64(v_0.AuxInt)
5214 v.reset(OpMIPS64MOVVconst)
5215 v.AuxInt = int64ToAuxInt(d - c)
5216 return true
5217 }
5218
5219
5220
5221 for {
5222 c := auxIntToInt64(v.AuxInt)
5223 if v_0.Op != OpMIPS64SUBVconst {
5224 break
5225 }
5226 d := auxIntToInt64(v_0.AuxInt)
5227 x := v_0.Args[0]
5228 if !(is32Bit(-c - d)) {
5229 break
5230 }
5231 v.reset(OpMIPS64ADDVconst)
5232 v.AuxInt = int64ToAuxInt(-c - d)
5233 v.AddArg(x)
5234 return true
5235 }
5236
5237
5238
5239 for {
5240 c := auxIntToInt64(v.AuxInt)
5241 if v_0.Op != OpMIPS64ADDVconst {
5242 break
5243 }
5244 d := auxIntToInt64(v_0.AuxInt)
5245 x := v_0.Args[0]
5246 if !(is32Bit(-c + d)) {
5247 break
5248 }
5249 v.reset(OpMIPS64ADDVconst)
5250 v.AuxInt = int64ToAuxInt(-c + d)
5251 v.AddArg(x)
5252 return true
5253 }
5254 return false
5255 }
5256 func rewriteValueMIPS64_OpMIPS64XOR(v *Value) bool {
5257 v_1 := v.Args[1]
5258 v_0 := v.Args[0]
5259
5260
5261
5262 for {
5263 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5264 x := v_0
5265 if v_1.Op != OpMIPS64MOVVconst {
5266 continue
5267 }
5268 c := auxIntToInt64(v_1.AuxInt)
5269 if !(is32Bit(c)) {
5270 continue
5271 }
5272 v.reset(OpMIPS64XORconst)
5273 v.AuxInt = int64ToAuxInt(c)
5274 v.AddArg(x)
5275 return true
5276 }
5277 break
5278 }
5279
5280
5281 for {
5282 x := v_0
5283 if x != v_1 {
5284 break
5285 }
5286 v.reset(OpMIPS64MOVVconst)
5287 v.AuxInt = int64ToAuxInt(0)
5288 return true
5289 }
5290 return false
5291 }
5292 func rewriteValueMIPS64_OpMIPS64XORconst(v *Value) bool {
5293 v_0 := v.Args[0]
5294
5295
5296 for {
5297 if auxIntToInt64(v.AuxInt) != 0 {
5298 break
5299 }
5300 x := v_0
5301 v.copyOf(x)
5302 return true
5303 }
5304
5305
5306 for {
5307 c := auxIntToInt64(v.AuxInt)
5308 if v_0.Op != OpMIPS64MOVVconst {
5309 break
5310 }
5311 d := auxIntToInt64(v_0.AuxInt)
5312 v.reset(OpMIPS64MOVVconst)
5313 v.AuxInt = int64ToAuxInt(c ^ d)
5314 return true
5315 }
5316
5317
5318
5319 for {
5320 c := auxIntToInt64(v.AuxInt)
5321 if v_0.Op != OpMIPS64XORconst {
5322 break
5323 }
5324 d := auxIntToInt64(v_0.AuxInt)
5325 x := v_0.Args[0]
5326 if !(is32Bit(c ^ d)) {
5327 break
5328 }
5329 v.reset(OpMIPS64XORconst)
5330 v.AuxInt = int64ToAuxInt(c ^ d)
5331 v.AddArg(x)
5332 return true
5333 }
5334 return false
5335 }
5336 func rewriteValueMIPS64_OpMod16(v *Value) bool {
5337 v_1 := v.Args[1]
5338 v_0 := v.Args[0]
5339 b := v.Block
5340 typ := &b.Func.Config.Types
5341
5342
5343 for {
5344 x := v_0
5345 y := v_1
5346 v.reset(OpSelect0)
5347 v0 := b.NewValue0(v.Pos, OpMIPS64DIVV, types.NewTuple(typ.Int64, typ.Int64))
5348 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
5349 v1.AddArg(x)
5350 v2 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
5351 v2.AddArg(y)
5352 v0.AddArg2(v1, v2)
5353 v.AddArg(v0)
5354 return true
5355 }
5356 }
5357 func rewriteValueMIPS64_OpMod16u(v *Value) bool {
5358 v_1 := v.Args[1]
5359 v_0 := v.Args[0]
5360 b := v.Block
5361 typ := &b.Func.Config.Types
5362
5363
5364 for {
5365 x := v_0
5366 y := v_1
5367 v.reset(OpSelect0)
5368 v0 := b.NewValue0(v.Pos, OpMIPS64DIVVU, types.NewTuple(typ.UInt64, typ.UInt64))
5369 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
5370 v1.AddArg(x)
5371 v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
5372 v2.AddArg(y)
5373 v0.AddArg2(v1, v2)
5374 v.AddArg(v0)
5375 return true
5376 }
5377 }
5378 func rewriteValueMIPS64_OpMod32(v *Value) bool {
5379 v_1 := v.Args[1]
5380 v_0 := v.Args[0]
5381 b := v.Block
5382 typ := &b.Func.Config.Types
5383
5384
5385 for {
5386 x := v_0
5387 y := v_1
5388 v.reset(OpSelect0)
5389 v0 := b.NewValue0(v.Pos, OpMIPS64DIVV, types.NewTuple(typ.Int64, typ.Int64))
5390 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
5391 v1.AddArg(x)
5392 v2 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
5393 v2.AddArg(y)
5394 v0.AddArg2(v1, v2)
5395 v.AddArg(v0)
5396 return true
5397 }
5398 }
5399 func rewriteValueMIPS64_OpMod32u(v *Value) bool {
5400 v_1 := v.Args[1]
5401 v_0 := v.Args[0]
5402 b := v.Block
5403 typ := &b.Func.Config.Types
5404
5405
5406 for {
5407 x := v_0
5408 y := v_1
5409 v.reset(OpSelect0)
5410 v0 := b.NewValue0(v.Pos, OpMIPS64DIVVU, types.NewTuple(typ.UInt64, typ.UInt64))
5411 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
5412 v1.AddArg(x)
5413 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
5414 v2.AddArg(y)
5415 v0.AddArg2(v1, v2)
5416 v.AddArg(v0)
5417 return true
5418 }
5419 }
5420 func rewriteValueMIPS64_OpMod64(v *Value) bool {
5421 v_1 := v.Args[1]
5422 v_0 := v.Args[0]
5423 b := v.Block
5424 typ := &b.Func.Config.Types
5425
5426
5427 for {
5428 x := v_0
5429 y := v_1
5430 v.reset(OpSelect0)
5431 v0 := b.NewValue0(v.Pos, OpMIPS64DIVV, types.NewTuple(typ.Int64, typ.Int64))
5432 v0.AddArg2(x, y)
5433 v.AddArg(v0)
5434 return true
5435 }
5436 }
5437 func rewriteValueMIPS64_OpMod64u(v *Value) bool {
5438 v_1 := v.Args[1]
5439 v_0 := v.Args[0]
5440 b := v.Block
5441 typ := &b.Func.Config.Types
5442
5443
5444 for {
5445 x := v_0
5446 y := v_1
5447 v.reset(OpSelect0)
5448 v0 := b.NewValue0(v.Pos, OpMIPS64DIVVU, types.NewTuple(typ.UInt64, typ.UInt64))
5449 v0.AddArg2(x, y)
5450 v.AddArg(v0)
5451 return true
5452 }
5453 }
5454 func rewriteValueMIPS64_OpMod8(v *Value) bool {
5455 v_1 := v.Args[1]
5456 v_0 := v.Args[0]
5457 b := v.Block
5458 typ := &b.Func.Config.Types
5459
5460
5461 for {
5462 x := v_0
5463 y := v_1
5464 v.reset(OpSelect0)
5465 v0 := b.NewValue0(v.Pos, OpMIPS64DIVV, types.NewTuple(typ.Int64, typ.Int64))
5466 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
5467 v1.AddArg(x)
5468 v2 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
5469 v2.AddArg(y)
5470 v0.AddArg2(v1, v2)
5471 v.AddArg(v0)
5472 return true
5473 }
5474 }
5475 func rewriteValueMIPS64_OpMod8u(v *Value) bool {
5476 v_1 := v.Args[1]
5477 v_0 := v.Args[0]
5478 b := v.Block
5479 typ := &b.Func.Config.Types
5480
5481
5482 for {
5483 x := v_0
5484 y := v_1
5485 v.reset(OpSelect0)
5486 v0 := b.NewValue0(v.Pos, OpMIPS64DIVVU, types.NewTuple(typ.UInt64, typ.UInt64))
5487 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
5488 v1.AddArg(x)
5489 v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
5490 v2.AddArg(y)
5491 v0.AddArg2(v1, v2)
5492 v.AddArg(v0)
5493 return true
5494 }
5495 }
5496 func rewriteValueMIPS64_OpMove(v *Value) bool {
5497 v_2 := v.Args[2]
5498 v_1 := v.Args[1]
5499 v_0 := v.Args[0]
5500 b := v.Block
5501 config := b.Func.Config
5502 typ := &b.Func.Config.Types
5503
5504
5505 for {
5506 if auxIntToInt64(v.AuxInt) != 0 {
5507 break
5508 }
5509 mem := v_2
5510 v.copyOf(mem)
5511 return true
5512 }
5513
5514
5515 for {
5516 if auxIntToInt64(v.AuxInt) != 1 {
5517 break
5518 }
5519 dst := v_0
5520 src := v_1
5521 mem := v_2
5522 v.reset(OpMIPS64MOVBstore)
5523 v0 := b.NewValue0(v.Pos, OpMIPS64MOVBload, typ.Int8)
5524 v0.AddArg2(src, mem)
5525 v.AddArg3(dst, v0, mem)
5526 return true
5527 }
5528
5529
5530
5531 for {
5532 if auxIntToInt64(v.AuxInt) != 2 {
5533 break
5534 }
5535 t := auxToType(v.Aux)
5536 dst := v_0
5537 src := v_1
5538 mem := v_2
5539 if !(t.Alignment()%2 == 0) {
5540 break
5541 }
5542 v.reset(OpMIPS64MOVHstore)
5543 v0 := b.NewValue0(v.Pos, OpMIPS64MOVHload, typ.Int16)
5544 v0.AddArg2(src, mem)
5545 v.AddArg3(dst, v0, mem)
5546 return true
5547 }
5548
5549
5550 for {
5551 if auxIntToInt64(v.AuxInt) != 2 {
5552 break
5553 }
5554 dst := v_0
5555 src := v_1
5556 mem := v_2
5557 v.reset(OpMIPS64MOVBstore)
5558 v.AuxInt = int32ToAuxInt(1)
5559 v0 := b.NewValue0(v.Pos, OpMIPS64MOVBload, typ.Int8)
5560 v0.AuxInt = int32ToAuxInt(1)
5561 v0.AddArg2(src, mem)
5562 v1 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
5563 v2 := b.NewValue0(v.Pos, OpMIPS64MOVBload, typ.Int8)
5564 v2.AddArg2(src, mem)
5565 v1.AddArg3(dst, v2, mem)
5566 v.AddArg3(dst, v0, v1)
5567 return true
5568 }
5569
5570
5571
5572 for {
5573 if auxIntToInt64(v.AuxInt) != 4 {
5574 break
5575 }
5576 t := auxToType(v.Aux)
5577 dst := v_0
5578 src := v_1
5579 mem := v_2
5580 if !(t.Alignment()%4 == 0) {
5581 break
5582 }
5583 v.reset(OpMIPS64MOVWstore)
5584 v0 := b.NewValue0(v.Pos, OpMIPS64MOVWload, typ.Int32)
5585 v0.AddArg2(src, mem)
5586 v.AddArg3(dst, v0, mem)
5587 return true
5588 }
5589
5590
5591
5592 for {
5593 if auxIntToInt64(v.AuxInt) != 4 {
5594 break
5595 }
5596 t := auxToType(v.Aux)
5597 dst := v_0
5598 src := v_1
5599 mem := v_2
5600 if !(t.Alignment()%2 == 0) {
5601 break
5602 }
5603 v.reset(OpMIPS64MOVHstore)
5604 v.AuxInt = int32ToAuxInt(2)
5605 v0 := b.NewValue0(v.Pos, OpMIPS64MOVHload, typ.Int16)
5606 v0.AuxInt = int32ToAuxInt(2)
5607 v0.AddArg2(src, mem)
5608 v1 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
5609 v2 := b.NewValue0(v.Pos, OpMIPS64MOVHload, typ.Int16)
5610 v2.AddArg2(src, mem)
5611 v1.AddArg3(dst, v2, mem)
5612 v.AddArg3(dst, v0, v1)
5613 return true
5614 }
5615
5616
5617 for {
5618 if auxIntToInt64(v.AuxInt) != 4 {
5619 break
5620 }
5621 dst := v_0
5622 src := v_1
5623 mem := v_2
5624 v.reset(OpMIPS64MOVBstore)
5625 v.AuxInt = int32ToAuxInt(3)
5626 v0 := b.NewValue0(v.Pos, OpMIPS64MOVBload, typ.Int8)
5627 v0.AuxInt = int32ToAuxInt(3)
5628 v0.AddArg2(src, mem)
5629 v1 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
5630 v1.AuxInt = int32ToAuxInt(2)
5631 v2 := b.NewValue0(v.Pos, OpMIPS64MOVBload, typ.Int8)
5632 v2.AuxInt = int32ToAuxInt(2)
5633 v2.AddArg2(src, mem)
5634 v3 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
5635 v3.AuxInt = int32ToAuxInt(1)
5636 v4 := b.NewValue0(v.Pos, OpMIPS64MOVBload, typ.Int8)
5637 v4.AuxInt = int32ToAuxInt(1)
5638 v4.AddArg2(src, mem)
5639 v5 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
5640 v6 := b.NewValue0(v.Pos, OpMIPS64MOVBload, typ.Int8)
5641 v6.AddArg2(src, mem)
5642 v5.AddArg3(dst, v6, mem)
5643 v3.AddArg3(dst, v4, v5)
5644 v1.AddArg3(dst, v2, v3)
5645 v.AddArg3(dst, v0, v1)
5646 return true
5647 }
5648
5649
5650
5651 for {
5652 if auxIntToInt64(v.AuxInt) != 8 {
5653 break
5654 }
5655 t := auxToType(v.Aux)
5656 dst := v_0
5657 src := v_1
5658 mem := v_2
5659 if !(t.Alignment()%8 == 0) {
5660 break
5661 }
5662 v.reset(OpMIPS64MOVVstore)
5663 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVload, typ.UInt64)
5664 v0.AddArg2(src, mem)
5665 v.AddArg3(dst, v0, mem)
5666 return true
5667 }
5668
5669
5670
5671 for {
5672 if auxIntToInt64(v.AuxInt) != 8 {
5673 break
5674 }
5675 t := auxToType(v.Aux)
5676 dst := v_0
5677 src := v_1
5678 mem := v_2
5679 if !(t.Alignment()%4 == 0) {
5680 break
5681 }
5682 v.reset(OpMIPS64MOVWstore)
5683 v.AuxInt = int32ToAuxInt(4)
5684 v0 := b.NewValue0(v.Pos, OpMIPS64MOVWload, typ.Int32)
5685 v0.AuxInt = int32ToAuxInt(4)
5686 v0.AddArg2(src, mem)
5687 v1 := b.NewValue0(v.Pos, OpMIPS64MOVWstore, types.TypeMem)
5688 v2 := b.NewValue0(v.Pos, OpMIPS64MOVWload, typ.Int32)
5689 v2.AddArg2(src, mem)
5690 v1.AddArg3(dst, v2, mem)
5691 v.AddArg3(dst, v0, v1)
5692 return true
5693 }
5694
5695
5696
5697 for {
5698 if auxIntToInt64(v.AuxInt) != 8 {
5699 break
5700 }
5701 t := auxToType(v.Aux)
5702 dst := v_0
5703 src := v_1
5704 mem := v_2
5705 if !(t.Alignment()%2 == 0) {
5706 break
5707 }
5708 v.reset(OpMIPS64MOVHstore)
5709 v.AuxInt = int32ToAuxInt(6)
5710 v0 := b.NewValue0(v.Pos, OpMIPS64MOVHload, typ.Int16)
5711 v0.AuxInt = int32ToAuxInt(6)
5712 v0.AddArg2(src, mem)
5713 v1 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
5714 v1.AuxInt = int32ToAuxInt(4)
5715 v2 := b.NewValue0(v.Pos, OpMIPS64MOVHload, typ.Int16)
5716 v2.AuxInt = int32ToAuxInt(4)
5717 v2.AddArg2(src, mem)
5718 v3 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
5719 v3.AuxInt = int32ToAuxInt(2)
5720 v4 := b.NewValue0(v.Pos, OpMIPS64MOVHload, typ.Int16)
5721 v4.AuxInt = int32ToAuxInt(2)
5722 v4.AddArg2(src, mem)
5723 v5 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
5724 v6 := b.NewValue0(v.Pos, OpMIPS64MOVHload, typ.Int16)
5725 v6.AddArg2(src, mem)
5726 v5.AddArg3(dst, v6, mem)
5727 v3.AddArg3(dst, v4, v5)
5728 v1.AddArg3(dst, v2, v3)
5729 v.AddArg3(dst, v0, v1)
5730 return true
5731 }
5732
5733
5734 for {
5735 if auxIntToInt64(v.AuxInt) != 3 {
5736 break
5737 }
5738 dst := v_0
5739 src := v_1
5740 mem := v_2
5741 v.reset(OpMIPS64MOVBstore)
5742 v.AuxInt = int32ToAuxInt(2)
5743 v0 := b.NewValue0(v.Pos, OpMIPS64MOVBload, typ.Int8)
5744 v0.AuxInt = int32ToAuxInt(2)
5745 v0.AddArg2(src, mem)
5746 v1 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
5747 v1.AuxInt = int32ToAuxInt(1)
5748 v2 := b.NewValue0(v.Pos, OpMIPS64MOVBload, typ.Int8)
5749 v2.AuxInt = int32ToAuxInt(1)
5750 v2.AddArg2(src, mem)
5751 v3 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
5752 v4 := b.NewValue0(v.Pos, OpMIPS64MOVBload, typ.Int8)
5753 v4.AddArg2(src, mem)
5754 v3.AddArg3(dst, v4, mem)
5755 v1.AddArg3(dst, v2, v3)
5756 v.AddArg3(dst, v0, v1)
5757 return true
5758 }
5759
5760
5761
5762 for {
5763 if auxIntToInt64(v.AuxInt) != 6 {
5764 break
5765 }
5766 t := auxToType(v.Aux)
5767 dst := v_0
5768 src := v_1
5769 mem := v_2
5770 if !(t.Alignment()%2 == 0) {
5771 break
5772 }
5773 v.reset(OpMIPS64MOVHstore)
5774 v.AuxInt = int32ToAuxInt(4)
5775 v0 := b.NewValue0(v.Pos, OpMIPS64MOVHload, typ.Int16)
5776 v0.AuxInt = int32ToAuxInt(4)
5777 v0.AddArg2(src, mem)
5778 v1 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
5779 v1.AuxInt = int32ToAuxInt(2)
5780 v2 := b.NewValue0(v.Pos, OpMIPS64MOVHload, typ.Int16)
5781 v2.AuxInt = int32ToAuxInt(2)
5782 v2.AddArg2(src, mem)
5783 v3 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
5784 v4 := b.NewValue0(v.Pos, OpMIPS64MOVHload, typ.Int16)
5785 v4.AddArg2(src, mem)
5786 v3.AddArg3(dst, v4, mem)
5787 v1.AddArg3(dst, v2, v3)
5788 v.AddArg3(dst, v0, v1)
5789 return true
5790 }
5791
5792
5793
5794 for {
5795 if auxIntToInt64(v.AuxInt) != 12 {
5796 break
5797 }
5798 t := auxToType(v.Aux)
5799 dst := v_0
5800 src := v_1
5801 mem := v_2
5802 if !(t.Alignment()%4 == 0) {
5803 break
5804 }
5805 v.reset(OpMIPS64MOVWstore)
5806 v.AuxInt = int32ToAuxInt(8)
5807 v0 := b.NewValue0(v.Pos, OpMIPS64MOVWload, typ.Int32)
5808 v0.AuxInt = int32ToAuxInt(8)
5809 v0.AddArg2(src, mem)
5810 v1 := b.NewValue0(v.Pos, OpMIPS64MOVWstore, types.TypeMem)
5811 v1.AuxInt = int32ToAuxInt(4)
5812 v2 := b.NewValue0(v.Pos, OpMIPS64MOVWload, typ.Int32)
5813 v2.AuxInt = int32ToAuxInt(4)
5814 v2.AddArg2(src, mem)
5815 v3 := b.NewValue0(v.Pos, OpMIPS64MOVWstore, types.TypeMem)
5816 v4 := b.NewValue0(v.Pos, OpMIPS64MOVWload, typ.Int32)
5817 v4.AddArg2(src, mem)
5818 v3.AddArg3(dst, v4, mem)
5819 v1.AddArg3(dst, v2, v3)
5820 v.AddArg3(dst, v0, v1)
5821 return true
5822 }
5823
5824
5825
5826 for {
5827 if auxIntToInt64(v.AuxInt) != 16 {
5828 break
5829 }
5830 t := auxToType(v.Aux)
5831 dst := v_0
5832 src := v_1
5833 mem := v_2
5834 if !(t.Alignment()%8 == 0) {
5835 break
5836 }
5837 v.reset(OpMIPS64MOVVstore)
5838 v.AuxInt = int32ToAuxInt(8)
5839 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVload, typ.UInt64)
5840 v0.AuxInt = int32ToAuxInt(8)
5841 v0.AddArg2(src, mem)
5842 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVstore, types.TypeMem)
5843 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVload, typ.UInt64)
5844 v2.AddArg2(src, mem)
5845 v1.AddArg3(dst, v2, mem)
5846 v.AddArg3(dst, v0, v1)
5847 return true
5848 }
5849
5850
5851
5852 for {
5853 if auxIntToInt64(v.AuxInt) != 24 {
5854 break
5855 }
5856 t := auxToType(v.Aux)
5857 dst := v_0
5858 src := v_1
5859 mem := v_2
5860 if !(t.Alignment()%8 == 0) {
5861 break
5862 }
5863 v.reset(OpMIPS64MOVVstore)
5864 v.AuxInt = int32ToAuxInt(16)
5865 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVload, typ.UInt64)
5866 v0.AuxInt = int32ToAuxInt(16)
5867 v0.AddArg2(src, mem)
5868 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVstore, types.TypeMem)
5869 v1.AuxInt = int32ToAuxInt(8)
5870 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVload, typ.UInt64)
5871 v2.AuxInt = int32ToAuxInt(8)
5872 v2.AddArg2(src, mem)
5873 v3 := b.NewValue0(v.Pos, OpMIPS64MOVVstore, types.TypeMem)
5874 v4 := b.NewValue0(v.Pos, OpMIPS64MOVVload, typ.UInt64)
5875 v4.AddArg2(src, mem)
5876 v3.AddArg3(dst, v4, mem)
5877 v1.AddArg3(dst, v2, v3)
5878 v.AddArg3(dst, v0, v1)
5879 return true
5880 }
5881
5882
5883
5884 for {
5885 s := auxIntToInt64(v.AuxInt)
5886 t := auxToType(v.Aux)
5887 dst := v_0
5888 src := v_1
5889 mem := v_2
5890 if !(s%8 == 0 && s >= 24 && s <= 8*128 && t.Alignment()%8 == 0 && logLargeCopy(v, s)) {
5891 break
5892 }
5893 v.reset(OpMIPS64DUFFCOPY)
5894 v.AuxInt = int64ToAuxInt(16 * (128 - s/8))
5895 v.AddArg3(dst, src, mem)
5896 return true
5897 }
5898
5899
5900
5901 for {
5902 s := auxIntToInt64(v.AuxInt)
5903 t := auxToType(v.Aux)
5904 dst := v_0
5905 src := v_1
5906 mem := v_2
5907 if !(s > 24 && logLargeCopy(v, s) || t.Alignment()%8 != 0) {
5908 break
5909 }
5910 v.reset(OpMIPS64LoweredMove)
5911 v.AuxInt = int64ToAuxInt(t.Alignment())
5912 v0 := b.NewValue0(v.Pos, OpMIPS64ADDVconst, src.Type)
5913 v0.AuxInt = int64ToAuxInt(s - moveSize(t.Alignment(), config))
5914 v0.AddArg(src)
5915 v.AddArg4(dst, src, v0, mem)
5916 return true
5917 }
5918 return false
5919 }
5920 func rewriteValueMIPS64_OpMul16(v *Value) bool {
5921 v_1 := v.Args[1]
5922 v_0 := v.Args[0]
5923 b := v.Block
5924 typ := &b.Func.Config.Types
5925
5926
5927 for {
5928 x := v_0
5929 y := v_1
5930 v.reset(OpSelect1)
5931 v0 := b.NewValue0(v.Pos, OpMIPS64MULVU, types.NewTuple(typ.UInt64, typ.UInt64))
5932 v0.AddArg2(x, y)
5933 v.AddArg(v0)
5934 return true
5935 }
5936 }
5937 func rewriteValueMIPS64_OpMul32(v *Value) bool {
5938 v_1 := v.Args[1]
5939 v_0 := v.Args[0]
5940 b := v.Block
5941 typ := &b.Func.Config.Types
5942
5943
5944 for {
5945 x := v_0
5946 y := v_1
5947 v.reset(OpSelect1)
5948 v0 := b.NewValue0(v.Pos, OpMIPS64MULVU, types.NewTuple(typ.UInt64, typ.UInt64))
5949 v0.AddArg2(x, y)
5950 v.AddArg(v0)
5951 return true
5952 }
5953 }
5954 func rewriteValueMIPS64_OpMul64(v *Value) bool {
5955 v_1 := v.Args[1]
5956 v_0 := v.Args[0]
5957 b := v.Block
5958 typ := &b.Func.Config.Types
5959
5960
5961 for {
5962 x := v_0
5963 y := v_1
5964 v.reset(OpSelect1)
5965 v0 := b.NewValue0(v.Pos, OpMIPS64MULVU, types.NewTuple(typ.UInt64, typ.UInt64))
5966 v0.AddArg2(x, y)
5967 v.AddArg(v0)
5968 return true
5969 }
5970 }
5971 func rewriteValueMIPS64_OpMul8(v *Value) bool {
5972 v_1 := v.Args[1]
5973 v_0 := v.Args[0]
5974 b := v.Block
5975 typ := &b.Func.Config.Types
5976
5977
5978 for {
5979 x := v_0
5980 y := v_1
5981 v.reset(OpSelect1)
5982 v0 := b.NewValue0(v.Pos, OpMIPS64MULVU, types.NewTuple(typ.UInt64, typ.UInt64))
5983 v0.AddArg2(x, y)
5984 v.AddArg(v0)
5985 return true
5986 }
5987 }
5988 func rewriteValueMIPS64_OpNeq16(v *Value) bool {
5989 v_1 := v.Args[1]
5990 v_0 := v.Args[0]
5991 b := v.Block
5992 typ := &b.Func.Config.Types
5993
5994
5995 for {
5996 x := v_0
5997 y := v_1
5998 v.reset(OpMIPS64SGTU)
5999 v0 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.UInt64)
6000 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
6001 v1.AddArg(x)
6002 v2 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6003 v2.AddArg(y)
6004 v0.AddArg2(v1, v2)
6005 v3 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6006 v3.AuxInt = int64ToAuxInt(0)
6007 v.AddArg2(v0, v3)
6008 return true
6009 }
6010 }
6011 func rewriteValueMIPS64_OpNeq32(v *Value) bool {
6012 v_1 := v.Args[1]
6013 v_0 := v.Args[0]
6014 b := v.Block
6015 typ := &b.Func.Config.Types
6016
6017
6018 for {
6019 x := v_0
6020 y := v_1
6021 v.reset(OpMIPS64SGTU)
6022 v0 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.UInt64)
6023 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6024 v1.AddArg(x)
6025 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6026 v2.AddArg(y)
6027 v0.AddArg2(v1, v2)
6028 v3 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6029 v3.AuxInt = int64ToAuxInt(0)
6030 v.AddArg2(v0, v3)
6031 return true
6032 }
6033 }
6034 func rewriteValueMIPS64_OpNeq32F(v *Value) bool {
6035 v_1 := v.Args[1]
6036 v_0 := v.Args[0]
6037 b := v.Block
6038
6039
6040 for {
6041 x := v_0
6042 y := v_1
6043 v.reset(OpMIPS64FPFlagFalse)
6044 v0 := b.NewValue0(v.Pos, OpMIPS64CMPEQF, types.TypeFlags)
6045 v0.AddArg2(x, y)
6046 v.AddArg(v0)
6047 return true
6048 }
6049 }
6050 func rewriteValueMIPS64_OpNeq64(v *Value) bool {
6051 v_1 := v.Args[1]
6052 v_0 := v.Args[0]
6053 b := v.Block
6054 typ := &b.Func.Config.Types
6055
6056
6057 for {
6058 x := v_0
6059 y := v_1
6060 v.reset(OpMIPS64SGTU)
6061 v0 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.UInt64)
6062 v0.AddArg2(x, y)
6063 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6064 v1.AuxInt = int64ToAuxInt(0)
6065 v.AddArg2(v0, v1)
6066 return true
6067 }
6068 }
6069 func rewriteValueMIPS64_OpNeq64F(v *Value) bool {
6070 v_1 := v.Args[1]
6071 v_0 := v.Args[0]
6072 b := v.Block
6073
6074
6075 for {
6076 x := v_0
6077 y := v_1
6078 v.reset(OpMIPS64FPFlagFalse)
6079 v0 := b.NewValue0(v.Pos, OpMIPS64CMPEQD, types.TypeFlags)
6080 v0.AddArg2(x, y)
6081 v.AddArg(v0)
6082 return true
6083 }
6084 }
6085 func rewriteValueMIPS64_OpNeq8(v *Value) bool {
6086 v_1 := v.Args[1]
6087 v_0 := v.Args[0]
6088 b := v.Block
6089 typ := &b.Func.Config.Types
6090
6091
6092 for {
6093 x := v_0
6094 y := v_1
6095 v.reset(OpMIPS64SGTU)
6096 v0 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.UInt64)
6097 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
6098 v1.AddArg(x)
6099 v2 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
6100 v2.AddArg(y)
6101 v0.AddArg2(v1, v2)
6102 v3 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6103 v3.AuxInt = int64ToAuxInt(0)
6104 v.AddArg2(v0, v3)
6105 return true
6106 }
6107 }
6108 func rewriteValueMIPS64_OpNeqPtr(v *Value) bool {
6109 v_1 := v.Args[1]
6110 v_0 := v.Args[0]
6111 b := v.Block
6112 typ := &b.Func.Config.Types
6113
6114
6115 for {
6116 x := v_0
6117 y := v_1
6118 v.reset(OpMIPS64SGTU)
6119 v0 := b.NewValue0(v.Pos, OpMIPS64XOR, typ.UInt64)
6120 v0.AddArg2(x, y)
6121 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6122 v1.AuxInt = int64ToAuxInt(0)
6123 v.AddArg2(v0, v1)
6124 return true
6125 }
6126 }
6127 func rewriteValueMIPS64_OpNot(v *Value) bool {
6128 v_0 := v.Args[0]
6129
6130
6131 for {
6132 x := v_0
6133 v.reset(OpMIPS64XORconst)
6134 v.AuxInt = int64ToAuxInt(1)
6135 v.AddArg(x)
6136 return true
6137 }
6138 }
6139 func rewriteValueMIPS64_OpOffPtr(v *Value) bool {
6140 v_0 := v.Args[0]
6141 b := v.Block
6142 typ := &b.Func.Config.Types
6143
6144
6145
6146 for {
6147 off := auxIntToInt64(v.AuxInt)
6148 ptr := v_0
6149 if ptr.Op != OpSP || !(is32Bit(off)) {
6150 break
6151 }
6152 v.reset(OpMIPS64MOVVaddr)
6153 v.AuxInt = int32ToAuxInt(int32(off))
6154 v.AddArg(ptr)
6155 return true
6156 }
6157
6158
6159
6160 for {
6161 off := auxIntToInt64(v.AuxInt)
6162 ptr := v_0
6163 if !(is32Bit(off)) {
6164 break
6165 }
6166 v.reset(OpMIPS64ADDVconst)
6167 v.AuxInt = int64ToAuxInt(off)
6168 v.AddArg(ptr)
6169 return true
6170 }
6171
6172
6173
6174 for {
6175 off := auxIntToInt64(v.AuxInt)
6176 ptr := v_0
6177 if !(!is32Bit(off)) {
6178 break
6179 }
6180 v.reset(OpMIPS64ADDV)
6181 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6182 v0.AuxInt = int64ToAuxInt(off)
6183 v.AddArg2(ptr, v0)
6184 return true
6185 }
6186 return false
6187 }
6188 func rewriteValueMIPS64_OpRotateLeft16(v *Value) bool {
6189 v_1 := v.Args[1]
6190 v_0 := v.Args[0]
6191 b := v.Block
6192 typ := &b.Func.Config.Types
6193
6194
6195 for {
6196 t := v.Type
6197 x := v_0
6198 if v_1.Op != OpMIPS64MOVVconst {
6199 break
6200 }
6201 c := auxIntToInt64(v_1.AuxInt)
6202 v.reset(OpOr16)
6203 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
6204 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6205 v1.AuxInt = int64ToAuxInt(c & 15)
6206 v0.AddArg2(x, v1)
6207 v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
6208 v3 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6209 v3.AuxInt = int64ToAuxInt(-c & 15)
6210 v2.AddArg2(x, v3)
6211 v.AddArg2(v0, v2)
6212 return true
6213 }
6214 return false
6215 }
6216 func rewriteValueMIPS64_OpRotateLeft32(v *Value) bool {
6217 v_1 := v.Args[1]
6218 v_0 := v.Args[0]
6219 b := v.Block
6220 typ := &b.Func.Config.Types
6221
6222
6223 for {
6224 t := v.Type
6225 x := v_0
6226 if v_1.Op != OpMIPS64MOVVconst {
6227 break
6228 }
6229 c := auxIntToInt64(v_1.AuxInt)
6230 v.reset(OpOr32)
6231 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
6232 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6233 v1.AuxInt = int64ToAuxInt(c & 31)
6234 v0.AddArg2(x, v1)
6235 v2 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
6236 v3 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6237 v3.AuxInt = int64ToAuxInt(-c & 31)
6238 v2.AddArg2(x, v3)
6239 v.AddArg2(v0, v2)
6240 return true
6241 }
6242 return false
6243 }
6244 func rewriteValueMIPS64_OpRotateLeft64(v *Value) bool {
6245 v_1 := v.Args[1]
6246 v_0 := v.Args[0]
6247 b := v.Block
6248 typ := &b.Func.Config.Types
6249
6250
6251 for {
6252 t := v.Type
6253 x := v_0
6254 if v_1.Op != OpMIPS64MOVVconst {
6255 break
6256 }
6257 c := auxIntToInt64(v_1.AuxInt)
6258 v.reset(OpOr64)
6259 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
6260 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6261 v1.AuxInt = int64ToAuxInt(c & 63)
6262 v0.AddArg2(x, v1)
6263 v2 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
6264 v3 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6265 v3.AuxInt = int64ToAuxInt(-c & 63)
6266 v2.AddArg2(x, v3)
6267 v.AddArg2(v0, v2)
6268 return true
6269 }
6270 return false
6271 }
6272 func rewriteValueMIPS64_OpRotateLeft8(v *Value) bool {
6273 v_1 := v.Args[1]
6274 v_0 := v.Args[0]
6275 b := v.Block
6276 typ := &b.Func.Config.Types
6277
6278
6279 for {
6280 t := v.Type
6281 x := v_0
6282 if v_1.Op != OpMIPS64MOVVconst {
6283 break
6284 }
6285 c := auxIntToInt64(v_1.AuxInt)
6286 v.reset(OpOr8)
6287 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
6288 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6289 v1.AuxInt = int64ToAuxInt(c & 7)
6290 v0.AddArg2(x, v1)
6291 v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
6292 v3 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6293 v3.AuxInt = int64ToAuxInt(-c & 7)
6294 v2.AddArg2(x, v3)
6295 v.AddArg2(v0, v2)
6296 return true
6297 }
6298 return false
6299 }
6300 func rewriteValueMIPS64_OpRsh16Ux16(v *Value) bool {
6301 v_1 := v.Args[1]
6302 v_0 := v.Args[0]
6303 b := v.Block
6304 typ := &b.Func.Config.Types
6305
6306
6307 for {
6308 t := v.Type
6309 x := v_0
6310 y := v_1
6311 v.reset(OpMIPS64AND)
6312 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6313 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6314 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6315 v2.AuxInt = int64ToAuxInt(64)
6316 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6317 v3.AddArg(y)
6318 v1.AddArg2(v2, v3)
6319 v0.AddArg(v1)
6320 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6321 v5 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6322 v5.AddArg(x)
6323 v4.AddArg2(v5, v3)
6324 v.AddArg2(v0, v4)
6325 return true
6326 }
6327 }
6328 func rewriteValueMIPS64_OpRsh16Ux32(v *Value) bool {
6329 v_1 := v.Args[1]
6330 v_0 := v.Args[0]
6331 b := v.Block
6332 typ := &b.Func.Config.Types
6333
6334
6335 for {
6336 t := v.Type
6337 x := v_0
6338 y := v_1
6339 v.reset(OpMIPS64AND)
6340 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6341 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6342 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6343 v2.AuxInt = int64ToAuxInt(64)
6344 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6345 v3.AddArg(y)
6346 v1.AddArg2(v2, v3)
6347 v0.AddArg(v1)
6348 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6349 v5 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6350 v5.AddArg(x)
6351 v4.AddArg2(v5, v3)
6352 v.AddArg2(v0, v4)
6353 return true
6354 }
6355 }
6356 func rewriteValueMIPS64_OpRsh16Ux64(v *Value) bool {
6357 v_1 := v.Args[1]
6358 v_0 := v.Args[0]
6359 b := v.Block
6360 typ := &b.Func.Config.Types
6361
6362
6363 for {
6364 t := v.Type
6365 x := v_0
6366 y := v_1
6367 v.reset(OpMIPS64AND)
6368 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6369 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6370 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6371 v2.AuxInt = int64ToAuxInt(64)
6372 v1.AddArg2(v2, y)
6373 v0.AddArg(v1)
6374 v3 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6375 v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6376 v4.AddArg(x)
6377 v3.AddArg2(v4, y)
6378 v.AddArg2(v0, v3)
6379 return true
6380 }
6381 }
6382 func rewriteValueMIPS64_OpRsh16Ux8(v *Value) bool {
6383 v_1 := v.Args[1]
6384 v_0 := v.Args[0]
6385 b := v.Block
6386 typ := &b.Func.Config.Types
6387
6388
6389 for {
6390 t := v.Type
6391 x := v_0
6392 y := v_1
6393 v.reset(OpMIPS64AND)
6394 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6395 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6396 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6397 v2.AuxInt = int64ToAuxInt(64)
6398 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
6399 v3.AddArg(y)
6400 v1.AddArg2(v2, v3)
6401 v0.AddArg(v1)
6402 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6403 v5 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6404 v5.AddArg(x)
6405 v4.AddArg2(v5, v3)
6406 v.AddArg2(v0, v4)
6407 return true
6408 }
6409 }
6410 func rewriteValueMIPS64_OpRsh16x16(v *Value) bool {
6411 v_1 := v.Args[1]
6412 v_0 := v.Args[0]
6413 b := v.Block
6414 typ := &b.Func.Config.Types
6415
6416
6417 for {
6418 t := v.Type
6419 x := v_0
6420 y := v_1
6421 v.reset(OpMIPS64SRAV)
6422 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
6423 v0.AddArg(x)
6424 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6425 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6426 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6427 v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6428 v4.AddArg(y)
6429 v5 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6430 v5.AuxInt = int64ToAuxInt(63)
6431 v3.AddArg2(v4, v5)
6432 v2.AddArg(v3)
6433 v1.AddArg2(v2, v4)
6434 v.AddArg2(v0, v1)
6435 return true
6436 }
6437 }
6438 func rewriteValueMIPS64_OpRsh16x32(v *Value) bool {
6439 v_1 := v.Args[1]
6440 v_0 := v.Args[0]
6441 b := v.Block
6442 typ := &b.Func.Config.Types
6443
6444
6445 for {
6446 t := v.Type
6447 x := v_0
6448 y := v_1
6449 v.reset(OpMIPS64SRAV)
6450 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
6451 v0.AddArg(x)
6452 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6453 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6454 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6455 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6456 v4.AddArg(y)
6457 v5 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6458 v5.AuxInt = int64ToAuxInt(63)
6459 v3.AddArg2(v4, v5)
6460 v2.AddArg(v3)
6461 v1.AddArg2(v2, v4)
6462 v.AddArg2(v0, v1)
6463 return true
6464 }
6465 }
6466 func rewriteValueMIPS64_OpRsh16x64(v *Value) bool {
6467 v_1 := v.Args[1]
6468 v_0 := v.Args[0]
6469 b := v.Block
6470 typ := &b.Func.Config.Types
6471
6472
6473 for {
6474 t := v.Type
6475 x := v_0
6476 y := v_1
6477 v.reset(OpMIPS64SRAV)
6478 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
6479 v0.AddArg(x)
6480 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6481 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6482 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6483 v4 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6484 v4.AuxInt = int64ToAuxInt(63)
6485 v3.AddArg2(y, v4)
6486 v2.AddArg(v3)
6487 v1.AddArg2(v2, y)
6488 v.AddArg2(v0, v1)
6489 return true
6490 }
6491 }
6492 func rewriteValueMIPS64_OpRsh16x8(v *Value) bool {
6493 v_1 := v.Args[1]
6494 v_0 := v.Args[0]
6495 b := v.Block
6496 typ := &b.Func.Config.Types
6497
6498
6499 for {
6500 t := v.Type
6501 x := v_0
6502 y := v_1
6503 v.reset(OpMIPS64SRAV)
6504 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
6505 v0.AddArg(x)
6506 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6507 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6508 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6509 v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
6510 v4.AddArg(y)
6511 v5 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6512 v5.AuxInt = int64ToAuxInt(63)
6513 v3.AddArg2(v4, v5)
6514 v2.AddArg(v3)
6515 v1.AddArg2(v2, v4)
6516 v.AddArg2(v0, v1)
6517 return true
6518 }
6519 }
6520 func rewriteValueMIPS64_OpRsh32Ux16(v *Value) bool {
6521 v_1 := v.Args[1]
6522 v_0 := v.Args[0]
6523 b := v.Block
6524 typ := &b.Func.Config.Types
6525
6526
6527 for {
6528 t := v.Type
6529 x := v_0
6530 y := v_1
6531 v.reset(OpMIPS64AND)
6532 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6533 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6534 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6535 v2.AuxInt = int64ToAuxInt(64)
6536 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6537 v3.AddArg(y)
6538 v1.AddArg2(v2, v3)
6539 v0.AddArg(v1)
6540 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6541 v5 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6542 v5.AddArg(x)
6543 v4.AddArg2(v5, v3)
6544 v.AddArg2(v0, v4)
6545 return true
6546 }
6547 }
6548 func rewriteValueMIPS64_OpRsh32Ux32(v *Value) bool {
6549 v_1 := v.Args[1]
6550 v_0 := v.Args[0]
6551 b := v.Block
6552 typ := &b.Func.Config.Types
6553
6554
6555 for {
6556 t := v.Type
6557 x := v_0
6558 y := v_1
6559 v.reset(OpMIPS64AND)
6560 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6561 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6562 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6563 v2.AuxInt = int64ToAuxInt(64)
6564 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6565 v3.AddArg(y)
6566 v1.AddArg2(v2, v3)
6567 v0.AddArg(v1)
6568 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6569 v5 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6570 v5.AddArg(x)
6571 v4.AddArg2(v5, v3)
6572 v.AddArg2(v0, v4)
6573 return true
6574 }
6575 }
6576 func rewriteValueMIPS64_OpRsh32Ux64(v *Value) bool {
6577 v_1 := v.Args[1]
6578 v_0 := v.Args[0]
6579 b := v.Block
6580 typ := &b.Func.Config.Types
6581
6582
6583 for {
6584 t := v.Type
6585 x := v_0
6586 y := v_1
6587 v.reset(OpMIPS64AND)
6588 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6589 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6590 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6591 v2.AuxInt = int64ToAuxInt(64)
6592 v1.AddArg2(v2, y)
6593 v0.AddArg(v1)
6594 v3 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6595 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6596 v4.AddArg(x)
6597 v3.AddArg2(v4, y)
6598 v.AddArg2(v0, v3)
6599 return true
6600 }
6601 }
6602 func rewriteValueMIPS64_OpRsh32Ux8(v *Value) bool {
6603 v_1 := v.Args[1]
6604 v_0 := v.Args[0]
6605 b := v.Block
6606 typ := &b.Func.Config.Types
6607
6608
6609 for {
6610 t := v.Type
6611 x := v_0
6612 y := v_1
6613 v.reset(OpMIPS64AND)
6614 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6615 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6616 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6617 v2.AuxInt = int64ToAuxInt(64)
6618 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
6619 v3.AddArg(y)
6620 v1.AddArg2(v2, v3)
6621 v0.AddArg(v1)
6622 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6623 v5 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6624 v5.AddArg(x)
6625 v4.AddArg2(v5, v3)
6626 v.AddArg2(v0, v4)
6627 return true
6628 }
6629 }
6630 func rewriteValueMIPS64_OpRsh32x16(v *Value) bool {
6631 v_1 := v.Args[1]
6632 v_0 := v.Args[0]
6633 b := v.Block
6634 typ := &b.Func.Config.Types
6635
6636
6637 for {
6638 t := v.Type
6639 x := v_0
6640 y := v_1
6641 v.reset(OpMIPS64SRAV)
6642 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
6643 v0.AddArg(x)
6644 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6645 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6646 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6647 v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6648 v4.AddArg(y)
6649 v5 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6650 v5.AuxInt = int64ToAuxInt(63)
6651 v3.AddArg2(v4, v5)
6652 v2.AddArg(v3)
6653 v1.AddArg2(v2, v4)
6654 v.AddArg2(v0, v1)
6655 return true
6656 }
6657 }
6658 func rewriteValueMIPS64_OpRsh32x32(v *Value) bool {
6659 v_1 := v.Args[1]
6660 v_0 := v.Args[0]
6661 b := v.Block
6662 typ := &b.Func.Config.Types
6663
6664
6665 for {
6666 t := v.Type
6667 x := v_0
6668 y := v_1
6669 v.reset(OpMIPS64SRAV)
6670 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
6671 v0.AddArg(x)
6672 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6673 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6674 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6675 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6676 v4.AddArg(y)
6677 v5 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6678 v5.AuxInt = int64ToAuxInt(63)
6679 v3.AddArg2(v4, v5)
6680 v2.AddArg(v3)
6681 v1.AddArg2(v2, v4)
6682 v.AddArg2(v0, v1)
6683 return true
6684 }
6685 }
6686 func rewriteValueMIPS64_OpRsh32x64(v *Value) bool {
6687 v_1 := v.Args[1]
6688 v_0 := v.Args[0]
6689 b := v.Block
6690 typ := &b.Func.Config.Types
6691
6692
6693 for {
6694 t := v.Type
6695 x := v_0
6696 y := v_1
6697 v.reset(OpMIPS64SRAV)
6698 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
6699 v0.AddArg(x)
6700 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6701 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6702 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6703 v4 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6704 v4.AuxInt = int64ToAuxInt(63)
6705 v3.AddArg2(y, v4)
6706 v2.AddArg(v3)
6707 v1.AddArg2(v2, y)
6708 v.AddArg2(v0, v1)
6709 return true
6710 }
6711 }
6712 func rewriteValueMIPS64_OpRsh32x8(v *Value) bool {
6713 v_1 := v.Args[1]
6714 v_0 := v.Args[0]
6715 b := v.Block
6716 typ := &b.Func.Config.Types
6717
6718
6719 for {
6720 t := v.Type
6721 x := v_0
6722 y := v_1
6723 v.reset(OpMIPS64SRAV)
6724 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
6725 v0.AddArg(x)
6726 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6727 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6728 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6729 v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
6730 v4.AddArg(y)
6731 v5 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6732 v5.AuxInt = int64ToAuxInt(63)
6733 v3.AddArg2(v4, v5)
6734 v2.AddArg(v3)
6735 v1.AddArg2(v2, v4)
6736 v.AddArg2(v0, v1)
6737 return true
6738 }
6739 }
6740 func rewriteValueMIPS64_OpRsh64Ux16(v *Value) bool {
6741 v_1 := v.Args[1]
6742 v_0 := v.Args[0]
6743 b := v.Block
6744 typ := &b.Func.Config.Types
6745
6746
6747 for {
6748 t := v.Type
6749 x := v_0
6750 y := v_1
6751 v.reset(OpMIPS64AND)
6752 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6753 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6754 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6755 v2.AuxInt = int64ToAuxInt(64)
6756 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6757 v3.AddArg(y)
6758 v1.AddArg2(v2, v3)
6759 v0.AddArg(v1)
6760 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6761 v4.AddArg2(x, v3)
6762 v.AddArg2(v0, v4)
6763 return true
6764 }
6765 }
6766 func rewriteValueMIPS64_OpRsh64Ux32(v *Value) bool {
6767 v_1 := v.Args[1]
6768 v_0 := v.Args[0]
6769 b := v.Block
6770 typ := &b.Func.Config.Types
6771
6772
6773 for {
6774 t := v.Type
6775 x := v_0
6776 y := v_1
6777 v.reset(OpMIPS64AND)
6778 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6779 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6780 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6781 v2.AuxInt = int64ToAuxInt(64)
6782 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6783 v3.AddArg(y)
6784 v1.AddArg2(v2, v3)
6785 v0.AddArg(v1)
6786 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6787 v4.AddArg2(x, v3)
6788 v.AddArg2(v0, v4)
6789 return true
6790 }
6791 }
6792 func rewriteValueMIPS64_OpRsh64Ux64(v *Value) bool {
6793 v_1 := v.Args[1]
6794 v_0 := v.Args[0]
6795 b := v.Block
6796 typ := &b.Func.Config.Types
6797
6798
6799 for {
6800 t := v.Type
6801 x := v_0
6802 y := v_1
6803 v.reset(OpMIPS64AND)
6804 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6805 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6806 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6807 v2.AuxInt = int64ToAuxInt(64)
6808 v1.AddArg2(v2, y)
6809 v0.AddArg(v1)
6810 v3 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6811 v3.AddArg2(x, y)
6812 v.AddArg2(v0, v3)
6813 return true
6814 }
6815 }
6816 func rewriteValueMIPS64_OpRsh64Ux8(v *Value) bool {
6817 v_1 := v.Args[1]
6818 v_0 := v.Args[0]
6819 b := v.Block
6820 typ := &b.Func.Config.Types
6821
6822
6823 for {
6824 t := v.Type
6825 x := v_0
6826 y := v_1
6827 v.reset(OpMIPS64AND)
6828 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6829 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6830 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6831 v2.AuxInt = int64ToAuxInt(64)
6832 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
6833 v3.AddArg(y)
6834 v1.AddArg2(v2, v3)
6835 v0.AddArg(v1)
6836 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6837 v4.AddArg2(x, v3)
6838 v.AddArg2(v0, v4)
6839 return true
6840 }
6841 }
6842 func rewriteValueMIPS64_OpRsh64x16(v *Value) bool {
6843 v_1 := v.Args[1]
6844 v_0 := v.Args[0]
6845 b := v.Block
6846 typ := &b.Func.Config.Types
6847
6848
6849 for {
6850 t := v.Type
6851 x := v_0
6852 y := v_1
6853 v.reset(OpMIPS64SRAV)
6854 v0 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6855 v1 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6856 v2 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6857 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6858 v3.AddArg(y)
6859 v4 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6860 v4.AuxInt = int64ToAuxInt(63)
6861 v2.AddArg2(v3, v4)
6862 v1.AddArg(v2)
6863 v0.AddArg2(v1, v3)
6864 v.AddArg2(x, v0)
6865 return true
6866 }
6867 }
6868 func rewriteValueMIPS64_OpRsh64x32(v *Value) bool {
6869 v_1 := v.Args[1]
6870 v_0 := v.Args[0]
6871 b := v.Block
6872 typ := &b.Func.Config.Types
6873
6874
6875 for {
6876 t := v.Type
6877 x := v_0
6878 y := v_1
6879 v.reset(OpMIPS64SRAV)
6880 v0 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6881 v1 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6882 v2 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6883 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6884 v3.AddArg(y)
6885 v4 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6886 v4.AuxInt = int64ToAuxInt(63)
6887 v2.AddArg2(v3, v4)
6888 v1.AddArg(v2)
6889 v0.AddArg2(v1, v3)
6890 v.AddArg2(x, v0)
6891 return true
6892 }
6893 }
6894 func rewriteValueMIPS64_OpRsh64x64(v *Value) bool {
6895 v_1 := v.Args[1]
6896 v_0 := v.Args[0]
6897 b := v.Block
6898 typ := &b.Func.Config.Types
6899
6900
6901 for {
6902 t := v.Type
6903 x := v_0
6904 y := v_1
6905 v.reset(OpMIPS64SRAV)
6906 v0 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6907 v1 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6908 v2 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6909 v3 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6910 v3.AuxInt = int64ToAuxInt(63)
6911 v2.AddArg2(y, v3)
6912 v1.AddArg(v2)
6913 v0.AddArg2(v1, y)
6914 v.AddArg2(x, v0)
6915 return true
6916 }
6917 }
6918 func rewriteValueMIPS64_OpRsh64x8(v *Value) bool {
6919 v_1 := v.Args[1]
6920 v_0 := v.Args[0]
6921 b := v.Block
6922 typ := &b.Func.Config.Types
6923
6924
6925 for {
6926 t := v.Type
6927 x := v_0
6928 y := v_1
6929 v.reset(OpMIPS64SRAV)
6930 v0 := b.NewValue0(v.Pos, OpMIPS64OR, t)
6931 v1 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6932 v2 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6933 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
6934 v3.AddArg(y)
6935 v4 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6936 v4.AuxInt = int64ToAuxInt(63)
6937 v2.AddArg2(v3, v4)
6938 v1.AddArg(v2)
6939 v0.AddArg2(v1, v3)
6940 v.AddArg2(x, v0)
6941 return true
6942 }
6943 }
6944 func rewriteValueMIPS64_OpRsh8Ux16(v *Value) bool {
6945 v_1 := v.Args[1]
6946 v_0 := v.Args[0]
6947 b := v.Block
6948 typ := &b.Func.Config.Types
6949
6950
6951 for {
6952 t := v.Type
6953 x := v_0
6954 y := v_1
6955 v.reset(OpMIPS64AND)
6956 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6957 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6958 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6959 v2.AuxInt = int64ToAuxInt(64)
6960 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6961 v3.AddArg(y)
6962 v1.AddArg2(v2, v3)
6963 v0.AddArg(v1)
6964 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6965 v5 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
6966 v5.AddArg(x)
6967 v4.AddArg2(v5, v3)
6968 v.AddArg2(v0, v4)
6969 return true
6970 }
6971 }
6972 func rewriteValueMIPS64_OpRsh8Ux32(v *Value) bool {
6973 v_1 := v.Args[1]
6974 v_0 := v.Args[0]
6975 b := v.Block
6976 typ := &b.Func.Config.Types
6977
6978
6979 for {
6980 t := v.Type
6981 x := v_0
6982 y := v_1
6983 v.reset(OpMIPS64AND)
6984 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
6985 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
6986 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
6987 v2.AuxInt = int64ToAuxInt(64)
6988 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6989 v3.AddArg(y)
6990 v1.AddArg2(v2, v3)
6991 v0.AddArg(v1)
6992 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
6993 v5 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
6994 v5.AddArg(x)
6995 v4.AddArg2(v5, v3)
6996 v.AddArg2(v0, v4)
6997 return true
6998 }
6999 }
7000 func rewriteValueMIPS64_OpRsh8Ux64(v *Value) bool {
7001 v_1 := v.Args[1]
7002 v_0 := v.Args[0]
7003 b := v.Block
7004 typ := &b.Func.Config.Types
7005
7006
7007 for {
7008 t := v.Type
7009 x := v_0
7010 y := v_1
7011 v.reset(OpMIPS64AND)
7012 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
7013 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
7014 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7015 v2.AuxInt = int64ToAuxInt(64)
7016 v1.AddArg2(v2, y)
7017 v0.AddArg(v1)
7018 v3 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
7019 v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
7020 v4.AddArg(x)
7021 v3.AddArg2(v4, y)
7022 v.AddArg2(v0, v3)
7023 return true
7024 }
7025 }
7026 func rewriteValueMIPS64_OpRsh8Ux8(v *Value) bool {
7027 v_1 := v.Args[1]
7028 v_0 := v.Args[0]
7029 b := v.Block
7030 typ := &b.Func.Config.Types
7031
7032
7033 for {
7034 t := v.Type
7035 x := v_0
7036 y := v_1
7037 v.reset(OpMIPS64AND)
7038 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
7039 v1 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
7040 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7041 v2.AuxInt = int64ToAuxInt(64)
7042 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
7043 v3.AddArg(y)
7044 v1.AddArg2(v2, v3)
7045 v0.AddArg(v1)
7046 v4 := b.NewValue0(v.Pos, OpMIPS64SRLV, t)
7047 v5 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
7048 v5.AddArg(x)
7049 v4.AddArg2(v5, v3)
7050 v.AddArg2(v0, v4)
7051 return true
7052 }
7053 }
7054 func rewriteValueMIPS64_OpRsh8x16(v *Value) bool {
7055 v_1 := v.Args[1]
7056 v_0 := v.Args[0]
7057 b := v.Block
7058 typ := &b.Func.Config.Types
7059
7060
7061 for {
7062 t := v.Type
7063 x := v_0
7064 y := v_1
7065 v.reset(OpMIPS64SRAV)
7066 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
7067 v0.AddArg(x)
7068 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
7069 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
7070 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
7071 v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
7072 v4.AddArg(y)
7073 v5 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7074 v5.AuxInt = int64ToAuxInt(63)
7075 v3.AddArg2(v4, v5)
7076 v2.AddArg(v3)
7077 v1.AddArg2(v2, v4)
7078 v.AddArg2(v0, v1)
7079 return true
7080 }
7081 }
7082 func rewriteValueMIPS64_OpRsh8x32(v *Value) bool {
7083 v_1 := v.Args[1]
7084 v_0 := v.Args[0]
7085 b := v.Block
7086 typ := &b.Func.Config.Types
7087
7088
7089 for {
7090 t := v.Type
7091 x := v_0
7092 y := v_1
7093 v.reset(OpMIPS64SRAV)
7094 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
7095 v0.AddArg(x)
7096 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
7097 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
7098 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
7099 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7100 v4.AddArg(y)
7101 v5 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7102 v5.AuxInt = int64ToAuxInt(63)
7103 v3.AddArg2(v4, v5)
7104 v2.AddArg(v3)
7105 v1.AddArg2(v2, v4)
7106 v.AddArg2(v0, v1)
7107 return true
7108 }
7109 }
7110 func rewriteValueMIPS64_OpRsh8x64(v *Value) bool {
7111 v_1 := v.Args[1]
7112 v_0 := v.Args[0]
7113 b := v.Block
7114 typ := &b.Func.Config.Types
7115
7116
7117 for {
7118 t := v.Type
7119 x := v_0
7120 y := v_1
7121 v.reset(OpMIPS64SRAV)
7122 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
7123 v0.AddArg(x)
7124 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
7125 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
7126 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
7127 v4 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7128 v4.AuxInt = int64ToAuxInt(63)
7129 v3.AddArg2(y, v4)
7130 v2.AddArg(v3)
7131 v1.AddArg2(v2, y)
7132 v.AddArg2(v0, v1)
7133 return true
7134 }
7135 }
7136 func rewriteValueMIPS64_OpRsh8x8(v *Value) bool {
7137 v_1 := v.Args[1]
7138 v_0 := v.Args[0]
7139 b := v.Block
7140 typ := &b.Func.Config.Types
7141
7142
7143 for {
7144 t := v.Type
7145 x := v_0
7146 y := v_1
7147 v.reset(OpMIPS64SRAV)
7148 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
7149 v0.AddArg(x)
7150 v1 := b.NewValue0(v.Pos, OpMIPS64OR, t)
7151 v2 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
7152 v3 := b.NewValue0(v.Pos, OpMIPS64SGTU, typ.Bool)
7153 v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
7154 v4.AddArg(y)
7155 v5 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7156 v5.AuxInt = int64ToAuxInt(63)
7157 v3.AddArg2(v4, v5)
7158 v2.AddArg(v3)
7159 v1.AddArg2(v2, v4)
7160 v.AddArg2(v0, v1)
7161 return true
7162 }
7163 }
7164 func rewriteValueMIPS64_OpSelect0(v *Value) bool {
7165 v_0 := v.Args[0]
7166 b := v.Block
7167 typ := &b.Func.Config.Types
7168
7169
7170 for {
7171 if v_0.Op != OpMul64uover {
7172 break
7173 }
7174 y := v_0.Args[1]
7175 x := v_0.Args[0]
7176 v.reset(OpSelect1)
7177 v.Type = typ.UInt64
7178 v0 := b.NewValue0(v.Pos, OpMIPS64MULVU, types.NewTuple(typ.UInt64, typ.UInt64))
7179 v0.AddArg2(x, y)
7180 v.AddArg(v0)
7181 return true
7182 }
7183
7184
7185 for {
7186 t := v.Type
7187 if v_0.Op != OpAdd64carry {
7188 break
7189 }
7190 c := v_0.Args[2]
7191 x := v_0.Args[0]
7192 y := v_0.Args[1]
7193 v.reset(OpMIPS64ADDV)
7194 v0 := b.NewValue0(v.Pos, OpMIPS64ADDV, t)
7195 v0.AddArg2(x, y)
7196 v.AddArg2(v0, c)
7197 return true
7198 }
7199
7200
7201 for {
7202 t := v.Type
7203 if v_0.Op != OpSub64borrow {
7204 break
7205 }
7206 c := v_0.Args[2]
7207 x := v_0.Args[0]
7208 y := v_0.Args[1]
7209 v.reset(OpMIPS64SUBV)
7210 v0 := b.NewValue0(v.Pos, OpMIPS64SUBV, t)
7211 v0.AddArg2(x, y)
7212 v.AddArg2(v0, c)
7213 return true
7214 }
7215
7216
7217 for {
7218 if v_0.Op != OpMIPS64DIVVU {
7219 break
7220 }
7221 _ = v_0.Args[1]
7222 v_0_1 := v_0.Args[1]
7223 if v_0_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 1 {
7224 break
7225 }
7226 v.reset(OpMIPS64MOVVconst)
7227 v.AuxInt = int64ToAuxInt(0)
7228 return true
7229 }
7230
7231
7232
7233 for {
7234 if v_0.Op != OpMIPS64DIVVU {
7235 break
7236 }
7237 _ = v_0.Args[1]
7238 x := v_0.Args[0]
7239 v_0_1 := v_0.Args[1]
7240 if v_0_1.Op != OpMIPS64MOVVconst {
7241 break
7242 }
7243 c := auxIntToInt64(v_0_1.AuxInt)
7244 if !(isPowerOfTwo(c)) {
7245 break
7246 }
7247 v.reset(OpMIPS64ANDconst)
7248 v.AuxInt = int64ToAuxInt(c - 1)
7249 v.AddArg(x)
7250 return true
7251 }
7252
7253
7254
7255 for {
7256 if v_0.Op != OpMIPS64DIVV {
7257 break
7258 }
7259 _ = v_0.Args[1]
7260 v_0_0 := v_0.Args[0]
7261 if v_0_0.Op != OpMIPS64MOVVconst {
7262 break
7263 }
7264 c := auxIntToInt64(v_0_0.AuxInt)
7265 v_0_1 := v_0.Args[1]
7266 if v_0_1.Op != OpMIPS64MOVVconst {
7267 break
7268 }
7269 d := auxIntToInt64(v_0_1.AuxInt)
7270 if !(d != 0) {
7271 break
7272 }
7273 v.reset(OpMIPS64MOVVconst)
7274 v.AuxInt = int64ToAuxInt(c % d)
7275 return true
7276 }
7277
7278
7279
7280 for {
7281 if v_0.Op != OpMIPS64DIVVU {
7282 break
7283 }
7284 _ = v_0.Args[1]
7285 v_0_0 := v_0.Args[0]
7286 if v_0_0.Op != OpMIPS64MOVVconst {
7287 break
7288 }
7289 c := auxIntToInt64(v_0_0.AuxInt)
7290 v_0_1 := v_0.Args[1]
7291 if v_0_1.Op != OpMIPS64MOVVconst {
7292 break
7293 }
7294 d := auxIntToInt64(v_0_1.AuxInt)
7295 if !(d != 0) {
7296 break
7297 }
7298 v.reset(OpMIPS64MOVVconst)
7299 v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
7300 return true
7301 }
7302 return false
7303 }
7304 func rewriteValueMIPS64_OpSelect1(v *Value) bool {
7305 v_0 := v.Args[0]
7306 b := v.Block
7307 typ := &b.Func.Config.Types
7308
7309
7310 for {
7311 if v_0.Op != OpMul64uover {
7312 break
7313 }
7314 y := v_0.Args[1]
7315 x := v_0.Args[0]
7316 v.reset(OpMIPS64SGTU)
7317 v.Type = typ.Bool
7318 v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
7319 v1 := b.NewValue0(v.Pos, OpMIPS64MULVU, types.NewTuple(typ.UInt64, typ.UInt64))
7320 v1.AddArg2(x, y)
7321 v0.AddArg(v1)
7322 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7323 v2.AuxInt = int64ToAuxInt(0)
7324 v.AddArg2(v0, v2)
7325 return true
7326 }
7327
7328
7329 for {
7330 t := v.Type
7331 if v_0.Op != OpAdd64carry {
7332 break
7333 }
7334 c := v_0.Args[2]
7335 x := v_0.Args[0]
7336 y := v_0.Args[1]
7337 v.reset(OpMIPS64OR)
7338 v0 := b.NewValue0(v.Pos, OpMIPS64SGTU, t)
7339 s := b.NewValue0(v.Pos, OpMIPS64ADDV, t)
7340 s.AddArg2(x, y)
7341 v0.AddArg2(x, s)
7342 v2 := b.NewValue0(v.Pos, OpMIPS64SGTU, t)
7343 v3 := b.NewValue0(v.Pos, OpMIPS64ADDV, t)
7344 v3.AddArg2(s, c)
7345 v2.AddArg2(s, v3)
7346 v.AddArg2(v0, v2)
7347 return true
7348 }
7349
7350
7351 for {
7352 t := v.Type
7353 if v_0.Op != OpSub64borrow {
7354 break
7355 }
7356 c := v_0.Args[2]
7357 x := v_0.Args[0]
7358 y := v_0.Args[1]
7359 v.reset(OpMIPS64OR)
7360 v0 := b.NewValue0(v.Pos, OpMIPS64SGTU, t)
7361 s := b.NewValue0(v.Pos, OpMIPS64SUBV, t)
7362 s.AddArg2(x, y)
7363 v0.AddArg2(s, x)
7364 v2 := b.NewValue0(v.Pos, OpMIPS64SGTU, t)
7365 v3 := b.NewValue0(v.Pos, OpMIPS64SUBV, t)
7366 v3.AddArg2(s, c)
7367 v2.AddArg2(v3, s)
7368 v.AddArg2(v0, v2)
7369 return true
7370 }
7371
7372
7373 for {
7374 if v_0.Op != OpMIPS64MULVU {
7375 break
7376 }
7377 _ = v_0.Args[1]
7378 v_0_0 := v_0.Args[0]
7379 v_0_1 := v_0.Args[1]
7380 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
7381 x := v_0_0
7382 if v_0_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != -1 {
7383 continue
7384 }
7385 v.reset(OpMIPS64NEGV)
7386 v.AddArg(x)
7387 return true
7388 }
7389 break
7390 }
7391
7392
7393 for {
7394 if v_0.Op != OpMIPS64MULVU {
7395 break
7396 }
7397 _ = v_0.Args[1]
7398 v_0_0 := v_0.Args[0]
7399 v_0_1 := v_0.Args[1]
7400 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
7401 if v_0_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
7402 continue
7403 }
7404 v.reset(OpMIPS64MOVVconst)
7405 v.AuxInt = int64ToAuxInt(0)
7406 return true
7407 }
7408 break
7409 }
7410
7411
7412 for {
7413 if v_0.Op != OpMIPS64MULVU {
7414 break
7415 }
7416 _ = v_0.Args[1]
7417 v_0_0 := v_0.Args[0]
7418 v_0_1 := v_0.Args[1]
7419 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
7420 x := v_0_0
7421 if v_0_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 1 {
7422 continue
7423 }
7424 v.copyOf(x)
7425 return true
7426 }
7427 break
7428 }
7429
7430
7431
7432 for {
7433 if v_0.Op != OpMIPS64MULVU {
7434 break
7435 }
7436 _ = v_0.Args[1]
7437 v_0_0 := v_0.Args[0]
7438 v_0_1 := v_0.Args[1]
7439 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
7440 x := v_0_0
7441 if v_0_1.Op != OpMIPS64MOVVconst {
7442 continue
7443 }
7444 c := auxIntToInt64(v_0_1.AuxInt)
7445 if !(isPowerOfTwo(c)) {
7446 continue
7447 }
7448 v.reset(OpMIPS64SLLVconst)
7449 v.AuxInt = int64ToAuxInt(log64(c))
7450 v.AddArg(x)
7451 return true
7452 }
7453 break
7454 }
7455
7456
7457 for {
7458 if v_0.Op != OpMIPS64DIVVU {
7459 break
7460 }
7461 _ = v_0.Args[1]
7462 x := v_0.Args[0]
7463 v_0_1 := v_0.Args[1]
7464 if v_0_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 1 {
7465 break
7466 }
7467 v.copyOf(x)
7468 return true
7469 }
7470
7471
7472
7473 for {
7474 if v_0.Op != OpMIPS64DIVVU {
7475 break
7476 }
7477 _ = v_0.Args[1]
7478 x := v_0.Args[0]
7479 v_0_1 := v_0.Args[1]
7480 if v_0_1.Op != OpMIPS64MOVVconst {
7481 break
7482 }
7483 c := auxIntToInt64(v_0_1.AuxInt)
7484 if !(isPowerOfTwo(c)) {
7485 break
7486 }
7487 v.reset(OpMIPS64SRLVconst)
7488 v.AuxInt = int64ToAuxInt(log64(c))
7489 v.AddArg(x)
7490 return true
7491 }
7492
7493
7494 for {
7495 if v_0.Op != OpMIPS64MULVU {
7496 break
7497 }
7498 _ = v_0.Args[1]
7499 v_0_0 := v_0.Args[0]
7500 v_0_1 := v_0.Args[1]
7501 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
7502 if v_0_0.Op != OpMIPS64MOVVconst {
7503 continue
7504 }
7505 c := auxIntToInt64(v_0_0.AuxInt)
7506 if v_0_1.Op != OpMIPS64MOVVconst {
7507 continue
7508 }
7509 d := auxIntToInt64(v_0_1.AuxInt)
7510 v.reset(OpMIPS64MOVVconst)
7511 v.AuxInt = int64ToAuxInt(c * d)
7512 return true
7513 }
7514 break
7515 }
7516
7517
7518
7519 for {
7520 if v_0.Op != OpMIPS64DIVV {
7521 break
7522 }
7523 _ = v_0.Args[1]
7524 v_0_0 := v_0.Args[0]
7525 if v_0_0.Op != OpMIPS64MOVVconst {
7526 break
7527 }
7528 c := auxIntToInt64(v_0_0.AuxInt)
7529 v_0_1 := v_0.Args[1]
7530 if v_0_1.Op != OpMIPS64MOVVconst {
7531 break
7532 }
7533 d := auxIntToInt64(v_0_1.AuxInt)
7534 if !(d != 0) {
7535 break
7536 }
7537 v.reset(OpMIPS64MOVVconst)
7538 v.AuxInt = int64ToAuxInt(c / d)
7539 return true
7540 }
7541
7542
7543
7544 for {
7545 if v_0.Op != OpMIPS64DIVVU {
7546 break
7547 }
7548 _ = v_0.Args[1]
7549 v_0_0 := v_0.Args[0]
7550 if v_0_0.Op != OpMIPS64MOVVconst {
7551 break
7552 }
7553 c := auxIntToInt64(v_0_0.AuxInt)
7554 v_0_1 := v_0.Args[1]
7555 if v_0_1.Op != OpMIPS64MOVVconst {
7556 break
7557 }
7558 d := auxIntToInt64(v_0_1.AuxInt)
7559 if !(d != 0) {
7560 break
7561 }
7562 v.reset(OpMIPS64MOVVconst)
7563 v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
7564 return true
7565 }
7566 return false
7567 }
7568 func rewriteValueMIPS64_OpSlicemask(v *Value) bool {
7569 v_0 := v.Args[0]
7570 b := v.Block
7571
7572
7573 for {
7574 t := v.Type
7575 x := v_0
7576 v.reset(OpMIPS64SRAVconst)
7577 v.AuxInt = int64ToAuxInt(63)
7578 v0 := b.NewValue0(v.Pos, OpMIPS64NEGV, t)
7579 v0.AddArg(x)
7580 v.AddArg(v0)
7581 return true
7582 }
7583 }
7584 func rewriteValueMIPS64_OpStore(v *Value) bool {
7585 v_2 := v.Args[2]
7586 v_1 := v.Args[1]
7587 v_0 := v.Args[0]
7588
7589
7590
7591 for {
7592 t := auxToType(v.Aux)
7593 ptr := v_0
7594 val := v_1
7595 mem := v_2
7596 if !(t.Size() == 1) {
7597 break
7598 }
7599 v.reset(OpMIPS64MOVBstore)
7600 v.AddArg3(ptr, val, mem)
7601 return true
7602 }
7603
7604
7605
7606 for {
7607 t := auxToType(v.Aux)
7608 ptr := v_0
7609 val := v_1
7610 mem := v_2
7611 if !(t.Size() == 2) {
7612 break
7613 }
7614 v.reset(OpMIPS64MOVHstore)
7615 v.AddArg3(ptr, val, mem)
7616 return true
7617 }
7618
7619
7620
7621 for {
7622 t := auxToType(v.Aux)
7623 ptr := v_0
7624 val := v_1
7625 mem := v_2
7626 if !(t.Size() == 4 && !t.IsFloat()) {
7627 break
7628 }
7629 v.reset(OpMIPS64MOVWstore)
7630 v.AddArg3(ptr, val, mem)
7631 return true
7632 }
7633
7634
7635
7636 for {
7637 t := auxToType(v.Aux)
7638 ptr := v_0
7639 val := v_1
7640 mem := v_2
7641 if !(t.Size() == 8 && !t.IsFloat()) {
7642 break
7643 }
7644 v.reset(OpMIPS64MOVVstore)
7645 v.AddArg3(ptr, val, mem)
7646 return true
7647 }
7648
7649
7650
7651 for {
7652 t := auxToType(v.Aux)
7653 ptr := v_0
7654 val := v_1
7655 mem := v_2
7656 if !(t.Size() == 4 && t.IsFloat()) {
7657 break
7658 }
7659 v.reset(OpMIPS64MOVFstore)
7660 v.AddArg3(ptr, val, mem)
7661 return true
7662 }
7663
7664
7665
7666 for {
7667 t := auxToType(v.Aux)
7668 ptr := v_0
7669 val := v_1
7670 mem := v_2
7671 if !(t.Size() == 8 && t.IsFloat()) {
7672 break
7673 }
7674 v.reset(OpMIPS64MOVDstore)
7675 v.AddArg3(ptr, val, mem)
7676 return true
7677 }
7678 return false
7679 }
7680 func rewriteValueMIPS64_OpZero(v *Value) bool {
7681 v_1 := v.Args[1]
7682 v_0 := v.Args[0]
7683 b := v.Block
7684 config := b.Func.Config
7685 typ := &b.Func.Config.Types
7686
7687
7688 for {
7689 if auxIntToInt64(v.AuxInt) != 0 {
7690 break
7691 }
7692 mem := v_1
7693 v.copyOf(mem)
7694 return true
7695 }
7696
7697
7698 for {
7699 if auxIntToInt64(v.AuxInt) != 1 {
7700 break
7701 }
7702 ptr := v_0
7703 mem := v_1
7704 v.reset(OpMIPS64MOVBstore)
7705 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7706 v0.AuxInt = int64ToAuxInt(0)
7707 v.AddArg3(ptr, v0, mem)
7708 return true
7709 }
7710
7711
7712
7713 for {
7714 if auxIntToInt64(v.AuxInt) != 2 {
7715 break
7716 }
7717 t := auxToType(v.Aux)
7718 ptr := v_0
7719 mem := v_1
7720 if !(t.Alignment()%2 == 0) {
7721 break
7722 }
7723 v.reset(OpMIPS64MOVHstore)
7724 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7725 v0.AuxInt = int64ToAuxInt(0)
7726 v.AddArg3(ptr, v0, mem)
7727 return true
7728 }
7729
7730
7731 for {
7732 if auxIntToInt64(v.AuxInt) != 2 {
7733 break
7734 }
7735 ptr := v_0
7736 mem := v_1
7737 v.reset(OpMIPS64MOVBstore)
7738 v.AuxInt = int32ToAuxInt(1)
7739 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7740 v0.AuxInt = int64ToAuxInt(0)
7741 v1 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
7742 v1.AuxInt = int32ToAuxInt(0)
7743 v1.AddArg3(ptr, v0, mem)
7744 v.AddArg3(ptr, v0, v1)
7745 return true
7746 }
7747
7748
7749
7750 for {
7751 if auxIntToInt64(v.AuxInt) != 4 {
7752 break
7753 }
7754 t := auxToType(v.Aux)
7755 ptr := v_0
7756 mem := v_1
7757 if !(t.Alignment()%4 == 0) {
7758 break
7759 }
7760 v.reset(OpMIPS64MOVWstore)
7761 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7762 v0.AuxInt = int64ToAuxInt(0)
7763 v.AddArg3(ptr, v0, mem)
7764 return true
7765 }
7766
7767
7768
7769 for {
7770 if auxIntToInt64(v.AuxInt) != 4 {
7771 break
7772 }
7773 t := auxToType(v.Aux)
7774 ptr := v_0
7775 mem := v_1
7776 if !(t.Alignment()%2 == 0) {
7777 break
7778 }
7779 v.reset(OpMIPS64MOVHstore)
7780 v.AuxInt = int32ToAuxInt(2)
7781 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7782 v0.AuxInt = int64ToAuxInt(0)
7783 v1 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
7784 v1.AuxInt = int32ToAuxInt(0)
7785 v1.AddArg3(ptr, v0, mem)
7786 v.AddArg3(ptr, v0, v1)
7787 return true
7788 }
7789
7790
7791 for {
7792 if auxIntToInt64(v.AuxInt) != 4 {
7793 break
7794 }
7795 ptr := v_0
7796 mem := v_1
7797 v.reset(OpMIPS64MOVBstore)
7798 v.AuxInt = int32ToAuxInt(3)
7799 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7800 v0.AuxInt = int64ToAuxInt(0)
7801 v1 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
7802 v1.AuxInt = int32ToAuxInt(2)
7803 v2 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
7804 v2.AuxInt = int32ToAuxInt(1)
7805 v3 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
7806 v3.AuxInt = int32ToAuxInt(0)
7807 v3.AddArg3(ptr, v0, mem)
7808 v2.AddArg3(ptr, v0, v3)
7809 v1.AddArg3(ptr, v0, v2)
7810 v.AddArg3(ptr, v0, v1)
7811 return true
7812 }
7813
7814
7815
7816 for {
7817 if auxIntToInt64(v.AuxInt) != 8 {
7818 break
7819 }
7820 t := auxToType(v.Aux)
7821 ptr := v_0
7822 mem := v_1
7823 if !(t.Alignment()%8 == 0) {
7824 break
7825 }
7826 v.reset(OpMIPS64MOVVstore)
7827 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7828 v0.AuxInt = int64ToAuxInt(0)
7829 v.AddArg3(ptr, v0, mem)
7830 return true
7831 }
7832
7833
7834
7835 for {
7836 if auxIntToInt64(v.AuxInt) != 8 {
7837 break
7838 }
7839 t := auxToType(v.Aux)
7840 ptr := v_0
7841 mem := v_1
7842 if !(t.Alignment()%4 == 0) {
7843 break
7844 }
7845 v.reset(OpMIPS64MOVWstore)
7846 v.AuxInt = int32ToAuxInt(4)
7847 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7848 v0.AuxInt = int64ToAuxInt(0)
7849 v1 := b.NewValue0(v.Pos, OpMIPS64MOVWstore, types.TypeMem)
7850 v1.AuxInt = int32ToAuxInt(0)
7851 v1.AddArg3(ptr, v0, mem)
7852 v.AddArg3(ptr, v0, v1)
7853 return true
7854 }
7855
7856
7857
7858 for {
7859 if auxIntToInt64(v.AuxInt) != 8 {
7860 break
7861 }
7862 t := auxToType(v.Aux)
7863 ptr := v_0
7864 mem := v_1
7865 if !(t.Alignment()%2 == 0) {
7866 break
7867 }
7868 v.reset(OpMIPS64MOVHstore)
7869 v.AuxInt = int32ToAuxInt(6)
7870 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7871 v0.AuxInt = int64ToAuxInt(0)
7872 v1 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
7873 v1.AuxInt = int32ToAuxInt(4)
7874 v2 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
7875 v2.AuxInt = int32ToAuxInt(2)
7876 v3 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
7877 v3.AuxInt = int32ToAuxInt(0)
7878 v3.AddArg3(ptr, v0, mem)
7879 v2.AddArg3(ptr, v0, v3)
7880 v1.AddArg3(ptr, v0, v2)
7881 v.AddArg3(ptr, v0, v1)
7882 return true
7883 }
7884
7885
7886 for {
7887 if auxIntToInt64(v.AuxInt) != 3 {
7888 break
7889 }
7890 ptr := v_0
7891 mem := v_1
7892 v.reset(OpMIPS64MOVBstore)
7893 v.AuxInt = int32ToAuxInt(2)
7894 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7895 v0.AuxInt = int64ToAuxInt(0)
7896 v1 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
7897 v1.AuxInt = int32ToAuxInt(1)
7898 v2 := b.NewValue0(v.Pos, OpMIPS64MOVBstore, types.TypeMem)
7899 v2.AuxInt = int32ToAuxInt(0)
7900 v2.AddArg3(ptr, v0, mem)
7901 v1.AddArg3(ptr, v0, v2)
7902 v.AddArg3(ptr, v0, v1)
7903 return true
7904 }
7905
7906
7907
7908 for {
7909 if auxIntToInt64(v.AuxInt) != 6 {
7910 break
7911 }
7912 t := auxToType(v.Aux)
7913 ptr := v_0
7914 mem := v_1
7915 if !(t.Alignment()%2 == 0) {
7916 break
7917 }
7918 v.reset(OpMIPS64MOVHstore)
7919 v.AuxInt = int32ToAuxInt(4)
7920 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7921 v0.AuxInt = int64ToAuxInt(0)
7922 v1 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
7923 v1.AuxInt = int32ToAuxInt(2)
7924 v2 := b.NewValue0(v.Pos, OpMIPS64MOVHstore, types.TypeMem)
7925 v2.AuxInt = int32ToAuxInt(0)
7926 v2.AddArg3(ptr, v0, mem)
7927 v1.AddArg3(ptr, v0, v2)
7928 v.AddArg3(ptr, v0, v1)
7929 return true
7930 }
7931
7932
7933
7934 for {
7935 if auxIntToInt64(v.AuxInt) != 12 {
7936 break
7937 }
7938 t := auxToType(v.Aux)
7939 ptr := v_0
7940 mem := v_1
7941 if !(t.Alignment()%4 == 0) {
7942 break
7943 }
7944 v.reset(OpMIPS64MOVWstore)
7945 v.AuxInt = int32ToAuxInt(8)
7946 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7947 v0.AuxInt = int64ToAuxInt(0)
7948 v1 := b.NewValue0(v.Pos, OpMIPS64MOVWstore, types.TypeMem)
7949 v1.AuxInt = int32ToAuxInt(4)
7950 v2 := b.NewValue0(v.Pos, OpMIPS64MOVWstore, types.TypeMem)
7951 v2.AuxInt = int32ToAuxInt(0)
7952 v2.AddArg3(ptr, v0, mem)
7953 v1.AddArg3(ptr, v0, v2)
7954 v.AddArg3(ptr, v0, v1)
7955 return true
7956 }
7957
7958
7959
7960 for {
7961 if auxIntToInt64(v.AuxInt) != 16 {
7962 break
7963 }
7964 t := auxToType(v.Aux)
7965 ptr := v_0
7966 mem := v_1
7967 if !(t.Alignment()%8 == 0) {
7968 break
7969 }
7970 v.reset(OpMIPS64MOVVstore)
7971 v.AuxInt = int32ToAuxInt(8)
7972 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7973 v0.AuxInt = int64ToAuxInt(0)
7974 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVstore, types.TypeMem)
7975 v1.AuxInt = int32ToAuxInt(0)
7976 v1.AddArg3(ptr, v0, mem)
7977 v.AddArg3(ptr, v0, v1)
7978 return true
7979 }
7980
7981
7982
7983 for {
7984 if auxIntToInt64(v.AuxInt) != 24 {
7985 break
7986 }
7987 t := auxToType(v.Aux)
7988 ptr := v_0
7989 mem := v_1
7990 if !(t.Alignment()%8 == 0) {
7991 break
7992 }
7993 v.reset(OpMIPS64MOVVstore)
7994 v.AuxInt = int32ToAuxInt(16)
7995 v0 := b.NewValue0(v.Pos, OpMIPS64MOVVconst, typ.UInt64)
7996 v0.AuxInt = int64ToAuxInt(0)
7997 v1 := b.NewValue0(v.Pos, OpMIPS64MOVVstore, types.TypeMem)
7998 v1.AuxInt = int32ToAuxInt(8)
7999 v2 := b.NewValue0(v.Pos, OpMIPS64MOVVstore, types.TypeMem)
8000 v2.AuxInt = int32ToAuxInt(0)
8001 v2.AddArg3(ptr, v0, mem)
8002 v1.AddArg3(ptr, v0, v2)
8003 v.AddArg3(ptr, v0, v1)
8004 return true
8005 }
8006
8007
8008
8009 for {
8010 s := auxIntToInt64(v.AuxInt)
8011 t := auxToType(v.Aux)
8012 ptr := v_0
8013 mem := v_1
8014 if !(s%8 == 0 && s > 24 && s <= 8*128 && t.Alignment()%8 == 0) {
8015 break
8016 }
8017 v.reset(OpMIPS64DUFFZERO)
8018 v.AuxInt = int64ToAuxInt(8 * (128 - s/8))
8019 v.AddArg2(ptr, mem)
8020 return true
8021 }
8022
8023
8024
8025 for {
8026 s := auxIntToInt64(v.AuxInt)
8027 t := auxToType(v.Aux)
8028 ptr := v_0
8029 mem := v_1
8030 if !(s > 8*128 || t.Alignment()%8 != 0) {
8031 break
8032 }
8033 v.reset(OpMIPS64LoweredZero)
8034 v.AuxInt = int64ToAuxInt(t.Alignment())
8035 v0 := b.NewValue0(v.Pos, OpMIPS64ADDVconst, ptr.Type)
8036 v0.AuxInt = int64ToAuxInt(s - moveSize(t.Alignment(), config))
8037 v0.AddArg(ptr)
8038 v.AddArg3(ptr, v0, mem)
8039 return true
8040 }
8041 return false
8042 }
8043 func rewriteBlockMIPS64(b *Block) bool {
8044 switch b.Kind {
8045 case BlockMIPS64EQ:
8046
8047
8048 for b.Controls[0].Op == OpMIPS64FPFlagTrue {
8049 v_0 := b.Controls[0]
8050 cmp := v_0.Args[0]
8051 b.resetWithControl(BlockMIPS64FPF, cmp)
8052 return true
8053 }
8054
8055
8056 for b.Controls[0].Op == OpMIPS64FPFlagFalse {
8057 v_0 := b.Controls[0]
8058 cmp := v_0.Args[0]
8059 b.resetWithControl(BlockMIPS64FPT, cmp)
8060 return true
8061 }
8062
8063
8064 for b.Controls[0].Op == OpMIPS64XORconst {
8065 v_0 := b.Controls[0]
8066 if auxIntToInt64(v_0.AuxInt) != 1 {
8067 break
8068 }
8069 cmp := v_0.Args[0]
8070 if cmp.Op != OpMIPS64SGT {
8071 break
8072 }
8073 b.resetWithControl(BlockMIPS64NE, cmp)
8074 return true
8075 }
8076
8077
8078 for b.Controls[0].Op == OpMIPS64XORconst {
8079 v_0 := b.Controls[0]
8080 if auxIntToInt64(v_0.AuxInt) != 1 {
8081 break
8082 }
8083 cmp := v_0.Args[0]
8084 if cmp.Op != OpMIPS64SGTU {
8085 break
8086 }
8087 b.resetWithControl(BlockMIPS64NE, cmp)
8088 return true
8089 }
8090
8091
8092 for b.Controls[0].Op == OpMIPS64XORconst {
8093 v_0 := b.Controls[0]
8094 if auxIntToInt64(v_0.AuxInt) != 1 {
8095 break
8096 }
8097 cmp := v_0.Args[0]
8098 if cmp.Op != OpMIPS64SGTconst {
8099 break
8100 }
8101 b.resetWithControl(BlockMIPS64NE, cmp)
8102 return true
8103 }
8104
8105
8106 for b.Controls[0].Op == OpMIPS64XORconst {
8107 v_0 := b.Controls[0]
8108 if auxIntToInt64(v_0.AuxInt) != 1 {
8109 break
8110 }
8111 cmp := v_0.Args[0]
8112 if cmp.Op != OpMIPS64SGTUconst {
8113 break
8114 }
8115 b.resetWithControl(BlockMIPS64NE, cmp)
8116 return true
8117 }
8118
8119
8120 for b.Controls[0].Op == OpMIPS64SGTUconst {
8121 v_0 := b.Controls[0]
8122 if auxIntToInt64(v_0.AuxInt) != 1 {
8123 break
8124 }
8125 x := v_0.Args[0]
8126 b.resetWithControl(BlockMIPS64NE, x)
8127 return true
8128 }
8129
8130
8131 for b.Controls[0].Op == OpMIPS64SGTU {
8132 v_0 := b.Controls[0]
8133 _ = v_0.Args[1]
8134 x := v_0.Args[0]
8135 v_0_1 := v_0.Args[1]
8136 if v_0_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
8137 break
8138 }
8139 b.resetWithControl(BlockMIPS64EQ, x)
8140 return true
8141 }
8142
8143
8144 for b.Controls[0].Op == OpMIPS64SGTconst {
8145 v_0 := b.Controls[0]
8146 if auxIntToInt64(v_0.AuxInt) != 0 {
8147 break
8148 }
8149 x := v_0.Args[0]
8150 b.resetWithControl(BlockMIPS64GEZ, x)
8151 return true
8152 }
8153
8154
8155 for b.Controls[0].Op == OpMIPS64SGT {
8156 v_0 := b.Controls[0]
8157 _ = v_0.Args[1]
8158 x := v_0.Args[0]
8159 v_0_1 := v_0.Args[1]
8160 if v_0_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
8161 break
8162 }
8163 b.resetWithControl(BlockMIPS64LEZ, x)
8164 return true
8165 }
8166
8167
8168 for b.Controls[0].Op == OpMIPS64MOVVconst {
8169 v_0 := b.Controls[0]
8170 if auxIntToInt64(v_0.AuxInt) != 0 {
8171 break
8172 }
8173 b.Reset(BlockFirst)
8174 return true
8175 }
8176
8177
8178
8179 for b.Controls[0].Op == OpMIPS64MOVVconst {
8180 v_0 := b.Controls[0]
8181 c := auxIntToInt64(v_0.AuxInt)
8182 if !(c != 0) {
8183 break
8184 }
8185 b.Reset(BlockFirst)
8186 b.swapSuccessors()
8187 return true
8188 }
8189 case BlockMIPS64GEZ:
8190
8191
8192
8193 for b.Controls[0].Op == OpMIPS64MOVVconst {
8194 v_0 := b.Controls[0]
8195 c := auxIntToInt64(v_0.AuxInt)
8196 if !(c >= 0) {
8197 break
8198 }
8199 b.Reset(BlockFirst)
8200 return true
8201 }
8202
8203
8204
8205 for b.Controls[0].Op == OpMIPS64MOVVconst {
8206 v_0 := b.Controls[0]
8207 c := auxIntToInt64(v_0.AuxInt)
8208 if !(c < 0) {
8209 break
8210 }
8211 b.Reset(BlockFirst)
8212 b.swapSuccessors()
8213 return true
8214 }
8215 case BlockMIPS64GTZ:
8216
8217
8218
8219 for b.Controls[0].Op == OpMIPS64MOVVconst {
8220 v_0 := b.Controls[0]
8221 c := auxIntToInt64(v_0.AuxInt)
8222 if !(c > 0) {
8223 break
8224 }
8225 b.Reset(BlockFirst)
8226 return true
8227 }
8228
8229
8230
8231 for b.Controls[0].Op == OpMIPS64MOVVconst {
8232 v_0 := b.Controls[0]
8233 c := auxIntToInt64(v_0.AuxInt)
8234 if !(c <= 0) {
8235 break
8236 }
8237 b.Reset(BlockFirst)
8238 b.swapSuccessors()
8239 return true
8240 }
8241 case BlockIf:
8242
8243
8244 for {
8245 cond := b.Controls[0]
8246 b.resetWithControl(BlockMIPS64NE, cond)
8247 return true
8248 }
8249 case BlockMIPS64LEZ:
8250
8251
8252
8253 for b.Controls[0].Op == OpMIPS64MOVVconst {
8254 v_0 := b.Controls[0]
8255 c := auxIntToInt64(v_0.AuxInt)
8256 if !(c <= 0) {
8257 break
8258 }
8259 b.Reset(BlockFirst)
8260 return true
8261 }
8262
8263
8264
8265 for b.Controls[0].Op == OpMIPS64MOVVconst {
8266 v_0 := b.Controls[0]
8267 c := auxIntToInt64(v_0.AuxInt)
8268 if !(c > 0) {
8269 break
8270 }
8271 b.Reset(BlockFirst)
8272 b.swapSuccessors()
8273 return true
8274 }
8275 case BlockMIPS64LTZ:
8276
8277
8278
8279 for b.Controls[0].Op == OpMIPS64MOVVconst {
8280 v_0 := b.Controls[0]
8281 c := auxIntToInt64(v_0.AuxInt)
8282 if !(c < 0) {
8283 break
8284 }
8285 b.Reset(BlockFirst)
8286 return true
8287 }
8288
8289
8290
8291 for b.Controls[0].Op == OpMIPS64MOVVconst {
8292 v_0 := b.Controls[0]
8293 c := auxIntToInt64(v_0.AuxInt)
8294 if !(c >= 0) {
8295 break
8296 }
8297 b.Reset(BlockFirst)
8298 b.swapSuccessors()
8299 return true
8300 }
8301 case BlockMIPS64NE:
8302
8303
8304 for b.Controls[0].Op == OpMIPS64FPFlagTrue {
8305 v_0 := b.Controls[0]
8306 cmp := v_0.Args[0]
8307 b.resetWithControl(BlockMIPS64FPT, cmp)
8308 return true
8309 }
8310
8311
8312 for b.Controls[0].Op == OpMIPS64FPFlagFalse {
8313 v_0 := b.Controls[0]
8314 cmp := v_0.Args[0]
8315 b.resetWithControl(BlockMIPS64FPF, cmp)
8316 return true
8317 }
8318
8319
8320 for b.Controls[0].Op == OpMIPS64XORconst {
8321 v_0 := b.Controls[0]
8322 if auxIntToInt64(v_0.AuxInt) != 1 {
8323 break
8324 }
8325 cmp := v_0.Args[0]
8326 if cmp.Op != OpMIPS64SGT {
8327 break
8328 }
8329 b.resetWithControl(BlockMIPS64EQ, cmp)
8330 return true
8331 }
8332
8333
8334 for b.Controls[0].Op == OpMIPS64XORconst {
8335 v_0 := b.Controls[0]
8336 if auxIntToInt64(v_0.AuxInt) != 1 {
8337 break
8338 }
8339 cmp := v_0.Args[0]
8340 if cmp.Op != OpMIPS64SGTU {
8341 break
8342 }
8343 b.resetWithControl(BlockMIPS64EQ, cmp)
8344 return true
8345 }
8346
8347
8348 for b.Controls[0].Op == OpMIPS64XORconst {
8349 v_0 := b.Controls[0]
8350 if auxIntToInt64(v_0.AuxInt) != 1 {
8351 break
8352 }
8353 cmp := v_0.Args[0]
8354 if cmp.Op != OpMIPS64SGTconst {
8355 break
8356 }
8357 b.resetWithControl(BlockMIPS64EQ, cmp)
8358 return true
8359 }
8360
8361
8362 for b.Controls[0].Op == OpMIPS64XORconst {
8363 v_0 := b.Controls[0]
8364 if auxIntToInt64(v_0.AuxInt) != 1 {
8365 break
8366 }
8367 cmp := v_0.Args[0]
8368 if cmp.Op != OpMIPS64SGTUconst {
8369 break
8370 }
8371 b.resetWithControl(BlockMIPS64EQ, cmp)
8372 return true
8373 }
8374
8375
8376 for b.Controls[0].Op == OpMIPS64SGTUconst {
8377 v_0 := b.Controls[0]
8378 if auxIntToInt64(v_0.AuxInt) != 1 {
8379 break
8380 }
8381 x := v_0.Args[0]
8382 b.resetWithControl(BlockMIPS64EQ, x)
8383 return true
8384 }
8385
8386
8387 for b.Controls[0].Op == OpMIPS64SGTU {
8388 v_0 := b.Controls[0]
8389 _ = v_0.Args[1]
8390 x := v_0.Args[0]
8391 v_0_1 := v_0.Args[1]
8392 if v_0_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
8393 break
8394 }
8395 b.resetWithControl(BlockMIPS64NE, x)
8396 return true
8397 }
8398
8399
8400 for b.Controls[0].Op == OpMIPS64SGTconst {
8401 v_0 := b.Controls[0]
8402 if auxIntToInt64(v_0.AuxInt) != 0 {
8403 break
8404 }
8405 x := v_0.Args[0]
8406 b.resetWithControl(BlockMIPS64LTZ, x)
8407 return true
8408 }
8409
8410
8411 for b.Controls[0].Op == OpMIPS64SGT {
8412 v_0 := b.Controls[0]
8413 _ = v_0.Args[1]
8414 x := v_0.Args[0]
8415 v_0_1 := v_0.Args[1]
8416 if v_0_1.Op != OpMIPS64MOVVconst || auxIntToInt64(v_0_1.AuxInt) != 0 {
8417 break
8418 }
8419 b.resetWithControl(BlockMIPS64GTZ, x)
8420 return true
8421 }
8422
8423
8424 for b.Controls[0].Op == OpMIPS64MOVVconst {
8425 v_0 := b.Controls[0]
8426 if auxIntToInt64(v_0.AuxInt) != 0 {
8427 break
8428 }
8429 b.Reset(BlockFirst)
8430 b.swapSuccessors()
8431 return true
8432 }
8433
8434
8435
8436 for b.Controls[0].Op == OpMIPS64MOVVconst {
8437 v_0 := b.Controls[0]
8438 c := auxIntToInt64(v_0.AuxInt)
8439 if !(c != 0) {
8440 break
8441 }
8442 b.Reset(BlockFirst)
8443 return true
8444 }
8445 }
8446 return false
8447 }
8448
View as plain text