1
2
3
4 package ssa
5
6 import "math"
7 import "cmd/compile/internal/types"
8
9 func rewriteValue386(v *Value) bool {
10 switch v.Op {
11 case Op386ADCL:
12 return rewriteValue386_Op386ADCL(v)
13 case Op386ADDL:
14 return rewriteValue386_Op386ADDL(v)
15 case Op386ADDLcarry:
16 return rewriteValue386_Op386ADDLcarry(v)
17 case Op386ADDLconst:
18 return rewriteValue386_Op386ADDLconst(v)
19 case Op386ADDLconstmodify:
20 return rewriteValue386_Op386ADDLconstmodify(v)
21 case Op386ADDLload:
22 return rewriteValue386_Op386ADDLload(v)
23 case Op386ADDLmodify:
24 return rewriteValue386_Op386ADDLmodify(v)
25 case Op386ADDSD:
26 return rewriteValue386_Op386ADDSD(v)
27 case Op386ADDSDload:
28 return rewriteValue386_Op386ADDSDload(v)
29 case Op386ADDSS:
30 return rewriteValue386_Op386ADDSS(v)
31 case Op386ADDSSload:
32 return rewriteValue386_Op386ADDSSload(v)
33 case Op386ANDL:
34 return rewriteValue386_Op386ANDL(v)
35 case Op386ANDLconst:
36 return rewriteValue386_Op386ANDLconst(v)
37 case Op386ANDLconstmodify:
38 return rewriteValue386_Op386ANDLconstmodify(v)
39 case Op386ANDLload:
40 return rewriteValue386_Op386ANDLload(v)
41 case Op386ANDLmodify:
42 return rewriteValue386_Op386ANDLmodify(v)
43 case Op386CMPB:
44 return rewriteValue386_Op386CMPB(v)
45 case Op386CMPBconst:
46 return rewriteValue386_Op386CMPBconst(v)
47 case Op386CMPBload:
48 return rewriteValue386_Op386CMPBload(v)
49 case Op386CMPL:
50 return rewriteValue386_Op386CMPL(v)
51 case Op386CMPLconst:
52 return rewriteValue386_Op386CMPLconst(v)
53 case Op386CMPLload:
54 return rewriteValue386_Op386CMPLload(v)
55 case Op386CMPW:
56 return rewriteValue386_Op386CMPW(v)
57 case Op386CMPWconst:
58 return rewriteValue386_Op386CMPWconst(v)
59 case Op386CMPWload:
60 return rewriteValue386_Op386CMPWload(v)
61 case Op386DIVSD:
62 return rewriteValue386_Op386DIVSD(v)
63 case Op386DIVSDload:
64 return rewriteValue386_Op386DIVSDload(v)
65 case Op386DIVSS:
66 return rewriteValue386_Op386DIVSS(v)
67 case Op386DIVSSload:
68 return rewriteValue386_Op386DIVSSload(v)
69 case Op386LEAL:
70 return rewriteValue386_Op386LEAL(v)
71 case Op386LEAL1:
72 return rewriteValue386_Op386LEAL1(v)
73 case Op386LEAL2:
74 return rewriteValue386_Op386LEAL2(v)
75 case Op386LEAL4:
76 return rewriteValue386_Op386LEAL4(v)
77 case Op386LEAL8:
78 return rewriteValue386_Op386LEAL8(v)
79 case Op386MOVBLSX:
80 return rewriteValue386_Op386MOVBLSX(v)
81 case Op386MOVBLSXload:
82 return rewriteValue386_Op386MOVBLSXload(v)
83 case Op386MOVBLZX:
84 return rewriteValue386_Op386MOVBLZX(v)
85 case Op386MOVBload:
86 return rewriteValue386_Op386MOVBload(v)
87 case Op386MOVBstore:
88 return rewriteValue386_Op386MOVBstore(v)
89 case Op386MOVBstoreconst:
90 return rewriteValue386_Op386MOVBstoreconst(v)
91 case Op386MOVLload:
92 return rewriteValue386_Op386MOVLload(v)
93 case Op386MOVLstore:
94 return rewriteValue386_Op386MOVLstore(v)
95 case Op386MOVLstoreconst:
96 return rewriteValue386_Op386MOVLstoreconst(v)
97 case Op386MOVSDconst:
98 return rewriteValue386_Op386MOVSDconst(v)
99 case Op386MOVSDload:
100 return rewriteValue386_Op386MOVSDload(v)
101 case Op386MOVSDstore:
102 return rewriteValue386_Op386MOVSDstore(v)
103 case Op386MOVSSconst:
104 return rewriteValue386_Op386MOVSSconst(v)
105 case Op386MOVSSload:
106 return rewriteValue386_Op386MOVSSload(v)
107 case Op386MOVSSstore:
108 return rewriteValue386_Op386MOVSSstore(v)
109 case Op386MOVWLSX:
110 return rewriteValue386_Op386MOVWLSX(v)
111 case Op386MOVWLSXload:
112 return rewriteValue386_Op386MOVWLSXload(v)
113 case Op386MOVWLZX:
114 return rewriteValue386_Op386MOVWLZX(v)
115 case Op386MOVWload:
116 return rewriteValue386_Op386MOVWload(v)
117 case Op386MOVWstore:
118 return rewriteValue386_Op386MOVWstore(v)
119 case Op386MOVWstoreconst:
120 return rewriteValue386_Op386MOVWstoreconst(v)
121 case Op386MULL:
122 return rewriteValue386_Op386MULL(v)
123 case Op386MULLconst:
124 return rewriteValue386_Op386MULLconst(v)
125 case Op386MULLload:
126 return rewriteValue386_Op386MULLload(v)
127 case Op386MULSD:
128 return rewriteValue386_Op386MULSD(v)
129 case Op386MULSDload:
130 return rewriteValue386_Op386MULSDload(v)
131 case Op386MULSS:
132 return rewriteValue386_Op386MULSS(v)
133 case Op386MULSSload:
134 return rewriteValue386_Op386MULSSload(v)
135 case Op386NEGL:
136 return rewriteValue386_Op386NEGL(v)
137 case Op386NOTL:
138 return rewriteValue386_Op386NOTL(v)
139 case Op386ORL:
140 return rewriteValue386_Op386ORL(v)
141 case Op386ORLconst:
142 return rewriteValue386_Op386ORLconst(v)
143 case Op386ORLconstmodify:
144 return rewriteValue386_Op386ORLconstmodify(v)
145 case Op386ORLload:
146 return rewriteValue386_Op386ORLload(v)
147 case Op386ORLmodify:
148 return rewriteValue386_Op386ORLmodify(v)
149 case Op386ROLBconst:
150 return rewriteValue386_Op386ROLBconst(v)
151 case Op386ROLLconst:
152 return rewriteValue386_Op386ROLLconst(v)
153 case Op386ROLWconst:
154 return rewriteValue386_Op386ROLWconst(v)
155 case Op386SARB:
156 return rewriteValue386_Op386SARB(v)
157 case Op386SARBconst:
158 return rewriteValue386_Op386SARBconst(v)
159 case Op386SARL:
160 return rewriteValue386_Op386SARL(v)
161 case Op386SARLconst:
162 return rewriteValue386_Op386SARLconst(v)
163 case Op386SARW:
164 return rewriteValue386_Op386SARW(v)
165 case Op386SARWconst:
166 return rewriteValue386_Op386SARWconst(v)
167 case Op386SBBL:
168 return rewriteValue386_Op386SBBL(v)
169 case Op386SBBLcarrymask:
170 return rewriteValue386_Op386SBBLcarrymask(v)
171 case Op386SETA:
172 return rewriteValue386_Op386SETA(v)
173 case Op386SETAE:
174 return rewriteValue386_Op386SETAE(v)
175 case Op386SETB:
176 return rewriteValue386_Op386SETB(v)
177 case Op386SETBE:
178 return rewriteValue386_Op386SETBE(v)
179 case Op386SETEQ:
180 return rewriteValue386_Op386SETEQ(v)
181 case Op386SETG:
182 return rewriteValue386_Op386SETG(v)
183 case Op386SETGE:
184 return rewriteValue386_Op386SETGE(v)
185 case Op386SETL:
186 return rewriteValue386_Op386SETL(v)
187 case Op386SETLE:
188 return rewriteValue386_Op386SETLE(v)
189 case Op386SETNE:
190 return rewriteValue386_Op386SETNE(v)
191 case Op386SHLL:
192 return rewriteValue386_Op386SHLL(v)
193 case Op386SHLLconst:
194 return rewriteValue386_Op386SHLLconst(v)
195 case Op386SHRB:
196 return rewriteValue386_Op386SHRB(v)
197 case Op386SHRBconst:
198 return rewriteValue386_Op386SHRBconst(v)
199 case Op386SHRL:
200 return rewriteValue386_Op386SHRL(v)
201 case Op386SHRLconst:
202 return rewriteValue386_Op386SHRLconst(v)
203 case Op386SHRW:
204 return rewriteValue386_Op386SHRW(v)
205 case Op386SHRWconst:
206 return rewriteValue386_Op386SHRWconst(v)
207 case Op386SUBL:
208 return rewriteValue386_Op386SUBL(v)
209 case Op386SUBLcarry:
210 return rewriteValue386_Op386SUBLcarry(v)
211 case Op386SUBLconst:
212 return rewriteValue386_Op386SUBLconst(v)
213 case Op386SUBLload:
214 return rewriteValue386_Op386SUBLload(v)
215 case Op386SUBLmodify:
216 return rewriteValue386_Op386SUBLmodify(v)
217 case Op386SUBSD:
218 return rewriteValue386_Op386SUBSD(v)
219 case Op386SUBSDload:
220 return rewriteValue386_Op386SUBSDload(v)
221 case Op386SUBSS:
222 return rewriteValue386_Op386SUBSS(v)
223 case Op386SUBSSload:
224 return rewriteValue386_Op386SUBSSload(v)
225 case Op386XORL:
226 return rewriteValue386_Op386XORL(v)
227 case Op386XORLconst:
228 return rewriteValue386_Op386XORLconst(v)
229 case Op386XORLconstmodify:
230 return rewriteValue386_Op386XORLconstmodify(v)
231 case Op386XORLload:
232 return rewriteValue386_Op386XORLload(v)
233 case Op386XORLmodify:
234 return rewriteValue386_Op386XORLmodify(v)
235 case OpAdd16:
236 v.Op = Op386ADDL
237 return true
238 case OpAdd32:
239 v.Op = Op386ADDL
240 return true
241 case OpAdd32F:
242 v.Op = Op386ADDSS
243 return true
244 case OpAdd32carry:
245 v.Op = Op386ADDLcarry
246 return true
247 case OpAdd32withcarry:
248 v.Op = Op386ADCL
249 return true
250 case OpAdd64F:
251 v.Op = Op386ADDSD
252 return true
253 case OpAdd8:
254 v.Op = Op386ADDL
255 return true
256 case OpAddPtr:
257 v.Op = Op386ADDL
258 return true
259 case OpAddr:
260 return rewriteValue386_OpAddr(v)
261 case OpAnd16:
262 v.Op = Op386ANDL
263 return true
264 case OpAnd32:
265 v.Op = Op386ANDL
266 return true
267 case OpAnd8:
268 v.Op = Op386ANDL
269 return true
270 case OpAndB:
271 v.Op = Op386ANDL
272 return true
273 case OpAvg32u:
274 v.Op = Op386AVGLU
275 return true
276 case OpBswap32:
277 v.Op = Op386BSWAPL
278 return true
279 case OpClosureCall:
280 v.Op = Op386CALLclosure
281 return true
282 case OpCom16:
283 v.Op = Op386NOTL
284 return true
285 case OpCom32:
286 v.Op = Op386NOTL
287 return true
288 case OpCom8:
289 v.Op = Op386NOTL
290 return true
291 case OpConst16:
292 return rewriteValue386_OpConst16(v)
293 case OpConst32:
294 v.Op = Op386MOVLconst
295 return true
296 case OpConst32F:
297 v.Op = Op386MOVSSconst
298 return true
299 case OpConst64F:
300 v.Op = Op386MOVSDconst
301 return true
302 case OpConst8:
303 return rewriteValue386_OpConst8(v)
304 case OpConstBool:
305 return rewriteValue386_OpConstBool(v)
306 case OpConstNil:
307 return rewriteValue386_OpConstNil(v)
308 case OpCtz16:
309 return rewriteValue386_OpCtz16(v)
310 case OpCtz16NonZero:
311 v.Op = Op386BSFL
312 return true
313 case OpCvt32Fto32:
314 v.Op = Op386CVTTSS2SL
315 return true
316 case OpCvt32Fto64F:
317 v.Op = Op386CVTSS2SD
318 return true
319 case OpCvt32to32F:
320 v.Op = Op386CVTSL2SS
321 return true
322 case OpCvt32to64F:
323 v.Op = Op386CVTSL2SD
324 return true
325 case OpCvt64Fto32:
326 v.Op = Op386CVTTSD2SL
327 return true
328 case OpCvt64Fto32F:
329 v.Op = Op386CVTSD2SS
330 return true
331 case OpCvtBoolToUint8:
332 v.Op = OpCopy
333 return true
334 case OpDiv16:
335 v.Op = Op386DIVW
336 return true
337 case OpDiv16u:
338 v.Op = Op386DIVWU
339 return true
340 case OpDiv32:
341 v.Op = Op386DIVL
342 return true
343 case OpDiv32F:
344 v.Op = Op386DIVSS
345 return true
346 case OpDiv32u:
347 v.Op = Op386DIVLU
348 return true
349 case OpDiv64F:
350 v.Op = Op386DIVSD
351 return true
352 case OpDiv8:
353 return rewriteValue386_OpDiv8(v)
354 case OpDiv8u:
355 return rewriteValue386_OpDiv8u(v)
356 case OpEq16:
357 return rewriteValue386_OpEq16(v)
358 case OpEq32:
359 return rewriteValue386_OpEq32(v)
360 case OpEq32F:
361 return rewriteValue386_OpEq32F(v)
362 case OpEq64F:
363 return rewriteValue386_OpEq64F(v)
364 case OpEq8:
365 return rewriteValue386_OpEq8(v)
366 case OpEqB:
367 return rewriteValue386_OpEqB(v)
368 case OpEqPtr:
369 return rewriteValue386_OpEqPtr(v)
370 case OpGetCallerPC:
371 v.Op = Op386LoweredGetCallerPC
372 return true
373 case OpGetCallerSP:
374 v.Op = Op386LoweredGetCallerSP
375 return true
376 case OpGetClosurePtr:
377 v.Op = Op386LoweredGetClosurePtr
378 return true
379 case OpGetG:
380 v.Op = Op386LoweredGetG
381 return true
382 case OpHmul32:
383 v.Op = Op386HMULL
384 return true
385 case OpHmul32u:
386 v.Op = Op386HMULLU
387 return true
388 case OpInterCall:
389 v.Op = Op386CALLinter
390 return true
391 case OpIsInBounds:
392 return rewriteValue386_OpIsInBounds(v)
393 case OpIsNonNil:
394 return rewriteValue386_OpIsNonNil(v)
395 case OpIsSliceInBounds:
396 return rewriteValue386_OpIsSliceInBounds(v)
397 case OpLeq16:
398 return rewriteValue386_OpLeq16(v)
399 case OpLeq16U:
400 return rewriteValue386_OpLeq16U(v)
401 case OpLeq32:
402 return rewriteValue386_OpLeq32(v)
403 case OpLeq32F:
404 return rewriteValue386_OpLeq32F(v)
405 case OpLeq32U:
406 return rewriteValue386_OpLeq32U(v)
407 case OpLeq64F:
408 return rewriteValue386_OpLeq64F(v)
409 case OpLeq8:
410 return rewriteValue386_OpLeq8(v)
411 case OpLeq8U:
412 return rewriteValue386_OpLeq8U(v)
413 case OpLess16:
414 return rewriteValue386_OpLess16(v)
415 case OpLess16U:
416 return rewriteValue386_OpLess16U(v)
417 case OpLess32:
418 return rewriteValue386_OpLess32(v)
419 case OpLess32F:
420 return rewriteValue386_OpLess32F(v)
421 case OpLess32U:
422 return rewriteValue386_OpLess32U(v)
423 case OpLess64F:
424 return rewriteValue386_OpLess64F(v)
425 case OpLess8:
426 return rewriteValue386_OpLess8(v)
427 case OpLess8U:
428 return rewriteValue386_OpLess8U(v)
429 case OpLoad:
430 return rewriteValue386_OpLoad(v)
431 case OpLocalAddr:
432 return rewriteValue386_OpLocalAddr(v)
433 case OpLsh16x16:
434 return rewriteValue386_OpLsh16x16(v)
435 case OpLsh16x32:
436 return rewriteValue386_OpLsh16x32(v)
437 case OpLsh16x64:
438 return rewriteValue386_OpLsh16x64(v)
439 case OpLsh16x8:
440 return rewriteValue386_OpLsh16x8(v)
441 case OpLsh32x16:
442 return rewriteValue386_OpLsh32x16(v)
443 case OpLsh32x32:
444 return rewriteValue386_OpLsh32x32(v)
445 case OpLsh32x64:
446 return rewriteValue386_OpLsh32x64(v)
447 case OpLsh32x8:
448 return rewriteValue386_OpLsh32x8(v)
449 case OpLsh8x16:
450 return rewriteValue386_OpLsh8x16(v)
451 case OpLsh8x32:
452 return rewriteValue386_OpLsh8x32(v)
453 case OpLsh8x64:
454 return rewriteValue386_OpLsh8x64(v)
455 case OpLsh8x8:
456 return rewriteValue386_OpLsh8x8(v)
457 case OpMod16:
458 v.Op = Op386MODW
459 return true
460 case OpMod16u:
461 v.Op = Op386MODWU
462 return true
463 case OpMod32:
464 v.Op = Op386MODL
465 return true
466 case OpMod32u:
467 v.Op = Op386MODLU
468 return true
469 case OpMod8:
470 return rewriteValue386_OpMod8(v)
471 case OpMod8u:
472 return rewriteValue386_OpMod8u(v)
473 case OpMove:
474 return rewriteValue386_OpMove(v)
475 case OpMul16:
476 v.Op = Op386MULL
477 return true
478 case OpMul32:
479 v.Op = Op386MULL
480 return true
481 case OpMul32F:
482 v.Op = Op386MULSS
483 return true
484 case OpMul32uhilo:
485 v.Op = Op386MULLQU
486 return true
487 case OpMul64F:
488 v.Op = Op386MULSD
489 return true
490 case OpMul8:
491 v.Op = Op386MULL
492 return true
493 case OpNeg16:
494 v.Op = Op386NEGL
495 return true
496 case OpNeg32:
497 v.Op = Op386NEGL
498 return true
499 case OpNeg32F:
500 return rewriteValue386_OpNeg32F(v)
501 case OpNeg64F:
502 return rewriteValue386_OpNeg64F(v)
503 case OpNeg8:
504 v.Op = Op386NEGL
505 return true
506 case OpNeq16:
507 return rewriteValue386_OpNeq16(v)
508 case OpNeq32:
509 return rewriteValue386_OpNeq32(v)
510 case OpNeq32F:
511 return rewriteValue386_OpNeq32F(v)
512 case OpNeq64F:
513 return rewriteValue386_OpNeq64F(v)
514 case OpNeq8:
515 return rewriteValue386_OpNeq8(v)
516 case OpNeqB:
517 return rewriteValue386_OpNeqB(v)
518 case OpNeqPtr:
519 return rewriteValue386_OpNeqPtr(v)
520 case OpNilCheck:
521 v.Op = Op386LoweredNilCheck
522 return true
523 case OpNot:
524 return rewriteValue386_OpNot(v)
525 case OpOffPtr:
526 return rewriteValue386_OpOffPtr(v)
527 case OpOr16:
528 v.Op = Op386ORL
529 return true
530 case OpOr32:
531 v.Op = Op386ORL
532 return true
533 case OpOr8:
534 v.Op = Op386ORL
535 return true
536 case OpOrB:
537 v.Op = Op386ORL
538 return true
539 case OpPanicBounds:
540 return rewriteValue386_OpPanicBounds(v)
541 case OpPanicExtend:
542 return rewriteValue386_OpPanicExtend(v)
543 case OpRotateLeft16:
544 return rewriteValue386_OpRotateLeft16(v)
545 case OpRotateLeft32:
546 return rewriteValue386_OpRotateLeft32(v)
547 case OpRotateLeft8:
548 return rewriteValue386_OpRotateLeft8(v)
549 case OpRound32F:
550 v.Op = OpCopy
551 return true
552 case OpRound64F:
553 v.Op = OpCopy
554 return true
555 case OpRsh16Ux16:
556 return rewriteValue386_OpRsh16Ux16(v)
557 case OpRsh16Ux32:
558 return rewriteValue386_OpRsh16Ux32(v)
559 case OpRsh16Ux64:
560 return rewriteValue386_OpRsh16Ux64(v)
561 case OpRsh16Ux8:
562 return rewriteValue386_OpRsh16Ux8(v)
563 case OpRsh16x16:
564 return rewriteValue386_OpRsh16x16(v)
565 case OpRsh16x32:
566 return rewriteValue386_OpRsh16x32(v)
567 case OpRsh16x64:
568 return rewriteValue386_OpRsh16x64(v)
569 case OpRsh16x8:
570 return rewriteValue386_OpRsh16x8(v)
571 case OpRsh32Ux16:
572 return rewriteValue386_OpRsh32Ux16(v)
573 case OpRsh32Ux32:
574 return rewriteValue386_OpRsh32Ux32(v)
575 case OpRsh32Ux64:
576 return rewriteValue386_OpRsh32Ux64(v)
577 case OpRsh32Ux8:
578 return rewriteValue386_OpRsh32Ux8(v)
579 case OpRsh32x16:
580 return rewriteValue386_OpRsh32x16(v)
581 case OpRsh32x32:
582 return rewriteValue386_OpRsh32x32(v)
583 case OpRsh32x64:
584 return rewriteValue386_OpRsh32x64(v)
585 case OpRsh32x8:
586 return rewriteValue386_OpRsh32x8(v)
587 case OpRsh8Ux16:
588 return rewriteValue386_OpRsh8Ux16(v)
589 case OpRsh8Ux32:
590 return rewriteValue386_OpRsh8Ux32(v)
591 case OpRsh8Ux64:
592 return rewriteValue386_OpRsh8Ux64(v)
593 case OpRsh8Ux8:
594 return rewriteValue386_OpRsh8Ux8(v)
595 case OpRsh8x16:
596 return rewriteValue386_OpRsh8x16(v)
597 case OpRsh8x32:
598 return rewriteValue386_OpRsh8x32(v)
599 case OpRsh8x64:
600 return rewriteValue386_OpRsh8x64(v)
601 case OpRsh8x8:
602 return rewriteValue386_OpRsh8x8(v)
603 case OpSelect0:
604 return rewriteValue386_OpSelect0(v)
605 case OpSelect1:
606 return rewriteValue386_OpSelect1(v)
607 case OpSignExt16to32:
608 v.Op = Op386MOVWLSX
609 return true
610 case OpSignExt8to16:
611 v.Op = Op386MOVBLSX
612 return true
613 case OpSignExt8to32:
614 v.Op = Op386MOVBLSX
615 return true
616 case OpSignmask:
617 return rewriteValue386_OpSignmask(v)
618 case OpSlicemask:
619 return rewriteValue386_OpSlicemask(v)
620 case OpSqrt:
621 v.Op = Op386SQRTSD
622 return true
623 case OpSqrt32:
624 v.Op = Op386SQRTSS
625 return true
626 case OpStaticCall:
627 v.Op = Op386CALLstatic
628 return true
629 case OpStore:
630 return rewriteValue386_OpStore(v)
631 case OpSub16:
632 v.Op = Op386SUBL
633 return true
634 case OpSub32:
635 v.Op = Op386SUBL
636 return true
637 case OpSub32F:
638 v.Op = Op386SUBSS
639 return true
640 case OpSub32carry:
641 v.Op = Op386SUBLcarry
642 return true
643 case OpSub32withcarry:
644 v.Op = Op386SBBL
645 return true
646 case OpSub64F:
647 v.Op = Op386SUBSD
648 return true
649 case OpSub8:
650 v.Op = Op386SUBL
651 return true
652 case OpSubPtr:
653 v.Op = Op386SUBL
654 return true
655 case OpTailCall:
656 v.Op = Op386CALLtail
657 return true
658 case OpTrunc16to8:
659 v.Op = OpCopy
660 return true
661 case OpTrunc32to16:
662 v.Op = OpCopy
663 return true
664 case OpTrunc32to8:
665 v.Op = OpCopy
666 return true
667 case OpWB:
668 v.Op = Op386LoweredWB
669 return true
670 case OpXor16:
671 v.Op = Op386XORL
672 return true
673 case OpXor32:
674 v.Op = Op386XORL
675 return true
676 case OpXor8:
677 v.Op = Op386XORL
678 return true
679 case OpZero:
680 return rewriteValue386_OpZero(v)
681 case OpZeroExt16to32:
682 v.Op = Op386MOVWLZX
683 return true
684 case OpZeroExt8to16:
685 v.Op = Op386MOVBLZX
686 return true
687 case OpZeroExt8to32:
688 v.Op = Op386MOVBLZX
689 return true
690 case OpZeromask:
691 return rewriteValue386_OpZeromask(v)
692 }
693 return false
694 }
695 func rewriteValue386_Op386ADCL(v *Value) bool {
696 v_2 := v.Args[2]
697 v_1 := v.Args[1]
698 v_0 := v.Args[0]
699
700
701 for {
702 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
703 x := v_0
704 if v_1.Op != Op386MOVLconst {
705 continue
706 }
707 c := auxIntToInt32(v_1.AuxInt)
708 f := v_2
709 v.reset(Op386ADCLconst)
710 v.AuxInt = int32ToAuxInt(c)
711 v.AddArg2(x, f)
712 return true
713 }
714 break
715 }
716 return false
717 }
718 func rewriteValue386_Op386ADDL(v *Value) bool {
719 v_1 := v.Args[1]
720 v_0 := v.Args[0]
721
722
723 for {
724 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
725 x := v_0
726 if v_1.Op != Op386MOVLconst {
727 continue
728 }
729 c := auxIntToInt32(v_1.AuxInt)
730 v.reset(Op386ADDLconst)
731 v.AuxInt = int32ToAuxInt(c)
732 v.AddArg(x)
733 return true
734 }
735 break
736 }
737
738
739
740 for {
741 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
742 if v_0.Op != Op386SHLLconst {
743 continue
744 }
745 c := auxIntToInt32(v_0.AuxInt)
746 x := v_0.Args[0]
747 if v_1.Op != Op386SHRLconst {
748 continue
749 }
750 d := auxIntToInt32(v_1.AuxInt)
751 if x != v_1.Args[0] || !(d == 32-c) {
752 continue
753 }
754 v.reset(Op386ROLLconst)
755 v.AuxInt = int32ToAuxInt(c)
756 v.AddArg(x)
757 return true
758 }
759 break
760 }
761
762
763
764 for {
765 t := v.Type
766 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
767 if v_0.Op != Op386SHLLconst {
768 continue
769 }
770 c := auxIntToInt32(v_0.AuxInt)
771 x := v_0.Args[0]
772 if v_1.Op != Op386SHRWconst {
773 continue
774 }
775 d := auxIntToInt16(v_1.AuxInt)
776 if x != v_1.Args[0] || !(c < 16 && d == int16(16-c) && t.Size() == 2) {
777 continue
778 }
779 v.reset(Op386ROLWconst)
780 v.AuxInt = int16ToAuxInt(int16(c))
781 v.AddArg(x)
782 return true
783 }
784 break
785 }
786
787
788
789 for {
790 t := v.Type
791 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
792 if v_0.Op != Op386SHLLconst {
793 continue
794 }
795 c := auxIntToInt32(v_0.AuxInt)
796 x := v_0.Args[0]
797 if v_1.Op != Op386SHRBconst {
798 continue
799 }
800 d := auxIntToInt8(v_1.AuxInt)
801 if x != v_1.Args[0] || !(c < 8 && d == int8(8-c) && t.Size() == 1) {
802 continue
803 }
804 v.reset(Op386ROLBconst)
805 v.AuxInt = int8ToAuxInt(int8(c))
806 v.AddArg(x)
807 return true
808 }
809 break
810 }
811
812
813 for {
814 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
815 x := v_0
816 if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 3 {
817 continue
818 }
819 y := v_1.Args[0]
820 v.reset(Op386LEAL8)
821 v.AddArg2(x, y)
822 return true
823 }
824 break
825 }
826
827
828 for {
829 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
830 x := v_0
831 if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
832 continue
833 }
834 y := v_1.Args[0]
835 v.reset(Op386LEAL4)
836 v.AddArg2(x, y)
837 return true
838 }
839 break
840 }
841
842
843 for {
844 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
845 x := v_0
846 if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
847 continue
848 }
849 y := v_1.Args[0]
850 v.reset(Op386LEAL2)
851 v.AddArg2(x, y)
852 return true
853 }
854 break
855 }
856
857
858 for {
859 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
860 x := v_0
861 if v_1.Op != Op386ADDL {
862 continue
863 }
864 y := v_1.Args[1]
865 if y != v_1.Args[0] {
866 continue
867 }
868 v.reset(Op386LEAL2)
869 v.AddArg2(x, y)
870 return true
871 }
872 break
873 }
874
875
876 for {
877 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
878 x := v_0
879 if v_1.Op != Op386ADDL {
880 continue
881 }
882 _ = v_1.Args[1]
883 v_1_0 := v_1.Args[0]
884 v_1_1 := v_1.Args[1]
885 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
886 if x != v_1_0 {
887 continue
888 }
889 y := v_1_1
890 v.reset(Op386LEAL2)
891 v.AddArg2(y, x)
892 return true
893 }
894 }
895 break
896 }
897
898
899 for {
900 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
901 if v_0.Op != Op386ADDLconst {
902 continue
903 }
904 c := auxIntToInt32(v_0.AuxInt)
905 x := v_0.Args[0]
906 y := v_1
907 v.reset(Op386LEAL1)
908 v.AuxInt = int32ToAuxInt(c)
909 v.AddArg2(x, y)
910 return true
911 }
912 break
913 }
914
915
916
917 for {
918 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
919 x := v_0
920 if v_1.Op != Op386LEAL {
921 continue
922 }
923 c := auxIntToInt32(v_1.AuxInt)
924 s := auxToSym(v_1.Aux)
925 y := v_1.Args[0]
926 if !(x.Op != OpSB && y.Op != OpSB) {
927 continue
928 }
929 v.reset(Op386LEAL1)
930 v.AuxInt = int32ToAuxInt(c)
931 v.Aux = symToAux(s)
932 v.AddArg2(x, y)
933 return true
934 }
935 break
936 }
937
938
939
940 for {
941 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
942 x := v_0
943 l := v_1
944 if l.Op != Op386MOVLload {
945 continue
946 }
947 off := auxIntToInt32(l.AuxInt)
948 sym := auxToSym(l.Aux)
949 mem := l.Args[1]
950 ptr := l.Args[0]
951 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
952 continue
953 }
954 v.reset(Op386ADDLload)
955 v.AuxInt = int32ToAuxInt(off)
956 v.Aux = symToAux(sym)
957 v.AddArg3(x, ptr, mem)
958 return true
959 }
960 break
961 }
962
963
964 for {
965 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
966 x := v_0
967 if v_1.Op != Op386NEGL {
968 continue
969 }
970 y := v_1.Args[0]
971 v.reset(Op386SUBL)
972 v.AddArg2(x, y)
973 return true
974 }
975 break
976 }
977 return false
978 }
979 func rewriteValue386_Op386ADDLcarry(v *Value) bool {
980 v_1 := v.Args[1]
981 v_0 := v.Args[0]
982
983
984 for {
985 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
986 x := v_0
987 if v_1.Op != Op386MOVLconst {
988 continue
989 }
990 c := auxIntToInt32(v_1.AuxInt)
991 v.reset(Op386ADDLconstcarry)
992 v.AuxInt = int32ToAuxInt(c)
993 v.AddArg(x)
994 return true
995 }
996 break
997 }
998 return false
999 }
1000 func rewriteValue386_Op386ADDLconst(v *Value) bool {
1001 v_0 := v.Args[0]
1002
1003
1004 for {
1005 c := auxIntToInt32(v.AuxInt)
1006 if v_0.Op != Op386ADDL {
1007 break
1008 }
1009 y := v_0.Args[1]
1010 x := v_0.Args[0]
1011 v.reset(Op386LEAL1)
1012 v.AuxInt = int32ToAuxInt(c)
1013 v.AddArg2(x, y)
1014 return true
1015 }
1016
1017
1018
1019 for {
1020 c := auxIntToInt32(v.AuxInt)
1021 if v_0.Op != Op386LEAL {
1022 break
1023 }
1024 d := auxIntToInt32(v_0.AuxInt)
1025 s := auxToSym(v_0.Aux)
1026 x := v_0.Args[0]
1027 if !(is32Bit(int64(c) + int64(d))) {
1028 break
1029 }
1030 v.reset(Op386LEAL)
1031 v.AuxInt = int32ToAuxInt(c + d)
1032 v.Aux = symToAux(s)
1033 v.AddArg(x)
1034 return true
1035 }
1036
1037
1038 for {
1039 c := auxIntToInt32(v.AuxInt)
1040 x := v_0
1041 if x.Op != OpSP {
1042 break
1043 }
1044 v.reset(Op386LEAL)
1045 v.AuxInt = int32ToAuxInt(c)
1046 v.AddArg(x)
1047 return true
1048 }
1049
1050
1051
1052 for {
1053 c := auxIntToInt32(v.AuxInt)
1054 if v_0.Op != Op386LEAL1 {
1055 break
1056 }
1057 d := auxIntToInt32(v_0.AuxInt)
1058 s := auxToSym(v_0.Aux)
1059 y := v_0.Args[1]
1060 x := v_0.Args[0]
1061 if !(is32Bit(int64(c) + int64(d))) {
1062 break
1063 }
1064 v.reset(Op386LEAL1)
1065 v.AuxInt = int32ToAuxInt(c + d)
1066 v.Aux = symToAux(s)
1067 v.AddArg2(x, y)
1068 return true
1069 }
1070
1071
1072
1073 for {
1074 c := auxIntToInt32(v.AuxInt)
1075 if v_0.Op != Op386LEAL2 {
1076 break
1077 }
1078 d := auxIntToInt32(v_0.AuxInt)
1079 s := auxToSym(v_0.Aux)
1080 y := v_0.Args[1]
1081 x := v_0.Args[0]
1082 if !(is32Bit(int64(c) + int64(d))) {
1083 break
1084 }
1085 v.reset(Op386LEAL2)
1086 v.AuxInt = int32ToAuxInt(c + d)
1087 v.Aux = symToAux(s)
1088 v.AddArg2(x, y)
1089 return true
1090 }
1091
1092
1093
1094 for {
1095 c := auxIntToInt32(v.AuxInt)
1096 if v_0.Op != Op386LEAL4 {
1097 break
1098 }
1099 d := auxIntToInt32(v_0.AuxInt)
1100 s := auxToSym(v_0.Aux)
1101 y := v_0.Args[1]
1102 x := v_0.Args[0]
1103 if !(is32Bit(int64(c) + int64(d))) {
1104 break
1105 }
1106 v.reset(Op386LEAL4)
1107 v.AuxInt = int32ToAuxInt(c + d)
1108 v.Aux = symToAux(s)
1109 v.AddArg2(x, y)
1110 return true
1111 }
1112
1113
1114
1115 for {
1116 c := auxIntToInt32(v.AuxInt)
1117 if v_0.Op != Op386LEAL8 {
1118 break
1119 }
1120 d := auxIntToInt32(v_0.AuxInt)
1121 s := auxToSym(v_0.Aux)
1122 y := v_0.Args[1]
1123 x := v_0.Args[0]
1124 if !(is32Bit(int64(c) + int64(d))) {
1125 break
1126 }
1127 v.reset(Op386LEAL8)
1128 v.AuxInt = int32ToAuxInt(c + d)
1129 v.Aux = symToAux(s)
1130 v.AddArg2(x, y)
1131 return true
1132 }
1133
1134
1135
1136 for {
1137 c := auxIntToInt32(v.AuxInt)
1138 x := v_0
1139 if !(c == 0) {
1140 break
1141 }
1142 v.copyOf(x)
1143 return true
1144 }
1145
1146
1147 for {
1148 c := auxIntToInt32(v.AuxInt)
1149 if v_0.Op != Op386MOVLconst {
1150 break
1151 }
1152 d := auxIntToInt32(v_0.AuxInt)
1153 v.reset(Op386MOVLconst)
1154 v.AuxInt = int32ToAuxInt(c + d)
1155 return true
1156 }
1157
1158
1159 for {
1160 c := auxIntToInt32(v.AuxInt)
1161 if v_0.Op != Op386ADDLconst {
1162 break
1163 }
1164 d := auxIntToInt32(v_0.AuxInt)
1165 x := v_0.Args[0]
1166 v.reset(Op386ADDLconst)
1167 v.AuxInt = int32ToAuxInt(c + d)
1168 v.AddArg(x)
1169 return true
1170 }
1171 return false
1172 }
1173 func rewriteValue386_Op386ADDLconstmodify(v *Value) bool {
1174 v_1 := v.Args[1]
1175 v_0 := v.Args[0]
1176 b := v.Block
1177 config := b.Func.Config
1178
1179
1180
1181 for {
1182 valoff1 := auxIntToValAndOff(v.AuxInt)
1183 sym := auxToSym(v.Aux)
1184 if v_0.Op != Op386ADDLconst {
1185 break
1186 }
1187 off2 := auxIntToInt32(v_0.AuxInt)
1188 base := v_0.Args[0]
1189 mem := v_1
1190 if !(valoff1.canAdd32(off2)) {
1191 break
1192 }
1193 v.reset(Op386ADDLconstmodify)
1194 v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
1195 v.Aux = symToAux(sym)
1196 v.AddArg2(base, mem)
1197 return true
1198 }
1199
1200
1201
1202 for {
1203 valoff1 := auxIntToValAndOff(v.AuxInt)
1204 sym1 := auxToSym(v.Aux)
1205 if v_0.Op != Op386LEAL {
1206 break
1207 }
1208 off2 := auxIntToInt32(v_0.AuxInt)
1209 sym2 := auxToSym(v_0.Aux)
1210 base := v_0.Args[0]
1211 mem := v_1
1212 if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
1213 break
1214 }
1215 v.reset(Op386ADDLconstmodify)
1216 v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
1217 v.Aux = symToAux(mergeSym(sym1, sym2))
1218 v.AddArg2(base, mem)
1219 return true
1220 }
1221 return false
1222 }
1223 func rewriteValue386_Op386ADDLload(v *Value) bool {
1224 v_2 := v.Args[2]
1225 v_1 := v.Args[1]
1226 v_0 := v.Args[0]
1227 b := v.Block
1228 config := b.Func.Config
1229
1230
1231
1232 for {
1233 off1 := auxIntToInt32(v.AuxInt)
1234 sym := auxToSym(v.Aux)
1235 val := v_0
1236 if v_1.Op != Op386ADDLconst {
1237 break
1238 }
1239 off2 := auxIntToInt32(v_1.AuxInt)
1240 base := v_1.Args[0]
1241 mem := v_2
1242 if !(is32Bit(int64(off1) + int64(off2))) {
1243 break
1244 }
1245 v.reset(Op386ADDLload)
1246 v.AuxInt = int32ToAuxInt(off1 + off2)
1247 v.Aux = symToAux(sym)
1248 v.AddArg3(val, base, mem)
1249 return true
1250 }
1251
1252
1253
1254 for {
1255 off1 := auxIntToInt32(v.AuxInt)
1256 sym1 := auxToSym(v.Aux)
1257 val := v_0
1258 if v_1.Op != Op386LEAL {
1259 break
1260 }
1261 off2 := auxIntToInt32(v_1.AuxInt)
1262 sym2 := auxToSym(v_1.Aux)
1263 base := v_1.Args[0]
1264 mem := v_2
1265 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
1266 break
1267 }
1268 v.reset(Op386ADDLload)
1269 v.AuxInt = int32ToAuxInt(off1 + off2)
1270 v.Aux = symToAux(mergeSym(sym1, sym2))
1271 v.AddArg3(val, base, mem)
1272 return true
1273 }
1274 return false
1275 }
1276 func rewriteValue386_Op386ADDLmodify(v *Value) bool {
1277 v_2 := v.Args[2]
1278 v_1 := v.Args[1]
1279 v_0 := v.Args[0]
1280 b := v.Block
1281 config := b.Func.Config
1282
1283
1284
1285 for {
1286 off1 := auxIntToInt32(v.AuxInt)
1287 sym := auxToSym(v.Aux)
1288 if v_0.Op != Op386ADDLconst {
1289 break
1290 }
1291 off2 := auxIntToInt32(v_0.AuxInt)
1292 base := v_0.Args[0]
1293 val := v_1
1294 mem := v_2
1295 if !(is32Bit(int64(off1) + int64(off2))) {
1296 break
1297 }
1298 v.reset(Op386ADDLmodify)
1299 v.AuxInt = int32ToAuxInt(off1 + off2)
1300 v.Aux = symToAux(sym)
1301 v.AddArg3(base, val, mem)
1302 return true
1303 }
1304
1305
1306
1307 for {
1308 off1 := auxIntToInt32(v.AuxInt)
1309 sym1 := auxToSym(v.Aux)
1310 if v_0.Op != Op386LEAL {
1311 break
1312 }
1313 off2 := auxIntToInt32(v_0.AuxInt)
1314 sym2 := auxToSym(v_0.Aux)
1315 base := v_0.Args[0]
1316 val := v_1
1317 mem := v_2
1318 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
1319 break
1320 }
1321 v.reset(Op386ADDLmodify)
1322 v.AuxInt = int32ToAuxInt(off1 + off2)
1323 v.Aux = symToAux(mergeSym(sym1, sym2))
1324 v.AddArg3(base, val, mem)
1325 return true
1326 }
1327 return false
1328 }
1329 func rewriteValue386_Op386ADDSD(v *Value) bool {
1330 v_1 := v.Args[1]
1331 v_0 := v.Args[0]
1332
1333
1334
1335 for {
1336 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1337 x := v_0
1338 l := v_1
1339 if l.Op != Op386MOVSDload {
1340 continue
1341 }
1342 off := auxIntToInt32(l.AuxInt)
1343 sym := auxToSym(l.Aux)
1344 mem := l.Args[1]
1345 ptr := l.Args[0]
1346 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
1347 continue
1348 }
1349 v.reset(Op386ADDSDload)
1350 v.AuxInt = int32ToAuxInt(off)
1351 v.Aux = symToAux(sym)
1352 v.AddArg3(x, ptr, mem)
1353 return true
1354 }
1355 break
1356 }
1357 return false
1358 }
1359 func rewriteValue386_Op386ADDSDload(v *Value) bool {
1360 v_2 := v.Args[2]
1361 v_1 := v.Args[1]
1362 v_0 := v.Args[0]
1363 b := v.Block
1364 config := b.Func.Config
1365
1366
1367
1368 for {
1369 off1 := auxIntToInt32(v.AuxInt)
1370 sym := auxToSym(v.Aux)
1371 val := v_0
1372 if v_1.Op != Op386ADDLconst {
1373 break
1374 }
1375 off2 := auxIntToInt32(v_1.AuxInt)
1376 base := v_1.Args[0]
1377 mem := v_2
1378 if !(is32Bit(int64(off1) + int64(off2))) {
1379 break
1380 }
1381 v.reset(Op386ADDSDload)
1382 v.AuxInt = int32ToAuxInt(off1 + off2)
1383 v.Aux = symToAux(sym)
1384 v.AddArg3(val, base, mem)
1385 return true
1386 }
1387
1388
1389
1390 for {
1391 off1 := auxIntToInt32(v.AuxInt)
1392 sym1 := auxToSym(v.Aux)
1393 val := v_0
1394 if v_1.Op != Op386LEAL {
1395 break
1396 }
1397 off2 := auxIntToInt32(v_1.AuxInt)
1398 sym2 := auxToSym(v_1.Aux)
1399 base := v_1.Args[0]
1400 mem := v_2
1401 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
1402 break
1403 }
1404 v.reset(Op386ADDSDload)
1405 v.AuxInt = int32ToAuxInt(off1 + off2)
1406 v.Aux = symToAux(mergeSym(sym1, sym2))
1407 v.AddArg3(val, base, mem)
1408 return true
1409 }
1410 return false
1411 }
1412 func rewriteValue386_Op386ADDSS(v *Value) bool {
1413 v_1 := v.Args[1]
1414 v_0 := v.Args[0]
1415
1416
1417
1418 for {
1419 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1420 x := v_0
1421 l := v_1
1422 if l.Op != Op386MOVSSload {
1423 continue
1424 }
1425 off := auxIntToInt32(l.AuxInt)
1426 sym := auxToSym(l.Aux)
1427 mem := l.Args[1]
1428 ptr := l.Args[0]
1429 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
1430 continue
1431 }
1432 v.reset(Op386ADDSSload)
1433 v.AuxInt = int32ToAuxInt(off)
1434 v.Aux = symToAux(sym)
1435 v.AddArg3(x, ptr, mem)
1436 return true
1437 }
1438 break
1439 }
1440 return false
1441 }
1442 func rewriteValue386_Op386ADDSSload(v *Value) bool {
1443 v_2 := v.Args[2]
1444 v_1 := v.Args[1]
1445 v_0 := v.Args[0]
1446 b := v.Block
1447 config := b.Func.Config
1448
1449
1450
1451 for {
1452 off1 := auxIntToInt32(v.AuxInt)
1453 sym := auxToSym(v.Aux)
1454 val := v_0
1455 if v_1.Op != Op386ADDLconst {
1456 break
1457 }
1458 off2 := auxIntToInt32(v_1.AuxInt)
1459 base := v_1.Args[0]
1460 mem := v_2
1461 if !(is32Bit(int64(off1) + int64(off2))) {
1462 break
1463 }
1464 v.reset(Op386ADDSSload)
1465 v.AuxInt = int32ToAuxInt(off1 + off2)
1466 v.Aux = symToAux(sym)
1467 v.AddArg3(val, base, mem)
1468 return true
1469 }
1470
1471
1472
1473 for {
1474 off1 := auxIntToInt32(v.AuxInt)
1475 sym1 := auxToSym(v.Aux)
1476 val := v_0
1477 if v_1.Op != Op386LEAL {
1478 break
1479 }
1480 off2 := auxIntToInt32(v_1.AuxInt)
1481 sym2 := auxToSym(v_1.Aux)
1482 base := v_1.Args[0]
1483 mem := v_2
1484 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
1485 break
1486 }
1487 v.reset(Op386ADDSSload)
1488 v.AuxInt = int32ToAuxInt(off1 + off2)
1489 v.Aux = symToAux(mergeSym(sym1, sym2))
1490 v.AddArg3(val, base, mem)
1491 return true
1492 }
1493 return false
1494 }
1495 func rewriteValue386_Op386ANDL(v *Value) bool {
1496 v_1 := v.Args[1]
1497 v_0 := v.Args[0]
1498
1499
1500 for {
1501 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1502 x := v_0
1503 if v_1.Op != Op386MOVLconst {
1504 continue
1505 }
1506 c := auxIntToInt32(v_1.AuxInt)
1507 v.reset(Op386ANDLconst)
1508 v.AuxInt = int32ToAuxInt(c)
1509 v.AddArg(x)
1510 return true
1511 }
1512 break
1513 }
1514
1515
1516
1517 for {
1518 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1519 x := v_0
1520 l := v_1
1521 if l.Op != Op386MOVLload {
1522 continue
1523 }
1524 off := auxIntToInt32(l.AuxInt)
1525 sym := auxToSym(l.Aux)
1526 mem := l.Args[1]
1527 ptr := l.Args[0]
1528 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
1529 continue
1530 }
1531 v.reset(Op386ANDLload)
1532 v.AuxInt = int32ToAuxInt(off)
1533 v.Aux = symToAux(sym)
1534 v.AddArg3(x, ptr, mem)
1535 return true
1536 }
1537 break
1538 }
1539
1540
1541 for {
1542 x := v_0
1543 if x != v_1 {
1544 break
1545 }
1546 v.copyOf(x)
1547 return true
1548 }
1549 return false
1550 }
1551 func rewriteValue386_Op386ANDLconst(v *Value) bool {
1552 v_0 := v.Args[0]
1553
1554
1555 for {
1556 c := auxIntToInt32(v.AuxInt)
1557 if v_0.Op != Op386ANDLconst {
1558 break
1559 }
1560 d := auxIntToInt32(v_0.AuxInt)
1561 x := v_0.Args[0]
1562 v.reset(Op386ANDLconst)
1563 v.AuxInt = int32ToAuxInt(c & d)
1564 v.AddArg(x)
1565 return true
1566 }
1567
1568
1569
1570 for {
1571 c := auxIntToInt32(v.AuxInt)
1572 if !(c == 0) {
1573 break
1574 }
1575 v.reset(Op386MOVLconst)
1576 v.AuxInt = int32ToAuxInt(0)
1577 return true
1578 }
1579
1580
1581
1582 for {
1583 c := auxIntToInt32(v.AuxInt)
1584 x := v_0
1585 if !(c == -1) {
1586 break
1587 }
1588 v.copyOf(x)
1589 return true
1590 }
1591
1592
1593 for {
1594 c := auxIntToInt32(v.AuxInt)
1595 if v_0.Op != Op386MOVLconst {
1596 break
1597 }
1598 d := auxIntToInt32(v_0.AuxInt)
1599 v.reset(Op386MOVLconst)
1600 v.AuxInt = int32ToAuxInt(c & d)
1601 return true
1602 }
1603 return false
1604 }
1605 func rewriteValue386_Op386ANDLconstmodify(v *Value) bool {
1606 v_1 := v.Args[1]
1607 v_0 := v.Args[0]
1608 b := v.Block
1609 config := b.Func.Config
1610
1611
1612
1613 for {
1614 valoff1 := auxIntToValAndOff(v.AuxInt)
1615 sym := auxToSym(v.Aux)
1616 if v_0.Op != Op386ADDLconst {
1617 break
1618 }
1619 off2 := auxIntToInt32(v_0.AuxInt)
1620 base := v_0.Args[0]
1621 mem := v_1
1622 if !(valoff1.canAdd32(off2)) {
1623 break
1624 }
1625 v.reset(Op386ANDLconstmodify)
1626 v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
1627 v.Aux = symToAux(sym)
1628 v.AddArg2(base, mem)
1629 return true
1630 }
1631
1632
1633
1634 for {
1635 valoff1 := auxIntToValAndOff(v.AuxInt)
1636 sym1 := auxToSym(v.Aux)
1637 if v_0.Op != Op386LEAL {
1638 break
1639 }
1640 off2 := auxIntToInt32(v_0.AuxInt)
1641 sym2 := auxToSym(v_0.Aux)
1642 base := v_0.Args[0]
1643 mem := v_1
1644 if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
1645 break
1646 }
1647 v.reset(Op386ANDLconstmodify)
1648 v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
1649 v.Aux = symToAux(mergeSym(sym1, sym2))
1650 v.AddArg2(base, mem)
1651 return true
1652 }
1653 return false
1654 }
1655 func rewriteValue386_Op386ANDLload(v *Value) bool {
1656 v_2 := v.Args[2]
1657 v_1 := v.Args[1]
1658 v_0 := v.Args[0]
1659 b := v.Block
1660 config := b.Func.Config
1661
1662
1663
1664 for {
1665 off1 := auxIntToInt32(v.AuxInt)
1666 sym := auxToSym(v.Aux)
1667 val := v_0
1668 if v_1.Op != Op386ADDLconst {
1669 break
1670 }
1671 off2 := auxIntToInt32(v_1.AuxInt)
1672 base := v_1.Args[0]
1673 mem := v_2
1674 if !(is32Bit(int64(off1) + int64(off2))) {
1675 break
1676 }
1677 v.reset(Op386ANDLload)
1678 v.AuxInt = int32ToAuxInt(off1 + off2)
1679 v.Aux = symToAux(sym)
1680 v.AddArg3(val, base, mem)
1681 return true
1682 }
1683
1684
1685
1686 for {
1687 off1 := auxIntToInt32(v.AuxInt)
1688 sym1 := auxToSym(v.Aux)
1689 val := v_0
1690 if v_1.Op != Op386LEAL {
1691 break
1692 }
1693 off2 := auxIntToInt32(v_1.AuxInt)
1694 sym2 := auxToSym(v_1.Aux)
1695 base := v_1.Args[0]
1696 mem := v_2
1697 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
1698 break
1699 }
1700 v.reset(Op386ANDLload)
1701 v.AuxInt = int32ToAuxInt(off1 + off2)
1702 v.Aux = symToAux(mergeSym(sym1, sym2))
1703 v.AddArg3(val, base, mem)
1704 return true
1705 }
1706 return false
1707 }
1708 func rewriteValue386_Op386ANDLmodify(v *Value) bool {
1709 v_2 := v.Args[2]
1710 v_1 := v.Args[1]
1711 v_0 := v.Args[0]
1712 b := v.Block
1713 config := b.Func.Config
1714
1715
1716
1717 for {
1718 off1 := auxIntToInt32(v.AuxInt)
1719 sym := auxToSym(v.Aux)
1720 if v_0.Op != Op386ADDLconst {
1721 break
1722 }
1723 off2 := auxIntToInt32(v_0.AuxInt)
1724 base := v_0.Args[0]
1725 val := v_1
1726 mem := v_2
1727 if !(is32Bit(int64(off1) + int64(off2))) {
1728 break
1729 }
1730 v.reset(Op386ANDLmodify)
1731 v.AuxInt = int32ToAuxInt(off1 + off2)
1732 v.Aux = symToAux(sym)
1733 v.AddArg3(base, val, mem)
1734 return true
1735 }
1736
1737
1738
1739 for {
1740 off1 := auxIntToInt32(v.AuxInt)
1741 sym1 := auxToSym(v.Aux)
1742 if v_0.Op != Op386LEAL {
1743 break
1744 }
1745 off2 := auxIntToInt32(v_0.AuxInt)
1746 sym2 := auxToSym(v_0.Aux)
1747 base := v_0.Args[0]
1748 val := v_1
1749 mem := v_2
1750 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
1751 break
1752 }
1753 v.reset(Op386ANDLmodify)
1754 v.AuxInt = int32ToAuxInt(off1 + off2)
1755 v.Aux = symToAux(mergeSym(sym1, sym2))
1756 v.AddArg3(base, val, mem)
1757 return true
1758 }
1759 return false
1760 }
1761 func rewriteValue386_Op386CMPB(v *Value) bool {
1762 v_1 := v.Args[1]
1763 v_0 := v.Args[0]
1764 b := v.Block
1765
1766
1767 for {
1768 x := v_0
1769 if v_1.Op != Op386MOVLconst {
1770 break
1771 }
1772 c := auxIntToInt32(v_1.AuxInt)
1773 v.reset(Op386CMPBconst)
1774 v.AuxInt = int8ToAuxInt(int8(c))
1775 v.AddArg(x)
1776 return true
1777 }
1778
1779
1780 for {
1781 if v_0.Op != Op386MOVLconst {
1782 break
1783 }
1784 c := auxIntToInt32(v_0.AuxInt)
1785 x := v_1
1786 v.reset(Op386InvertFlags)
1787 v0 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
1788 v0.AuxInt = int8ToAuxInt(int8(c))
1789 v0.AddArg(x)
1790 v.AddArg(v0)
1791 return true
1792 }
1793
1794
1795
1796 for {
1797 x := v_0
1798 y := v_1
1799 if !(canonLessThan(x, y)) {
1800 break
1801 }
1802 v.reset(Op386InvertFlags)
1803 v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
1804 v0.AddArg2(y, x)
1805 v.AddArg(v0)
1806 return true
1807 }
1808
1809
1810
1811 for {
1812 l := v_0
1813 if l.Op != Op386MOVBload {
1814 break
1815 }
1816 off := auxIntToInt32(l.AuxInt)
1817 sym := auxToSym(l.Aux)
1818 mem := l.Args[1]
1819 ptr := l.Args[0]
1820 x := v_1
1821 if !(canMergeLoad(v, l) && clobber(l)) {
1822 break
1823 }
1824 v.reset(Op386CMPBload)
1825 v.AuxInt = int32ToAuxInt(off)
1826 v.Aux = symToAux(sym)
1827 v.AddArg3(ptr, x, mem)
1828 return true
1829 }
1830
1831
1832
1833 for {
1834 x := v_0
1835 l := v_1
1836 if l.Op != Op386MOVBload {
1837 break
1838 }
1839 off := auxIntToInt32(l.AuxInt)
1840 sym := auxToSym(l.Aux)
1841 mem := l.Args[1]
1842 ptr := l.Args[0]
1843 if !(canMergeLoad(v, l) && clobber(l)) {
1844 break
1845 }
1846 v.reset(Op386InvertFlags)
1847 v0 := b.NewValue0(l.Pos, Op386CMPBload, types.TypeFlags)
1848 v0.AuxInt = int32ToAuxInt(off)
1849 v0.Aux = symToAux(sym)
1850 v0.AddArg3(ptr, x, mem)
1851 v.AddArg(v0)
1852 return true
1853 }
1854 return false
1855 }
1856 func rewriteValue386_Op386CMPBconst(v *Value) bool {
1857 v_0 := v.Args[0]
1858 b := v.Block
1859
1860
1861
1862 for {
1863 y := auxIntToInt8(v.AuxInt)
1864 if v_0.Op != Op386MOVLconst {
1865 break
1866 }
1867 x := auxIntToInt32(v_0.AuxInt)
1868 if !(int8(x) == y) {
1869 break
1870 }
1871 v.reset(Op386FlagEQ)
1872 return true
1873 }
1874
1875
1876
1877 for {
1878 y := auxIntToInt8(v.AuxInt)
1879 if v_0.Op != Op386MOVLconst {
1880 break
1881 }
1882 x := auxIntToInt32(v_0.AuxInt)
1883 if !(int8(x) < y && uint8(x) < uint8(y)) {
1884 break
1885 }
1886 v.reset(Op386FlagLT_ULT)
1887 return true
1888 }
1889
1890
1891
1892 for {
1893 y := auxIntToInt8(v.AuxInt)
1894 if v_0.Op != Op386MOVLconst {
1895 break
1896 }
1897 x := auxIntToInt32(v_0.AuxInt)
1898 if !(int8(x) < y && uint8(x) > uint8(y)) {
1899 break
1900 }
1901 v.reset(Op386FlagLT_UGT)
1902 return true
1903 }
1904
1905
1906
1907 for {
1908 y := auxIntToInt8(v.AuxInt)
1909 if v_0.Op != Op386MOVLconst {
1910 break
1911 }
1912 x := auxIntToInt32(v_0.AuxInt)
1913 if !(int8(x) > y && uint8(x) < uint8(y)) {
1914 break
1915 }
1916 v.reset(Op386FlagGT_ULT)
1917 return true
1918 }
1919
1920
1921
1922 for {
1923 y := auxIntToInt8(v.AuxInt)
1924 if v_0.Op != Op386MOVLconst {
1925 break
1926 }
1927 x := auxIntToInt32(v_0.AuxInt)
1928 if !(int8(x) > y && uint8(x) > uint8(y)) {
1929 break
1930 }
1931 v.reset(Op386FlagGT_UGT)
1932 return true
1933 }
1934
1935
1936
1937 for {
1938 n := auxIntToInt8(v.AuxInt)
1939 if v_0.Op != Op386ANDLconst {
1940 break
1941 }
1942 m := auxIntToInt32(v_0.AuxInt)
1943 if !(0 <= int8(m) && int8(m) < n) {
1944 break
1945 }
1946 v.reset(Op386FlagLT_ULT)
1947 return true
1948 }
1949
1950
1951
1952 for {
1953 if auxIntToInt8(v.AuxInt) != 0 {
1954 break
1955 }
1956 l := v_0
1957 if l.Op != Op386ANDL {
1958 break
1959 }
1960 y := l.Args[1]
1961 x := l.Args[0]
1962 if !(l.Uses == 1) {
1963 break
1964 }
1965 v.reset(Op386TESTB)
1966 v.AddArg2(x, y)
1967 return true
1968 }
1969
1970
1971
1972 for {
1973 if auxIntToInt8(v.AuxInt) != 0 {
1974 break
1975 }
1976 l := v_0
1977 if l.Op != Op386ANDLconst {
1978 break
1979 }
1980 c := auxIntToInt32(l.AuxInt)
1981 x := l.Args[0]
1982 if !(l.Uses == 1) {
1983 break
1984 }
1985 v.reset(Op386TESTBconst)
1986 v.AuxInt = int8ToAuxInt(int8(c))
1987 v.AddArg(x)
1988 return true
1989 }
1990
1991
1992 for {
1993 if auxIntToInt8(v.AuxInt) != 0 {
1994 break
1995 }
1996 x := v_0
1997 v.reset(Op386TESTB)
1998 v.AddArg2(x, x)
1999 return true
2000 }
2001
2002
2003
2004 for {
2005 c := auxIntToInt8(v.AuxInt)
2006 l := v_0
2007 if l.Op != Op386MOVBload {
2008 break
2009 }
2010 off := auxIntToInt32(l.AuxInt)
2011 sym := auxToSym(l.Aux)
2012 mem := l.Args[1]
2013 ptr := l.Args[0]
2014 if !(l.Uses == 1 && clobber(l)) {
2015 break
2016 }
2017 b = l.Block
2018 v0 := b.NewValue0(l.Pos, Op386CMPBconstload, types.TypeFlags)
2019 v.copyOf(v0)
2020 v0.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
2021 v0.Aux = symToAux(sym)
2022 v0.AddArg2(ptr, mem)
2023 return true
2024 }
2025 return false
2026 }
2027 func rewriteValue386_Op386CMPBload(v *Value) bool {
2028 v_2 := v.Args[2]
2029 v_1 := v.Args[1]
2030 v_0 := v.Args[0]
2031
2032
2033 for {
2034 off := auxIntToInt32(v.AuxInt)
2035 sym := auxToSym(v.Aux)
2036 ptr := v_0
2037 if v_1.Op != Op386MOVLconst {
2038 break
2039 }
2040 c := auxIntToInt32(v_1.AuxInt)
2041 mem := v_2
2042 v.reset(Op386CMPBconstload)
2043 v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int8(c)), off))
2044 v.Aux = symToAux(sym)
2045 v.AddArg2(ptr, mem)
2046 return true
2047 }
2048 return false
2049 }
2050 func rewriteValue386_Op386CMPL(v *Value) bool {
2051 v_1 := v.Args[1]
2052 v_0 := v.Args[0]
2053 b := v.Block
2054
2055
2056 for {
2057 x := v_0
2058 if v_1.Op != Op386MOVLconst {
2059 break
2060 }
2061 c := auxIntToInt32(v_1.AuxInt)
2062 v.reset(Op386CMPLconst)
2063 v.AuxInt = int32ToAuxInt(c)
2064 v.AddArg(x)
2065 return true
2066 }
2067
2068
2069 for {
2070 if v_0.Op != Op386MOVLconst {
2071 break
2072 }
2073 c := auxIntToInt32(v_0.AuxInt)
2074 x := v_1
2075 v.reset(Op386InvertFlags)
2076 v0 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
2077 v0.AuxInt = int32ToAuxInt(c)
2078 v0.AddArg(x)
2079 v.AddArg(v0)
2080 return true
2081 }
2082
2083
2084
2085 for {
2086 x := v_0
2087 y := v_1
2088 if !(canonLessThan(x, y)) {
2089 break
2090 }
2091 v.reset(Op386InvertFlags)
2092 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
2093 v0.AddArg2(y, x)
2094 v.AddArg(v0)
2095 return true
2096 }
2097
2098
2099
2100 for {
2101 l := v_0
2102 if l.Op != Op386MOVLload {
2103 break
2104 }
2105 off := auxIntToInt32(l.AuxInt)
2106 sym := auxToSym(l.Aux)
2107 mem := l.Args[1]
2108 ptr := l.Args[0]
2109 x := v_1
2110 if !(canMergeLoad(v, l) && clobber(l)) {
2111 break
2112 }
2113 v.reset(Op386CMPLload)
2114 v.AuxInt = int32ToAuxInt(off)
2115 v.Aux = symToAux(sym)
2116 v.AddArg3(ptr, x, mem)
2117 return true
2118 }
2119
2120
2121
2122 for {
2123 x := v_0
2124 l := v_1
2125 if l.Op != Op386MOVLload {
2126 break
2127 }
2128 off := auxIntToInt32(l.AuxInt)
2129 sym := auxToSym(l.Aux)
2130 mem := l.Args[1]
2131 ptr := l.Args[0]
2132 if !(canMergeLoad(v, l) && clobber(l)) {
2133 break
2134 }
2135 v.reset(Op386InvertFlags)
2136 v0 := b.NewValue0(l.Pos, Op386CMPLload, types.TypeFlags)
2137 v0.AuxInt = int32ToAuxInt(off)
2138 v0.Aux = symToAux(sym)
2139 v0.AddArg3(ptr, x, mem)
2140 v.AddArg(v0)
2141 return true
2142 }
2143 return false
2144 }
2145 func rewriteValue386_Op386CMPLconst(v *Value) bool {
2146 v_0 := v.Args[0]
2147 b := v.Block
2148
2149
2150
2151 for {
2152 y := auxIntToInt32(v.AuxInt)
2153 if v_0.Op != Op386MOVLconst {
2154 break
2155 }
2156 x := auxIntToInt32(v_0.AuxInt)
2157 if !(x == y) {
2158 break
2159 }
2160 v.reset(Op386FlagEQ)
2161 return true
2162 }
2163
2164
2165
2166 for {
2167 y := auxIntToInt32(v.AuxInt)
2168 if v_0.Op != Op386MOVLconst {
2169 break
2170 }
2171 x := auxIntToInt32(v_0.AuxInt)
2172 if !(x < y && uint32(x) < uint32(y)) {
2173 break
2174 }
2175 v.reset(Op386FlagLT_ULT)
2176 return true
2177 }
2178
2179
2180
2181 for {
2182 y := auxIntToInt32(v.AuxInt)
2183 if v_0.Op != Op386MOVLconst {
2184 break
2185 }
2186 x := auxIntToInt32(v_0.AuxInt)
2187 if !(x < y && uint32(x) > uint32(y)) {
2188 break
2189 }
2190 v.reset(Op386FlagLT_UGT)
2191 return true
2192 }
2193
2194
2195
2196 for {
2197 y := auxIntToInt32(v.AuxInt)
2198 if v_0.Op != Op386MOVLconst {
2199 break
2200 }
2201 x := auxIntToInt32(v_0.AuxInt)
2202 if !(x > y && uint32(x) < uint32(y)) {
2203 break
2204 }
2205 v.reset(Op386FlagGT_ULT)
2206 return true
2207 }
2208
2209
2210
2211 for {
2212 y := auxIntToInt32(v.AuxInt)
2213 if v_0.Op != Op386MOVLconst {
2214 break
2215 }
2216 x := auxIntToInt32(v_0.AuxInt)
2217 if !(x > y && uint32(x) > uint32(y)) {
2218 break
2219 }
2220 v.reset(Op386FlagGT_UGT)
2221 return true
2222 }
2223
2224
2225
2226 for {
2227 n := auxIntToInt32(v.AuxInt)
2228 if v_0.Op != Op386SHRLconst {
2229 break
2230 }
2231 c := auxIntToInt32(v_0.AuxInt)
2232 if !(0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)) {
2233 break
2234 }
2235 v.reset(Op386FlagLT_ULT)
2236 return true
2237 }
2238
2239
2240
2241 for {
2242 n := auxIntToInt32(v.AuxInt)
2243 if v_0.Op != Op386ANDLconst {
2244 break
2245 }
2246 m := auxIntToInt32(v_0.AuxInt)
2247 if !(0 <= m && m < n) {
2248 break
2249 }
2250 v.reset(Op386FlagLT_ULT)
2251 return true
2252 }
2253
2254
2255
2256 for {
2257 if auxIntToInt32(v.AuxInt) != 0 {
2258 break
2259 }
2260 l := v_0
2261 if l.Op != Op386ANDL {
2262 break
2263 }
2264 y := l.Args[1]
2265 x := l.Args[0]
2266 if !(l.Uses == 1) {
2267 break
2268 }
2269 v.reset(Op386TESTL)
2270 v.AddArg2(x, y)
2271 return true
2272 }
2273
2274
2275
2276 for {
2277 if auxIntToInt32(v.AuxInt) != 0 {
2278 break
2279 }
2280 l := v_0
2281 if l.Op != Op386ANDLconst {
2282 break
2283 }
2284 c := auxIntToInt32(l.AuxInt)
2285 x := l.Args[0]
2286 if !(l.Uses == 1) {
2287 break
2288 }
2289 v.reset(Op386TESTLconst)
2290 v.AuxInt = int32ToAuxInt(c)
2291 v.AddArg(x)
2292 return true
2293 }
2294
2295
2296 for {
2297 if auxIntToInt32(v.AuxInt) != 0 {
2298 break
2299 }
2300 x := v_0
2301 v.reset(Op386TESTL)
2302 v.AddArg2(x, x)
2303 return true
2304 }
2305
2306
2307
2308 for {
2309 c := auxIntToInt32(v.AuxInt)
2310 l := v_0
2311 if l.Op != Op386MOVLload {
2312 break
2313 }
2314 off := auxIntToInt32(l.AuxInt)
2315 sym := auxToSym(l.Aux)
2316 mem := l.Args[1]
2317 ptr := l.Args[0]
2318 if !(l.Uses == 1 && clobber(l)) {
2319 break
2320 }
2321 b = l.Block
2322 v0 := b.NewValue0(l.Pos, Op386CMPLconstload, types.TypeFlags)
2323 v.copyOf(v0)
2324 v0.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
2325 v0.Aux = symToAux(sym)
2326 v0.AddArg2(ptr, mem)
2327 return true
2328 }
2329 return false
2330 }
2331 func rewriteValue386_Op386CMPLload(v *Value) bool {
2332 v_2 := v.Args[2]
2333 v_1 := v.Args[1]
2334 v_0 := v.Args[0]
2335
2336
2337 for {
2338 off := auxIntToInt32(v.AuxInt)
2339 sym := auxToSym(v.Aux)
2340 ptr := v_0
2341 if v_1.Op != Op386MOVLconst {
2342 break
2343 }
2344 c := auxIntToInt32(v_1.AuxInt)
2345 mem := v_2
2346 v.reset(Op386CMPLconstload)
2347 v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
2348 v.Aux = symToAux(sym)
2349 v.AddArg2(ptr, mem)
2350 return true
2351 }
2352 return false
2353 }
2354 func rewriteValue386_Op386CMPW(v *Value) bool {
2355 v_1 := v.Args[1]
2356 v_0 := v.Args[0]
2357 b := v.Block
2358
2359
2360 for {
2361 x := v_0
2362 if v_1.Op != Op386MOVLconst {
2363 break
2364 }
2365 c := auxIntToInt32(v_1.AuxInt)
2366 v.reset(Op386CMPWconst)
2367 v.AuxInt = int16ToAuxInt(int16(c))
2368 v.AddArg(x)
2369 return true
2370 }
2371
2372
2373 for {
2374 if v_0.Op != Op386MOVLconst {
2375 break
2376 }
2377 c := auxIntToInt32(v_0.AuxInt)
2378 x := v_1
2379 v.reset(Op386InvertFlags)
2380 v0 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
2381 v0.AuxInt = int16ToAuxInt(int16(c))
2382 v0.AddArg(x)
2383 v.AddArg(v0)
2384 return true
2385 }
2386
2387
2388
2389 for {
2390 x := v_0
2391 y := v_1
2392 if !(canonLessThan(x, y)) {
2393 break
2394 }
2395 v.reset(Op386InvertFlags)
2396 v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
2397 v0.AddArg2(y, x)
2398 v.AddArg(v0)
2399 return true
2400 }
2401
2402
2403
2404 for {
2405 l := v_0
2406 if l.Op != Op386MOVWload {
2407 break
2408 }
2409 off := auxIntToInt32(l.AuxInt)
2410 sym := auxToSym(l.Aux)
2411 mem := l.Args[1]
2412 ptr := l.Args[0]
2413 x := v_1
2414 if !(canMergeLoad(v, l) && clobber(l)) {
2415 break
2416 }
2417 v.reset(Op386CMPWload)
2418 v.AuxInt = int32ToAuxInt(off)
2419 v.Aux = symToAux(sym)
2420 v.AddArg3(ptr, x, mem)
2421 return true
2422 }
2423
2424
2425
2426 for {
2427 x := v_0
2428 l := v_1
2429 if l.Op != Op386MOVWload {
2430 break
2431 }
2432 off := auxIntToInt32(l.AuxInt)
2433 sym := auxToSym(l.Aux)
2434 mem := l.Args[1]
2435 ptr := l.Args[0]
2436 if !(canMergeLoad(v, l) && clobber(l)) {
2437 break
2438 }
2439 v.reset(Op386InvertFlags)
2440 v0 := b.NewValue0(l.Pos, Op386CMPWload, types.TypeFlags)
2441 v0.AuxInt = int32ToAuxInt(off)
2442 v0.Aux = symToAux(sym)
2443 v0.AddArg3(ptr, x, mem)
2444 v.AddArg(v0)
2445 return true
2446 }
2447 return false
2448 }
2449 func rewriteValue386_Op386CMPWconst(v *Value) bool {
2450 v_0 := v.Args[0]
2451 b := v.Block
2452
2453
2454
2455 for {
2456 y := auxIntToInt16(v.AuxInt)
2457 if v_0.Op != Op386MOVLconst {
2458 break
2459 }
2460 x := auxIntToInt32(v_0.AuxInt)
2461 if !(int16(x) == y) {
2462 break
2463 }
2464 v.reset(Op386FlagEQ)
2465 return true
2466 }
2467
2468
2469
2470 for {
2471 y := auxIntToInt16(v.AuxInt)
2472 if v_0.Op != Op386MOVLconst {
2473 break
2474 }
2475 x := auxIntToInt32(v_0.AuxInt)
2476 if !(int16(x) < y && uint16(x) < uint16(y)) {
2477 break
2478 }
2479 v.reset(Op386FlagLT_ULT)
2480 return true
2481 }
2482
2483
2484
2485 for {
2486 y := auxIntToInt16(v.AuxInt)
2487 if v_0.Op != Op386MOVLconst {
2488 break
2489 }
2490 x := auxIntToInt32(v_0.AuxInt)
2491 if !(int16(x) < y && uint16(x) > uint16(y)) {
2492 break
2493 }
2494 v.reset(Op386FlagLT_UGT)
2495 return true
2496 }
2497
2498
2499
2500 for {
2501 y := auxIntToInt16(v.AuxInt)
2502 if v_0.Op != Op386MOVLconst {
2503 break
2504 }
2505 x := auxIntToInt32(v_0.AuxInt)
2506 if !(int16(x) > y && uint16(x) < uint16(y)) {
2507 break
2508 }
2509 v.reset(Op386FlagGT_ULT)
2510 return true
2511 }
2512
2513
2514
2515 for {
2516 y := auxIntToInt16(v.AuxInt)
2517 if v_0.Op != Op386MOVLconst {
2518 break
2519 }
2520 x := auxIntToInt32(v_0.AuxInt)
2521 if !(int16(x) > y && uint16(x) > uint16(y)) {
2522 break
2523 }
2524 v.reset(Op386FlagGT_UGT)
2525 return true
2526 }
2527
2528
2529
2530 for {
2531 n := auxIntToInt16(v.AuxInt)
2532 if v_0.Op != Op386ANDLconst {
2533 break
2534 }
2535 m := auxIntToInt32(v_0.AuxInt)
2536 if !(0 <= int16(m) && int16(m) < n) {
2537 break
2538 }
2539 v.reset(Op386FlagLT_ULT)
2540 return true
2541 }
2542
2543
2544
2545 for {
2546 if auxIntToInt16(v.AuxInt) != 0 {
2547 break
2548 }
2549 l := v_0
2550 if l.Op != Op386ANDL {
2551 break
2552 }
2553 y := l.Args[1]
2554 x := l.Args[0]
2555 if !(l.Uses == 1) {
2556 break
2557 }
2558 v.reset(Op386TESTW)
2559 v.AddArg2(x, y)
2560 return true
2561 }
2562
2563
2564
2565 for {
2566 if auxIntToInt16(v.AuxInt) != 0 {
2567 break
2568 }
2569 l := v_0
2570 if l.Op != Op386ANDLconst {
2571 break
2572 }
2573 c := auxIntToInt32(l.AuxInt)
2574 x := l.Args[0]
2575 if !(l.Uses == 1) {
2576 break
2577 }
2578 v.reset(Op386TESTWconst)
2579 v.AuxInt = int16ToAuxInt(int16(c))
2580 v.AddArg(x)
2581 return true
2582 }
2583
2584
2585 for {
2586 if auxIntToInt16(v.AuxInt) != 0 {
2587 break
2588 }
2589 x := v_0
2590 v.reset(Op386TESTW)
2591 v.AddArg2(x, x)
2592 return true
2593 }
2594
2595
2596
2597 for {
2598 c := auxIntToInt16(v.AuxInt)
2599 l := v_0
2600 if l.Op != Op386MOVWload {
2601 break
2602 }
2603 off := auxIntToInt32(l.AuxInt)
2604 sym := auxToSym(l.Aux)
2605 mem := l.Args[1]
2606 ptr := l.Args[0]
2607 if !(l.Uses == 1 && clobber(l)) {
2608 break
2609 }
2610 b = l.Block
2611 v0 := b.NewValue0(l.Pos, Op386CMPWconstload, types.TypeFlags)
2612 v.copyOf(v0)
2613 v0.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
2614 v0.Aux = symToAux(sym)
2615 v0.AddArg2(ptr, mem)
2616 return true
2617 }
2618 return false
2619 }
2620 func rewriteValue386_Op386CMPWload(v *Value) bool {
2621 v_2 := v.Args[2]
2622 v_1 := v.Args[1]
2623 v_0 := v.Args[0]
2624
2625
2626 for {
2627 off := auxIntToInt32(v.AuxInt)
2628 sym := auxToSym(v.Aux)
2629 ptr := v_0
2630 if v_1.Op != Op386MOVLconst {
2631 break
2632 }
2633 c := auxIntToInt32(v_1.AuxInt)
2634 mem := v_2
2635 v.reset(Op386CMPWconstload)
2636 v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int16(c)), off))
2637 v.Aux = symToAux(sym)
2638 v.AddArg2(ptr, mem)
2639 return true
2640 }
2641 return false
2642 }
2643 func rewriteValue386_Op386DIVSD(v *Value) bool {
2644 v_1 := v.Args[1]
2645 v_0 := v.Args[0]
2646
2647
2648
2649 for {
2650 x := v_0
2651 l := v_1
2652 if l.Op != Op386MOVSDload {
2653 break
2654 }
2655 off := auxIntToInt32(l.AuxInt)
2656 sym := auxToSym(l.Aux)
2657 mem := l.Args[1]
2658 ptr := l.Args[0]
2659 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
2660 break
2661 }
2662 v.reset(Op386DIVSDload)
2663 v.AuxInt = int32ToAuxInt(off)
2664 v.Aux = symToAux(sym)
2665 v.AddArg3(x, ptr, mem)
2666 return true
2667 }
2668 return false
2669 }
2670 func rewriteValue386_Op386DIVSDload(v *Value) bool {
2671 v_2 := v.Args[2]
2672 v_1 := v.Args[1]
2673 v_0 := v.Args[0]
2674 b := v.Block
2675 config := b.Func.Config
2676
2677
2678
2679 for {
2680 off1 := auxIntToInt32(v.AuxInt)
2681 sym := auxToSym(v.Aux)
2682 val := v_0
2683 if v_1.Op != Op386ADDLconst {
2684 break
2685 }
2686 off2 := auxIntToInt32(v_1.AuxInt)
2687 base := v_1.Args[0]
2688 mem := v_2
2689 if !(is32Bit(int64(off1) + int64(off2))) {
2690 break
2691 }
2692 v.reset(Op386DIVSDload)
2693 v.AuxInt = int32ToAuxInt(off1 + off2)
2694 v.Aux = symToAux(sym)
2695 v.AddArg3(val, base, mem)
2696 return true
2697 }
2698
2699
2700
2701 for {
2702 off1 := auxIntToInt32(v.AuxInt)
2703 sym1 := auxToSym(v.Aux)
2704 val := v_0
2705 if v_1.Op != Op386LEAL {
2706 break
2707 }
2708 off2 := auxIntToInt32(v_1.AuxInt)
2709 sym2 := auxToSym(v_1.Aux)
2710 base := v_1.Args[0]
2711 mem := v_2
2712 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
2713 break
2714 }
2715 v.reset(Op386DIVSDload)
2716 v.AuxInt = int32ToAuxInt(off1 + off2)
2717 v.Aux = symToAux(mergeSym(sym1, sym2))
2718 v.AddArg3(val, base, mem)
2719 return true
2720 }
2721 return false
2722 }
2723 func rewriteValue386_Op386DIVSS(v *Value) bool {
2724 v_1 := v.Args[1]
2725 v_0 := v.Args[0]
2726
2727
2728
2729 for {
2730 x := v_0
2731 l := v_1
2732 if l.Op != Op386MOVSSload {
2733 break
2734 }
2735 off := auxIntToInt32(l.AuxInt)
2736 sym := auxToSym(l.Aux)
2737 mem := l.Args[1]
2738 ptr := l.Args[0]
2739 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
2740 break
2741 }
2742 v.reset(Op386DIVSSload)
2743 v.AuxInt = int32ToAuxInt(off)
2744 v.Aux = symToAux(sym)
2745 v.AddArg3(x, ptr, mem)
2746 return true
2747 }
2748 return false
2749 }
2750 func rewriteValue386_Op386DIVSSload(v *Value) bool {
2751 v_2 := v.Args[2]
2752 v_1 := v.Args[1]
2753 v_0 := v.Args[0]
2754 b := v.Block
2755 config := b.Func.Config
2756
2757
2758
2759 for {
2760 off1 := auxIntToInt32(v.AuxInt)
2761 sym := auxToSym(v.Aux)
2762 val := v_0
2763 if v_1.Op != Op386ADDLconst {
2764 break
2765 }
2766 off2 := auxIntToInt32(v_1.AuxInt)
2767 base := v_1.Args[0]
2768 mem := v_2
2769 if !(is32Bit(int64(off1) + int64(off2))) {
2770 break
2771 }
2772 v.reset(Op386DIVSSload)
2773 v.AuxInt = int32ToAuxInt(off1 + off2)
2774 v.Aux = symToAux(sym)
2775 v.AddArg3(val, base, mem)
2776 return true
2777 }
2778
2779
2780
2781 for {
2782 off1 := auxIntToInt32(v.AuxInt)
2783 sym1 := auxToSym(v.Aux)
2784 val := v_0
2785 if v_1.Op != Op386LEAL {
2786 break
2787 }
2788 off2 := auxIntToInt32(v_1.AuxInt)
2789 sym2 := auxToSym(v_1.Aux)
2790 base := v_1.Args[0]
2791 mem := v_2
2792 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
2793 break
2794 }
2795 v.reset(Op386DIVSSload)
2796 v.AuxInt = int32ToAuxInt(off1 + off2)
2797 v.Aux = symToAux(mergeSym(sym1, sym2))
2798 v.AddArg3(val, base, mem)
2799 return true
2800 }
2801 return false
2802 }
2803 func rewriteValue386_Op386LEAL(v *Value) bool {
2804 v_0 := v.Args[0]
2805
2806
2807
2808 for {
2809 c := auxIntToInt32(v.AuxInt)
2810 s := auxToSym(v.Aux)
2811 if v_0.Op != Op386ADDLconst {
2812 break
2813 }
2814 d := auxIntToInt32(v_0.AuxInt)
2815 x := v_0.Args[0]
2816 if !(is32Bit(int64(c) + int64(d))) {
2817 break
2818 }
2819 v.reset(Op386LEAL)
2820 v.AuxInt = int32ToAuxInt(c + d)
2821 v.Aux = symToAux(s)
2822 v.AddArg(x)
2823 return true
2824 }
2825
2826
2827
2828 for {
2829 c := auxIntToInt32(v.AuxInt)
2830 s := auxToSym(v.Aux)
2831 if v_0.Op != Op386ADDL {
2832 break
2833 }
2834 _ = v_0.Args[1]
2835 v_0_0 := v_0.Args[0]
2836 v_0_1 := v_0.Args[1]
2837 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
2838 x := v_0_0
2839 y := v_0_1
2840 if !(x.Op != OpSB && y.Op != OpSB) {
2841 continue
2842 }
2843 v.reset(Op386LEAL1)
2844 v.AuxInt = int32ToAuxInt(c)
2845 v.Aux = symToAux(s)
2846 v.AddArg2(x, y)
2847 return true
2848 }
2849 break
2850 }
2851
2852
2853
2854 for {
2855 off1 := auxIntToInt32(v.AuxInt)
2856 sym1 := auxToSym(v.Aux)
2857 if v_0.Op != Op386LEAL {
2858 break
2859 }
2860 off2 := auxIntToInt32(v_0.AuxInt)
2861 sym2 := auxToSym(v_0.Aux)
2862 x := v_0.Args[0]
2863 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
2864 break
2865 }
2866 v.reset(Op386LEAL)
2867 v.AuxInt = int32ToAuxInt(off1 + off2)
2868 v.Aux = symToAux(mergeSym(sym1, sym2))
2869 v.AddArg(x)
2870 return true
2871 }
2872
2873
2874
2875 for {
2876 off1 := auxIntToInt32(v.AuxInt)
2877 sym1 := auxToSym(v.Aux)
2878 if v_0.Op != Op386LEAL1 {
2879 break
2880 }
2881 off2 := auxIntToInt32(v_0.AuxInt)
2882 sym2 := auxToSym(v_0.Aux)
2883 y := v_0.Args[1]
2884 x := v_0.Args[0]
2885 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
2886 break
2887 }
2888 v.reset(Op386LEAL1)
2889 v.AuxInt = int32ToAuxInt(off1 + off2)
2890 v.Aux = symToAux(mergeSym(sym1, sym2))
2891 v.AddArg2(x, y)
2892 return true
2893 }
2894
2895
2896
2897 for {
2898 off1 := auxIntToInt32(v.AuxInt)
2899 sym1 := auxToSym(v.Aux)
2900 if v_0.Op != Op386LEAL2 {
2901 break
2902 }
2903 off2 := auxIntToInt32(v_0.AuxInt)
2904 sym2 := auxToSym(v_0.Aux)
2905 y := v_0.Args[1]
2906 x := v_0.Args[0]
2907 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
2908 break
2909 }
2910 v.reset(Op386LEAL2)
2911 v.AuxInt = int32ToAuxInt(off1 + off2)
2912 v.Aux = symToAux(mergeSym(sym1, sym2))
2913 v.AddArg2(x, y)
2914 return true
2915 }
2916
2917
2918
2919 for {
2920 off1 := auxIntToInt32(v.AuxInt)
2921 sym1 := auxToSym(v.Aux)
2922 if v_0.Op != Op386LEAL4 {
2923 break
2924 }
2925 off2 := auxIntToInt32(v_0.AuxInt)
2926 sym2 := auxToSym(v_0.Aux)
2927 y := v_0.Args[1]
2928 x := v_0.Args[0]
2929 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
2930 break
2931 }
2932 v.reset(Op386LEAL4)
2933 v.AuxInt = int32ToAuxInt(off1 + off2)
2934 v.Aux = symToAux(mergeSym(sym1, sym2))
2935 v.AddArg2(x, y)
2936 return true
2937 }
2938
2939
2940
2941 for {
2942 off1 := auxIntToInt32(v.AuxInt)
2943 sym1 := auxToSym(v.Aux)
2944 if v_0.Op != Op386LEAL8 {
2945 break
2946 }
2947 off2 := auxIntToInt32(v_0.AuxInt)
2948 sym2 := auxToSym(v_0.Aux)
2949 y := v_0.Args[1]
2950 x := v_0.Args[0]
2951 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
2952 break
2953 }
2954 v.reset(Op386LEAL8)
2955 v.AuxInt = int32ToAuxInt(off1 + off2)
2956 v.Aux = symToAux(mergeSym(sym1, sym2))
2957 v.AddArg2(x, y)
2958 return true
2959 }
2960 return false
2961 }
2962 func rewriteValue386_Op386LEAL1(v *Value) bool {
2963 v_1 := v.Args[1]
2964 v_0 := v.Args[0]
2965
2966
2967
2968 for {
2969 c := auxIntToInt32(v.AuxInt)
2970 s := auxToSym(v.Aux)
2971 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2972 if v_0.Op != Op386ADDLconst {
2973 continue
2974 }
2975 d := auxIntToInt32(v_0.AuxInt)
2976 x := v_0.Args[0]
2977 y := v_1
2978 if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
2979 continue
2980 }
2981 v.reset(Op386LEAL1)
2982 v.AuxInt = int32ToAuxInt(c + d)
2983 v.Aux = symToAux(s)
2984 v.AddArg2(x, y)
2985 return true
2986 }
2987 break
2988 }
2989
2990
2991 for {
2992 c := auxIntToInt32(v.AuxInt)
2993 s := auxToSym(v.Aux)
2994 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2995 x := v_0
2996 if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
2997 continue
2998 }
2999 y := v_1.Args[0]
3000 v.reset(Op386LEAL2)
3001 v.AuxInt = int32ToAuxInt(c)
3002 v.Aux = symToAux(s)
3003 v.AddArg2(x, y)
3004 return true
3005 }
3006 break
3007 }
3008
3009
3010 for {
3011 c := auxIntToInt32(v.AuxInt)
3012 s := auxToSym(v.Aux)
3013 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3014 x := v_0
3015 if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
3016 continue
3017 }
3018 y := v_1.Args[0]
3019 v.reset(Op386LEAL4)
3020 v.AuxInt = int32ToAuxInt(c)
3021 v.Aux = symToAux(s)
3022 v.AddArg2(x, y)
3023 return true
3024 }
3025 break
3026 }
3027
3028
3029 for {
3030 c := auxIntToInt32(v.AuxInt)
3031 s := auxToSym(v.Aux)
3032 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3033 x := v_0
3034 if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 3 {
3035 continue
3036 }
3037 y := v_1.Args[0]
3038 v.reset(Op386LEAL8)
3039 v.AuxInt = int32ToAuxInt(c)
3040 v.Aux = symToAux(s)
3041 v.AddArg2(x, y)
3042 return true
3043 }
3044 break
3045 }
3046
3047
3048
3049 for {
3050 off1 := auxIntToInt32(v.AuxInt)
3051 sym1 := auxToSym(v.Aux)
3052 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3053 if v_0.Op != Op386LEAL {
3054 continue
3055 }
3056 off2 := auxIntToInt32(v_0.AuxInt)
3057 sym2 := auxToSym(v_0.Aux)
3058 x := v_0.Args[0]
3059 y := v_1
3060 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
3061 continue
3062 }
3063 v.reset(Op386LEAL1)
3064 v.AuxInt = int32ToAuxInt(off1 + off2)
3065 v.Aux = symToAux(mergeSym(sym1, sym2))
3066 v.AddArg2(x, y)
3067 return true
3068 }
3069 break
3070 }
3071
3072
3073
3074 for {
3075 off1 := auxIntToInt32(v.AuxInt)
3076 sym1 := auxToSym(v.Aux)
3077 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3078 x := v_0
3079 if v_1.Op != Op386LEAL1 {
3080 continue
3081 }
3082 off2 := auxIntToInt32(v_1.AuxInt)
3083 sym2 := auxToSym(v_1.Aux)
3084 y := v_1.Args[1]
3085 if y != v_1.Args[0] || !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
3086 continue
3087 }
3088 v.reset(Op386LEAL2)
3089 v.AuxInt = int32ToAuxInt(off1 + off2)
3090 v.Aux = symToAux(mergeSym(sym1, sym2))
3091 v.AddArg2(x, y)
3092 return true
3093 }
3094 break
3095 }
3096
3097
3098
3099 for {
3100 off1 := auxIntToInt32(v.AuxInt)
3101 sym1 := auxToSym(v.Aux)
3102 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3103 x := v_0
3104 if v_1.Op != Op386LEAL1 {
3105 continue
3106 }
3107 off2 := auxIntToInt32(v_1.AuxInt)
3108 sym2 := auxToSym(v_1.Aux)
3109 _ = v_1.Args[1]
3110 v_1_0 := v_1.Args[0]
3111 v_1_1 := v_1.Args[1]
3112 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3113 if x != v_1_0 {
3114 continue
3115 }
3116 y := v_1_1
3117 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
3118 continue
3119 }
3120 v.reset(Op386LEAL2)
3121 v.AuxInt = int32ToAuxInt(off1 + off2)
3122 v.Aux = symToAux(mergeSym(sym1, sym2))
3123 v.AddArg2(y, x)
3124 return true
3125 }
3126 }
3127 break
3128 }
3129
3130
3131 for {
3132 if auxIntToInt32(v.AuxInt) != 0 || auxToSym(v.Aux) != nil {
3133 break
3134 }
3135 x := v_0
3136 y := v_1
3137 v.reset(Op386ADDL)
3138 v.AddArg2(x, y)
3139 return true
3140 }
3141 return false
3142 }
3143 func rewriteValue386_Op386LEAL2(v *Value) bool {
3144 v_1 := v.Args[1]
3145 v_0 := v.Args[0]
3146
3147
3148
3149 for {
3150 c := auxIntToInt32(v.AuxInt)
3151 s := auxToSym(v.Aux)
3152 if v_0.Op != Op386ADDLconst {
3153 break
3154 }
3155 d := auxIntToInt32(v_0.AuxInt)
3156 x := v_0.Args[0]
3157 y := v_1
3158 if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
3159 break
3160 }
3161 v.reset(Op386LEAL2)
3162 v.AuxInt = int32ToAuxInt(c + d)
3163 v.Aux = symToAux(s)
3164 v.AddArg2(x, y)
3165 return true
3166 }
3167
3168
3169
3170 for {
3171 c := auxIntToInt32(v.AuxInt)
3172 s := auxToSym(v.Aux)
3173 x := v_0
3174 if v_1.Op != Op386ADDLconst {
3175 break
3176 }
3177 d := auxIntToInt32(v_1.AuxInt)
3178 y := v_1.Args[0]
3179 if !(is32Bit(int64(c)+2*int64(d)) && y.Op != OpSB) {
3180 break
3181 }
3182 v.reset(Op386LEAL2)
3183 v.AuxInt = int32ToAuxInt(c + 2*d)
3184 v.Aux = symToAux(s)
3185 v.AddArg2(x, y)
3186 return true
3187 }
3188
3189
3190 for {
3191 c := auxIntToInt32(v.AuxInt)
3192 s := auxToSym(v.Aux)
3193 x := v_0
3194 if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
3195 break
3196 }
3197 y := v_1.Args[0]
3198 v.reset(Op386LEAL4)
3199 v.AuxInt = int32ToAuxInt(c)
3200 v.Aux = symToAux(s)
3201 v.AddArg2(x, y)
3202 return true
3203 }
3204
3205
3206 for {
3207 c := auxIntToInt32(v.AuxInt)
3208 s := auxToSym(v.Aux)
3209 x := v_0
3210 if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
3211 break
3212 }
3213 y := v_1.Args[0]
3214 v.reset(Op386LEAL8)
3215 v.AuxInt = int32ToAuxInt(c)
3216 v.Aux = symToAux(s)
3217 v.AddArg2(x, y)
3218 return true
3219 }
3220
3221
3222
3223 for {
3224 off1 := auxIntToInt32(v.AuxInt)
3225 sym1 := auxToSym(v.Aux)
3226 if v_0.Op != Op386LEAL {
3227 break
3228 }
3229 off2 := auxIntToInt32(v_0.AuxInt)
3230 sym2 := auxToSym(v_0.Aux)
3231 x := v_0.Args[0]
3232 y := v_1
3233 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
3234 break
3235 }
3236 v.reset(Op386LEAL2)
3237 v.AuxInt = int32ToAuxInt(off1 + off2)
3238 v.Aux = symToAux(mergeSym(sym1, sym2))
3239 v.AddArg2(x, y)
3240 return true
3241 }
3242
3243
3244
3245 for {
3246 off1 := auxIntToInt32(v.AuxInt)
3247 sym := auxToSym(v.Aux)
3248 x := v_0
3249 if v_1.Op != Op386LEAL1 {
3250 break
3251 }
3252 off2 := auxIntToInt32(v_1.AuxInt)
3253 if auxToSym(v_1.Aux) != nil {
3254 break
3255 }
3256 y := v_1.Args[1]
3257 if y != v_1.Args[0] || !(is32Bit(int64(off1) + 2*int64(off2))) {
3258 break
3259 }
3260 v.reset(Op386LEAL4)
3261 v.AuxInt = int32ToAuxInt(off1 + 2*off2)
3262 v.Aux = symToAux(sym)
3263 v.AddArg2(x, y)
3264 return true
3265 }
3266 return false
3267 }
3268 func rewriteValue386_Op386LEAL4(v *Value) bool {
3269 v_1 := v.Args[1]
3270 v_0 := v.Args[0]
3271
3272
3273
3274 for {
3275 c := auxIntToInt32(v.AuxInt)
3276 s := auxToSym(v.Aux)
3277 if v_0.Op != Op386ADDLconst {
3278 break
3279 }
3280 d := auxIntToInt32(v_0.AuxInt)
3281 x := v_0.Args[0]
3282 y := v_1
3283 if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
3284 break
3285 }
3286 v.reset(Op386LEAL4)
3287 v.AuxInt = int32ToAuxInt(c + d)
3288 v.Aux = symToAux(s)
3289 v.AddArg2(x, y)
3290 return true
3291 }
3292
3293
3294
3295 for {
3296 c := auxIntToInt32(v.AuxInt)
3297 s := auxToSym(v.Aux)
3298 x := v_0
3299 if v_1.Op != Op386ADDLconst {
3300 break
3301 }
3302 d := auxIntToInt32(v_1.AuxInt)
3303 y := v_1.Args[0]
3304 if !(is32Bit(int64(c)+4*int64(d)) && y.Op != OpSB) {
3305 break
3306 }
3307 v.reset(Op386LEAL4)
3308 v.AuxInt = int32ToAuxInt(c + 4*d)
3309 v.Aux = symToAux(s)
3310 v.AddArg2(x, y)
3311 return true
3312 }
3313
3314
3315 for {
3316 c := auxIntToInt32(v.AuxInt)
3317 s := auxToSym(v.Aux)
3318 x := v_0
3319 if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
3320 break
3321 }
3322 y := v_1.Args[0]
3323 v.reset(Op386LEAL8)
3324 v.AuxInt = int32ToAuxInt(c)
3325 v.Aux = symToAux(s)
3326 v.AddArg2(x, y)
3327 return true
3328 }
3329
3330
3331
3332 for {
3333 off1 := auxIntToInt32(v.AuxInt)
3334 sym1 := auxToSym(v.Aux)
3335 if v_0.Op != Op386LEAL {
3336 break
3337 }
3338 off2 := auxIntToInt32(v_0.AuxInt)
3339 sym2 := auxToSym(v_0.Aux)
3340 x := v_0.Args[0]
3341 y := v_1
3342 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
3343 break
3344 }
3345 v.reset(Op386LEAL4)
3346 v.AuxInt = int32ToAuxInt(off1 + off2)
3347 v.Aux = symToAux(mergeSym(sym1, sym2))
3348 v.AddArg2(x, y)
3349 return true
3350 }
3351
3352
3353
3354 for {
3355 off1 := auxIntToInt32(v.AuxInt)
3356 sym := auxToSym(v.Aux)
3357 x := v_0
3358 if v_1.Op != Op386LEAL1 {
3359 break
3360 }
3361 off2 := auxIntToInt32(v_1.AuxInt)
3362 if auxToSym(v_1.Aux) != nil {
3363 break
3364 }
3365 y := v_1.Args[1]
3366 if y != v_1.Args[0] || !(is32Bit(int64(off1) + 4*int64(off2))) {
3367 break
3368 }
3369 v.reset(Op386LEAL8)
3370 v.AuxInt = int32ToAuxInt(off1 + 4*off2)
3371 v.Aux = symToAux(sym)
3372 v.AddArg2(x, y)
3373 return true
3374 }
3375 return false
3376 }
3377 func rewriteValue386_Op386LEAL8(v *Value) bool {
3378 v_1 := v.Args[1]
3379 v_0 := v.Args[0]
3380
3381
3382
3383 for {
3384 c := auxIntToInt32(v.AuxInt)
3385 s := auxToSym(v.Aux)
3386 if v_0.Op != Op386ADDLconst {
3387 break
3388 }
3389 d := auxIntToInt32(v_0.AuxInt)
3390 x := v_0.Args[0]
3391 y := v_1
3392 if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
3393 break
3394 }
3395 v.reset(Op386LEAL8)
3396 v.AuxInt = int32ToAuxInt(c + d)
3397 v.Aux = symToAux(s)
3398 v.AddArg2(x, y)
3399 return true
3400 }
3401
3402
3403
3404 for {
3405 c := auxIntToInt32(v.AuxInt)
3406 s := auxToSym(v.Aux)
3407 x := v_0
3408 if v_1.Op != Op386ADDLconst {
3409 break
3410 }
3411 d := auxIntToInt32(v_1.AuxInt)
3412 y := v_1.Args[0]
3413 if !(is32Bit(int64(c)+8*int64(d)) && y.Op != OpSB) {
3414 break
3415 }
3416 v.reset(Op386LEAL8)
3417 v.AuxInt = int32ToAuxInt(c + 8*d)
3418 v.Aux = symToAux(s)
3419 v.AddArg2(x, y)
3420 return true
3421 }
3422
3423
3424
3425 for {
3426 off1 := auxIntToInt32(v.AuxInt)
3427 sym1 := auxToSym(v.Aux)
3428 if v_0.Op != Op386LEAL {
3429 break
3430 }
3431 off2 := auxIntToInt32(v_0.AuxInt)
3432 sym2 := auxToSym(v_0.Aux)
3433 x := v_0.Args[0]
3434 y := v_1
3435 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
3436 break
3437 }
3438 v.reset(Op386LEAL8)
3439 v.AuxInt = int32ToAuxInt(off1 + off2)
3440 v.Aux = symToAux(mergeSym(sym1, sym2))
3441 v.AddArg2(x, y)
3442 return true
3443 }
3444 return false
3445 }
3446 func rewriteValue386_Op386MOVBLSX(v *Value) bool {
3447 v_0 := v.Args[0]
3448 b := v.Block
3449
3450
3451
3452 for {
3453 x := v_0
3454 if x.Op != Op386MOVBload {
3455 break
3456 }
3457 off := auxIntToInt32(x.AuxInt)
3458 sym := auxToSym(x.Aux)
3459 mem := x.Args[1]
3460 ptr := x.Args[0]
3461 if !(x.Uses == 1 && clobber(x)) {
3462 break
3463 }
3464 b = x.Block
3465 v0 := b.NewValue0(x.Pos, Op386MOVBLSXload, v.Type)
3466 v.copyOf(v0)
3467 v0.AuxInt = int32ToAuxInt(off)
3468 v0.Aux = symToAux(sym)
3469 v0.AddArg2(ptr, mem)
3470 return true
3471 }
3472
3473
3474
3475 for {
3476 if v_0.Op != Op386ANDLconst {
3477 break
3478 }
3479 c := auxIntToInt32(v_0.AuxInt)
3480 x := v_0.Args[0]
3481 if !(c&0x80 == 0) {
3482 break
3483 }
3484 v.reset(Op386ANDLconst)
3485 v.AuxInt = int32ToAuxInt(c & 0x7f)
3486 v.AddArg(x)
3487 return true
3488 }
3489 return false
3490 }
3491 func rewriteValue386_Op386MOVBLSXload(v *Value) bool {
3492 v_1 := v.Args[1]
3493 v_0 := v.Args[0]
3494 b := v.Block
3495 config := b.Func.Config
3496
3497
3498
3499 for {
3500 off := auxIntToInt32(v.AuxInt)
3501 sym := auxToSym(v.Aux)
3502 ptr := v_0
3503 if v_1.Op != Op386MOVBstore {
3504 break
3505 }
3506 off2 := auxIntToInt32(v_1.AuxInt)
3507 sym2 := auxToSym(v_1.Aux)
3508 x := v_1.Args[1]
3509 ptr2 := v_1.Args[0]
3510 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
3511 break
3512 }
3513 v.reset(Op386MOVBLSX)
3514 v.AddArg(x)
3515 return true
3516 }
3517
3518
3519
3520 for {
3521 off1 := auxIntToInt32(v.AuxInt)
3522 sym1 := auxToSym(v.Aux)
3523 if v_0.Op != Op386LEAL {
3524 break
3525 }
3526 off2 := auxIntToInt32(v_0.AuxInt)
3527 sym2 := auxToSym(v_0.Aux)
3528 base := v_0.Args[0]
3529 mem := v_1
3530 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
3531 break
3532 }
3533 v.reset(Op386MOVBLSXload)
3534 v.AuxInt = int32ToAuxInt(off1 + off2)
3535 v.Aux = symToAux(mergeSym(sym1, sym2))
3536 v.AddArg2(base, mem)
3537 return true
3538 }
3539 return false
3540 }
3541 func rewriteValue386_Op386MOVBLZX(v *Value) bool {
3542 v_0 := v.Args[0]
3543 b := v.Block
3544
3545
3546
3547 for {
3548 x := v_0
3549 if x.Op != Op386MOVBload {
3550 break
3551 }
3552 off := auxIntToInt32(x.AuxInt)
3553 sym := auxToSym(x.Aux)
3554 mem := x.Args[1]
3555 ptr := x.Args[0]
3556 if !(x.Uses == 1 && clobber(x)) {
3557 break
3558 }
3559 b = x.Block
3560 v0 := b.NewValue0(x.Pos, Op386MOVBload, v.Type)
3561 v.copyOf(v0)
3562 v0.AuxInt = int32ToAuxInt(off)
3563 v0.Aux = symToAux(sym)
3564 v0.AddArg2(ptr, mem)
3565 return true
3566 }
3567
3568
3569 for {
3570 if v_0.Op != Op386ANDLconst {
3571 break
3572 }
3573 c := auxIntToInt32(v_0.AuxInt)
3574 x := v_0.Args[0]
3575 v.reset(Op386ANDLconst)
3576 v.AuxInt = int32ToAuxInt(c & 0xff)
3577 v.AddArg(x)
3578 return true
3579 }
3580 return false
3581 }
3582 func rewriteValue386_Op386MOVBload(v *Value) bool {
3583 v_1 := v.Args[1]
3584 v_0 := v.Args[0]
3585 b := v.Block
3586 config := b.Func.Config
3587
3588
3589
3590 for {
3591 off := auxIntToInt32(v.AuxInt)
3592 sym := auxToSym(v.Aux)
3593 ptr := v_0
3594 if v_1.Op != Op386MOVBstore {
3595 break
3596 }
3597 off2 := auxIntToInt32(v_1.AuxInt)
3598 sym2 := auxToSym(v_1.Aux)
3599 x := v_1.Args[1]
3600 ptr2 := v_1.Args[0]
3601 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
3602 break
3603 }
3604 v.reset(Op386MOVBLZX)
3605 v.AddArg(x)
3606 return true
3607 }
3608
3609
3610
3611 for {
3612 off1 := auxIntToInt32(v.AuxInt)
3613 sym := auxToSym(v.Aux)
3614 if v_0.Op != Op386ADDLconst {
3615 break
3616 }
3617 off2 := auxIntToInt32(v_0.AuxInt)
3618 ptr := v_0.Args[0]
3619 mem := v_1
3620 if !(is32Bit(int64(off1) + int64(off2))) {
3621 break
3622 }
3623 v.reset(Op386MOVBload)
3624 v.AuxInt = int32ToAuxInt(off1 + off2)
3625 v.Aux = symToAux(sym)
3626 v.AddArg2(ptr, mem)
3627 return true
3628 }
3629
3630
3631
3632 for {
3633 off1 := auxIntToInt32(v.AuxInt)
3634 sym1 := auxToSym(v.Aux)
3635 if v_0.Op != Op386LEAL {
3636 break
3637 }
3638 off2 := auxIntToInt32(v_0.AuxInt)
3639 sym2 := auxToSym(v_0.Aux)
3640 base := v_0.Args[0]
3641 mem := v_1
3642 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
3643 break
3644 }
3645 v.reset(Op386MOVBload)
3646 v.AuxInt = int32ToAuxInt(off1 + off2)
3647 v.Aux = symToAux(mergeSym(sym1, sym2))
3648 v.AddArg2(base, mem)
3649 return true
3650 }
3651
3652
3653
3654 for {
3655 off := auxIntToInt32(v.AuxInt)
3656 sym := auxToSym(v.Aux)
3657 if v_0.Op != OpSB || !(symIsRO(sym)) {
3658 break
3659 }
3660 v.reset(Op386MOVLconst)
3661 v.AuxInt = int32ToAuxInt(int32(read8(sym, int64(off))))
3662 return true
3663 }
3664 return false
3665 }
3666 func rewriteValue386_Op386MOVBstore(v *Value) bool {
3667 v_2 := v.Args[2]
3668 v_1 := v.Args[1]
3669 v_0 := v.Args[0]
3670 b := v.Block
3671 config := b.Func.Config
3672
3673
3674 for {
3675 off := auxIntToInt32(v.AuxInt)
3676 sym := auxToSym(v.Aux)
3677 ptr := v_0
3678 if v_1.Op != Op386MOVBLSX {
3679 break
3680 }
3681 x := v_1.Args[0]
3682 mem := v_2
3683 v.reset(Op386MOVBstore)
3684 v.AuxInt = int32ToAuxInt(off)
3685 v.Aux = symToAux(sym)
3686 v.AddArg3(ptr, x, mem)
3687 return true
3688 }
3689
3690
3691 for {
3692 off := auxIntToInt32(v.AuxInt)
3693 sym := auxToSym(v.Aux)
3694 ptr := v_0
3695 if v_1.Op != Op386MOVBLZX {
3696 break
3697 }
3698 x := v_1.Args[0]
3699 mem := v_2
3700 v.reset(Op386MOVBstore)
3701 v.AuxInt = int32ToAuxInt(off)
3702 v.Aux = symToAux(sym)
3703 v.AddArg3(ptr, x, mem)
3704 return true
3705 }
3706
3707
3708
3709 for {
3710 off1 := auxIntToInt32(v.AuxInt)
3711 sym := auxToSym(v.Aux)
3712 if v_0.Op != Op386ADDLconst {
3713 break
3714 }
3715 off2 := auxIntToInt32(v_0.AuxInt)
3716 ptr := v_0.Args[0]
3717 val := v_1
3718 mem := v_2
3719 if !(is32Bit(int64(off1) + int64(off2))) {
3720 break
3721 }
3722 v.reset(Op386MOVBstore)
3723 v.AuxInt = int32ToAuxInt(off1 + off2)
3724 v.Aux = symToAux(sym)
3725 v.AddArg3(ptr, val, mem)
3726 return true
3727 }
3728
3729
3730 for {
3731 off := auxIntToInt32(v.AuxInt)
3732 sym := auxToSym(v.Aux)
3733 ptr := v_0
3734 if v_1.Op != Op386MOVLconst {
3735 break
3736 }
3737 c := auxIntToInt32(v_1.AuxInt)
3738 mem := v_2
3739 v.reset(Op386MOVBstoreconst)
3740 v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
3741 v.Aux = symToAux(sym)
3742 v.AddArg2(ptr, mem)
3743 return true
3744 }
3745
3746
3747
3748 for {
3749 off1 := auxIntToInt32(v.AuxInt)
3750 sym1 := auxToSym(v.Aux)
3751 if v_0.Op != Op386LEAL {
3752 break
3753 }
3754 off2 := auxIntToInt32(v_0.AuxInt)
3755 sym2 := auxToSym(v_0.Aux)
3756 base := v_0.Args[0]
3757 val := v_1
3758 mem := v_2
3759 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
3760 break
3761 }
3762 v.reset(Op386MOVBstore)
3763 v.AuxInt = int32ToAuxInt(off1 + off2)
3764 v.Aux = symToAux(mergeSym(sym1, sym2))
3765 v.AddArg3(base, val, mem)
3766 return true
3767 }
3768
3769
3770
3771 for {
3772 i := auxIntToInt32(v.AuxInt)
3773 s := auxToSym(v.Aux)
3774 p := v_0
3775 if v_1.Op != Op386SHRWconst || auxIntToInt16(v_1.AuxInt) != 8 {
3776 break
3777 }
3778 w := v_1.Args[0]
3779 x := v_2
3780 if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
3781 break
3782 }
3783 mem := x.Args[2]
3784 if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
3785 break
3786 }
3787 v.reset(Op386MOVWstore)
3788 v.AuxInt = int32ToAuxInt(i - 1)
3789 v.Aux = symToAux(s)
3790 v.AddArg3(p, w, mem)
3791 return true
3792 }
3793
3794
3795
3796 for {
3797 i := auxIntToInt32(v.AuxInt)
3798 s := auxToSym(v.Aux)
3799 p := v_0
3800 if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 8 {
3801 break
3802 }
3803 w := v_1.Args[0]
3804 x := v_2
3805 if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
3806 break
3807 }
3808 mem := x.Args[2]
3809 if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
3810 break
3811 }
3812 v.reset(Op386MOVWstore)
3813 v.AuxInt = int32ToAuxInt(i - 1)
3814 v.Aux = symToAux(s)
3815 v.AddArg3(p, w, mem)
3816 return true
3817 }
3818
3819
3820
3821 for {
3822 i := auxIntToInt32(v.AuxInt)
3823 s := auxToSym(v.Aux)
3824 p := v_0
3825 w := v_1
3826 x := v_2
3827 if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i+1 || auxToSym(x.Aux) != s {
3828 break
3829 }
3830 mem := x.Args[2]
3831 if p != x.Args[0] {
3832 break
3833 }
3834 x_1 := x.Args[1]
3835 if x_1.Op != Op386SHRWconst || auxIntToInt16(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && clobber(x)) {
3836 break
3837 }
3838 v.reset(Op386MOVWstore)
3839 v.AuxInt = int32ToAuxInt(i)
3840 v.Aux = symToAux(s)
3841 v.AddArg3(p, w, mem)
3842 return true
3843 }
3844
3845
3846
3847 for {
3848 i := auxIntToInt32(v.AuxInt)
3849 s := auxToSym(v.Aux)
3850 p := v_0
3851 w := v_1
3852 x := v_2
3853 if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i+1 || auxToSym(x.Aux) != s {
3854 break
3855 }
3856 mem := x.Args[2]
3857 if p != x.Args[0] {
3858 break
3859 }
3860 x_1 := x.Args[1]
3861 if x_1.Op != Op386SHRLconst || auxIntToInt32(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && clobber(x)) {
3862 break
3863 }
3864 v.reset(Op386MOVWstore)
3865 v.AuxInt = int32ToAuxInt(i)
3866 v.Aux = symToAux(s)
3867 v.AddArg3(p, w, mem)
3868 return true
3869 }
3870
3871
3872
3873 for {
3874 i := auxIntToInt32(v.AuxInt)
3875 s := auxToSym(v.Aux)
3876 p := v_0
3877 if v_1.Op != Op386SHRLconst {
3878 break
3879 }
3880 j := auxIntToInt32(v_1.AuxInt)
3881 w := v_1.Args[0]
3882 x := v_2
3883 if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
3884 break
3885 }
3886 mem := x.Args[2]
3887 if p != x.Args[0] {
3888 break
3889 }
3890 w0 := x.Args[1]
3891 if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-8 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
3892 break
3893 }
3894 v.reset(Op386MOVWstore)
3895 v.AuxInt = int32ToAuxInt(i - 1)
3896 v.Aux = symToAux(s)
3897 v.AddArg3(p, w0, mem)
3898 return true
3899 }
3900
3901
3902
3903 for {
3904 i := auxIntToInt32(v.AuxInt)
3905 s := auxToSym(v.Aux)
3906 p1 := v_0
3907 if v_1.Op != Op386SHRWconst || auxIntToInt16(v_1.AuxInt) != 8 {
3908 break
3909 }
3910 w := v_1.Args[0]
3911 x := v_2
3912 if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
3913 break
3914 }
3915 mem := x.Args[2]
3916 p0 := x.Args[0]
3917 if w != x.Args[1] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
3918 break
3919 }
3920 v.reset(Op386MOVWstore)
3921 v.AuxInt = int32ToAuxInt(i)
3922 v.Aux = symToAux(s)
3923 v.AddArg3(p0, w, mem)
3924 return true
3925 }
3926
3927
3928
3929 for {
3930 i := auxIntToInt32(v.AuxInt)
3931 s := auxToSym(v.Aux)
3932 p1 := v_0
3933 if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 8 {
3934 break
3935 }
3936 w := v_1.Args[0]
3937 x := v_2
3938 if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
3939 break
3940 }
3941 mem := x.Args[2]
3942 p0 := x.Args[0]
3943 if w != x.Args[1] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
3944 break
3945 }
3946 v.reset(Op386MOVWstore)
3947 v.AuxInt = int32ToAuxInt(i)
3948 v.Aux = symToAux(s)
3949 v.AddArg3(p0, w, mem)
3950 return true
3951 }
3952
3953
3954
3955 for {
3956 i := auxIntToInt32(v.AuxInt)
3957 s := auxToSym(v.Aux)
3958 p0 := v_0
3959 w := v_1
3960 x := v_2
3961 if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
3962 break
3963 }
3964 mem := x.Args[2]
3965 p1 := x.Args[0]
3966 x_1 := x.Args[1]
3967 if x_1.Op != Op386SHRWconst || auxIntToInt16(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
3968 break
3969 }
3970 v.reset(Op386MOVWstore)
3971 v.AuxInt = int32ToAuxInt(i)
3972 v.Aux = symToAux(s)
3973 v.AddArg3(p0, w, mem)
3974 return true
3975 }
3976
3977
3978
3979 for {
3980 i := auxIntToInt32(v.AuxInt)
3981 s := auxToSym(v.Aux)
3982 p0 := v_0
3983 w := v_1
3984 x := v_2
3985 if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
3986 break
3987 }
3988 mem := x.Args[2]
3989 p1 := x.Args[0]
3990 x_1 := x.Args[1]
3991 if x_1.Op != Op386SHRLconst || auxIntToInt32(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
3992 break
3993 }
3994 v.reset(Op386MOVWstore)
3995 v.AuxInt = int32ToAuxInt(i)
3996 v.Aux = symToAux(s)
3997 v.AddArg3(p0, w, mem)
3998 return true
3999 }
4000
4001
4002
4003 for {
4004 i := auxIntToInt32(v.AuxInt)
4005 s := auxToSym(v.Aux)
4006 p1 := v_0
4007 if v_1.Op != Op386SHRLconst {
4008 break
4009 }
4010 j := auxIntToInt32(v_1.AuxInt)
4011 w := v_1.Args[0]
4012 x := v_2
4013 if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
4014 break
4015 }
4016 mem := x.Args[2]
4017 p0 := x.Args[0]
4018 w0 := x.Args[1]
4019 if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-8 || w != w0.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
4020 break
4021 }
4022 v.reset(Op386MOVWstore)
4023 v.AuxInt = int32ToAuxInt(i)
4024 v.Aux = symToAux(s)
4025 v.AddArg3(p0, w0, mem)
4026 return true
4027 }
4028 return false
4029 }
4030 func rewriteValue386_Op386MOVBstoreconst(v *Value) bool {
4031 v_1 := v.Args[1]
4032 v_0 := v.Args[0]
4033 b := v.Block
4034 config := b.Func.Config
4035
4036
4037
4038 for {
4039 sc := auxIntToValAndOff(v.AuxInt)
4040 s := auxToSym(v.Aux)
4041 if v_0.Op != Op386ADDLconst {
4042 break
4043 }
4044 off := auxIntToInt32(v_0.AuxInt)
4045 ptr := v_0.Args[0]
4046 mem := v_1
4047 if !(sc.canAdd32(off)) {
4048 break
4049 }
4050 v.reset(Op386MOVBstoreconst)
4051 v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
4052 v.Aux = symToAux(s)
4053 v.AddArg2(ptr, mem)
4054 return true
4055 }
4056
4057
4058
4059 for {
4060 sc := auxIntToValAndOff(v.AuxInt)
4061 sym1 := auxToSym(v.Aux)
4062 if v_0.Op != Op386LEAL {
4063 break
4064 }
4065 off := auxIntToInt32(v_0.AuxInt)
4066 sym2 := auxToSym(v_0.Aux)
4067 ptr := v_0.Args[0]
4068 mem := v_1
4069 if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
4070 break
4071 }
4072 v.reset(Op386MOVBstoreconst)
4073 v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
4074 v.Aux = symToAux(mergeSym(sym1, sym2))
4075 v.AddArg2(ptr, mem)
4076 return true
4077 }
4078
4079
4080
4081 for {
4082 c := auxIntToValAndOff(v.AuxInt)
4083 s := auxToSym(v.Aux)
4084 p := v_0
4085 x := v_1
4086 if x.Op != Op386MOVBstoreconst {
4087 break
4088 }
4089 a := auxIntToValAndOff(x.AuxInt)
4090 if auxToSym(x.Aux) != s {
4091 break
4092 }
4093 mem := x.Args[1]
4094 if p != x.Args[0] || !(x.Uses == 1 && a.Off()+1 == c.Off() && clobber(x)) {
4095 break
4096 }
4097 v.reset(Op386MOVWstoreconst)
4098 v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xff|c.Val()<<8, a.Off()))
4099 v.Aux = symToAux(s)
4100 v.AddArg2(p, mem)
4101 return true
4102 }
4103
4104
4105
4106 for {
4107 a := auxIntToValAndOff(v.AuxInt)
4108 s := auxToSym(v.Aux)
4109 p := v_0
4110 x := v_1
4111 if x.Op != Op386MOVBstoreconst {
4112 break
4113 }
4114 c := auxIntToValAndOff(x.AuxInt)
4115 if auxToSym(x.Aux) != s {
4116 break
4117 }
4118 mem := x.Args[1]
4119 if p != x.Args[0] || !(x.Uses == 1 && a.Off()+1 == c.Off() && clobber(x)) {
4120 break
4121 }
4122 v.reset(Op386MOVWstoreconst)
4123 v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xff|c.Val()<<8, a.Off()))
4124 v.Aux = symToAux(s)
4125 v.AddArg2(p, mem)
4126 return true
4127 }
4128
4129
4130
4131 for {
4132 c := auxIntToValAndOff(v.AuxInt)
4133 s := auxToSym(v.Aux)
4134 p1 := v_0
4135 x := v_1
4136 if x.Op != Op386MOVBstoreconst {
4137 break
4138 }
4139 a := auxIntToValAndOff(x.AuxInt)
4140 if auxToSym(x.Aux) != s {
4141 break
4142 }
4143 mem := x.Args[1]
4144 p0 := x.Args[0]
4145 if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 1) && clobber(x)) {
4146 break
4147 }
4148 v.reset(Op386MOVWstoreconst)
4149 v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xff|c.Val()<<8, a.Off()))
4150 v.Aux = symToAux(s)
4151 v.AddArg2(p0, mem)
4152 return true
4153 }
4154
4155
4156
4157 for {
4158 a := auxIntToValAndOff(v.AuxInt)
4159 s := auxToSym(v.Aux)
4160 p0 := v_0
4161 x := v_1
4162 if x.Op != Op386MOVBstoreconst {
4163 break
4164 }
4165 c := auxIntToValAndOff(x.AuxInt)
4166 if auxToSym(x.Aux) != s {
4167 break
4168 }
4169 mem := x.Args[1]
4170 p1 := x.Args[0]
4171 if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 1) && clobber(x)) {
4172 break
4173 }
4174 v.reset(Op386MOVWstoreconst)
4175 v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xff|c.Val()<<8, a.Off()))
4176 v.Aux = symToAux(s)
4177 v.AddArg2(p0, mem)
4178 return true
4179 }
4180 return false
4181 }
4182 func rewriteValue386_Op386MOVLload(v *Value) bool {
4183 v_1 := v.Args[1]
4184 v_0 := v.Args[0]
4185 b := v.Block
4186 config := b.Func.Config
4187
4188
4189
4190 for {
4191 off := auxIntToInt32(v.AuxInt)
4192 sym := auxToSym(v.Aux)
4193 ptr := v_0
4194 if v_1.Op != Op386MOVLstore {
4195 break
4196 }
4197 off2 := auxIntToInt32(v_1.AuxInt)
4198 sym2 := auxToSym(v_1.Aux)
4199 x := v_1.Args[1]
4200 ptr2 := v_1.Args[0]
4201 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
4202 break
4203 }
4204 v.copyOf(x)
4205 return true
4206 }
4207
4208
4209
4210 for {
4211 off1 := auxIntToInt32(v.AuxInt)
4212 sym := auxToSym(v.Aux)
4213 if v_0.Op != Op386ADDLconst {
4214 break
4215 }
4216 off2 := auxIntToInt32(v_0.AuxInt)
4217 ptr := v_0.Args[0]
4218 mem := v_1
4219 if !(is32Bit(int64(off1) + int64(off2))) {
4220 break
4221 }
4222 v.reset(Op386MOVLload)
4223 v.AuxInt = int32ToAuxInt(off1 + off2)
4224 v.Aux = symToAux(sym)
4225 v.AddArg2(ptr, mem)
4226 return true
4227 }
4228
4229
4230
4231 for {
4232 off1 := auxIntToInt32(v.AuxInt)
4233 sym1 := auxToSym(v.Aux)
4234 if v_0.Op != Op386LEAL {
4235 break
4236 }
4237 off2 := auxIntToInt32(v_0.AuxInt)
4238 sym2 := auxToSym(v_0.Aux)
4239 base := v_0.Args[0]
4240 mem := v_1
4241 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
4242 break
4243 }
4244 v.reset(Op386MOVLload)
4245 v.AuxInt = int32ToAuxInt(off1 + off2)
4246 v.Aux = symToAux(mergeSym(sym1, sym2))
4247 v.AddArg2(base, mem)
4248 return true
4249 }
4250
4251
4252
4253 for {
4254 off := auxIntToInt32(v.AuxInt)
4255 sym := auxToSym(v.Aux)
4256 if v_0.Op != OpSB || !(symIsRO(sym)) {
4257 break
4258 }
4259 v.reset(Op386MOVLconst)
4260 v.AuxInt = int32ToAuxInt(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
4261 return true
4262 }
4263 return false
4264 }
4265 func rewriteValue386_Op386MOVLstore(v *Value) bool {
4266 v_2 := v.Args[2]
4267 v_1 := v.Args[1]
4268 v_0 := v.Args[0]
4269 b := v.Block
4270 config := b.Func.Config
4271
4272
4273
4274 for {
4275 off1 := auxIntToInt32(v.AuxInt)
4276 sym := auxToSym(v.Aux)
4277 if v_0.Op != Op386ADDLconst {
4278 break
4279 }
4280 off2 := auxIntToInt32(v_0.AuxInt)
4281 ptr := v_0.Args[0]
4282 val := v_1
4283 mem := v_2
4284 if !(is32Bit(int64(off1) + int64(off2))) {
4285 break
4286 }
4287 v.reset(Op386MOVLstore)
4288 v.AuxInt = int32ToAuxInt(off1 + off2)
4289 v.Aux = symToAux(sym)
4290 v.AddArg3(ptr, val, mem)
4291 return true
4292 }
4293
4294
4295 for {
4296 off := auxIntToInt32(v.AuxInt)
4297 sym := auxToSym(v.Aux)
4298 ptr := v_0
4299 if v_1.Op != Op386MOVLconst {
4300 break
4301 }
4302 c := auxIntToInt32(v_1.AuxInt)
4303 mem := v_2
4304 v.reset(Op386MOVLstoreconst)
4305 v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
4306 v.Aux = symToAux(sym)
4307 v.AddArg2(ptr, mem)
4308 return true
4309 }
4310
4311
4312
4313 for {
4314 off1 := auxIntToInt32(v.AuxInt)
4315 sym1 := auxToSym(v.Aux)
4316 if v_0.Op != Op386LEAL {
4317 break
4318 }
4319 off2 := auxIntToInt32(v_0.AuxInt)
4320 sym2 := auxToSym(v_0.Aux)
4321 base := v_0.Args[0]
4322 val := v_1
4323 mem := v_2
4324 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
4325 break
4326 }
4327 v.reset(Op386MOVLstore)
4328 v.AuxInt = int32ToAuxInt(off1 + off2)
4329 v.Aux = symToAux(mergeSym(sym1, sym2))
4330 v.AddArg3(base, val, mem)
4331 return true
4332 }
4333
4334
4335
4336 for {
4337 off := auxIntToInt32(v.AuxInt)
4338 sym := auxToSym(v.Aux)
4339 ptr := v_0
4340 y := v_1
4341 if y.Op != Op386ADDLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
4342 break
4343 }
4344 mem := y.Args[2]
4345 x := y.Args[0]
4346 if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
4347 break
4348 }
4349 v.reset(Op386ADDLmodify)
4350 v.AuxInt = int32ToAuxInt(off)
4351 v.Aux = symToAux(sym)
4352 v.AddArg3(ptr, x, mem)
4353 return true
4354 }
4355
4356
4357
4358 for {
4359 off := auxIntToInt32(v.AuxInt)
4360 sym := auxToSym(v.Aux)
4361 ptr := v_0
4362 y := v_1
4363 if y.Op != Op386ANDLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
4364 break
4365 }
4366 mem := y.Args[2]
4367 x := y.Args[0]
4368 if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
4369 break
4370 }
4371 v.reset(Op386ANDLmodify)
4372 v.AuxInt = int32ToAuxInt(off)
4373 v.Aux = symToAux(sym)
4374 v.AddArg3(ptr, x, mem)
4375 return true
4376 }
4377
4378
4379
4380 for {
4381 off := auxIntToInt32(v.AuxInt)
4382 sym := auxToSym(v.Aux)
4383 ptr := v_0
4384 y := v_1
4385 if y.Op != Op386ORLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
4386 break
4387 }
4388 mem := y.Args[2]
4389 x := y.Args[0]
4390 if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
4391 break
4392 }
4393 v.reset(Op386ORLmodify)
4394 v.AuxInt = int32ToAuxInt(off)
4395 v.Aux = symToAux(sym)
4396 v.AddArg3(ptr, x, mem)
4397 return true
4398 }
4399
4400
4401
4402 for {
4403 off := auxIntToInt32(v.AuxInt)
4404 sym := auxToSym(v.Aux)
4405 ptr := v_0
4406 y := v_1
4407 if y.Op != Op386XORLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
4408 break
4409 }
4410 mem := y.Args[2]
4411 x := y.Args[0]
4412 if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
4413 break
4414 }
4415 v.reset(Op386XORLmodify)
4416 v.AuxInt = int32ToAuxInt(off)
4417 v.Aux = symToAux(sym)
4418 v.AddArg3(ptr, x, mem)
4419 return true
4420 }
4421
4422
4423
4424 for {
4425 off := auxIntToInt32(v.AuxInt)
4426 sym := auxToSym(v.Aux)
4427 ptr := v_0
4428 y := v_1
4429 if y.Op != Op386ADDL {
4430 break
4431 }
4432 _ = y.Args[1]
4433 y_0 := y.Args[0]
4434 y_1 := y.Args[1]
4435 for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
4436 l := y_0
4437 if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
4438 continue
4439 }
4440 mem := l.Args[1]
4441 if ptr != l.Args[0] {
4442 continue
4443 }
4444 x := y_1
4445 if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
4446 continue
4447 }
4448 v.reset(Op386ADDLmodify)
4449 v.AuxInt = int32ToAuxInt(off)
4450 v.Aux = symToAux(sym)
4451 v.AddArg3(ptr, x, mem)
4452 return true
4453 }
4454 break
4455 }
4456
4457
4458
4459 for {
4460 off := auxIntToInt32(v.AuxInt)
4461 sym := auxToSym(v.Aux)
4462 ptr := v_0
4463 y := v_1
4464 if y.Op != Op386SUBL {
4465 break
4466 }
4467 x := y.Args[1]
4468 l := y.Args[0]
4469 if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
4470 break
4471 }
4472 mem := l.Args[1]
4473 if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
4474 break
4475 }
4476 v.reset(Op386SUBLmodify)
4477 v.AuxInt = int32ToAuxInt(off)
4478 v.Aux = symToAux(sym)
4479 v.AddArg3(ptr, x, mem)
4480 return true
4481 }
4482
4483
4484
4485 for {
4486 off := auxIntToInt32(v.AuxInt)
4487 sym := auxToSym(v.Aux)
4488 ptr := v_0
4489 y := v_1
4490 if y.Op != Op386ANDL {
4491 break
4492 }
4493 _ = y.Args[1]
4494 y_0 := y.Args[0]
4495 y_1 := y.Args[1]
4496 for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
4497 l := y_0
4498 if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
4499 continue
4500 }
4501 mem := l.Args[1]
4502 if ptr != l.Args[0] {
4503 continue
4504 }
4505 x := y_1
4506 if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
4507 continue
4508 }
4509 v.reset(Op386ANDLmodify)
4510 v.AuxInt = int32ToAuxInt(off)
4511 v.Aux = symToAux(sym)
4512 v.AddArg3(ptr, x, mem)
4513 return true
4514 }
4515 break
4516 }
4517
4518
4519
4520 for {
4521 off := auxIntToInt32(v.AuxInt)
4522 sym := auxToSym(v.Aux)
4523 ptr := v_0
4524 y := v_1
4525 if y.Op != Op386ORL {
4526 break
4527 }
4528 _ = y.Args[1]
4529 y_0 := y.Args[0]
4530 y_1 := y.Args[1]
4531 for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
4532 l := y_0
4533 if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
4534 continue
4535 }
4536 mem := l.Args[1]
4537 if ptr != l.Args[0] {
4538 continue
4539 }
4540 x := y_1
4541 if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
4542 continue
4543 }
4544 v.reset(Op386ORLmodify)
4545 v.AuxInt = int32ToAuxInt(off)
4546 v.Aux = symToAux(sym)
4547 v.AddArg3(ptr, x, mem)
4548 return true
4549 }
4550 break
4551 }
4552
4553
4554
4555 for {
4556 off := auxIntToInt32(v.AuxInt)
4557 sym := auxToSym(v.Aux)
4558 ptr := v_0
4559 y := v_1
4560 if y.Op != Op386XORL {
4561 break
4562 }
4563 _ = y.Args[1]
4564 y_0 := y.Args[0]
4565 y_1 := y.Args[1]
4566 for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
4567 l := y_0
4568 if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
4569 continue
4570 }
4571 mem := l.Args[1]
4572 if ptr != l.Args[0] {
4573 continue
4574 }
4575 x := y_1
4576 if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
4577 continue
4578 }
4579 v.reset(Op386XORLmodify)
4580 v.AuxInt = int32ToAuxInt(off)
4581 v.Aux = symToAux(sym)
4582 v.AddArg3(ptr, x, mem)
4583 return true
4584 }
4585 break
4586 }
4587
4588
4589
4590 for {
4591 off := auxIntToInt32(v.AuxInt)
4592 sym := auxToSym(v.Aux)
4593 ptr := v_0
4594 y := v_1
4595 if y.Op != Op386ADDLconst {
4596 break
4597 }
4598 c := auxIntToInt32(y.AuxInt)
4599 l := y.Args[0]
4600 if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
4601 break
4602 }
4603 mem := l.Args[1]
4604 if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
4605 break
4606 }
4607 v.reset(Op386ADDLconstmodify)
4608 v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
4609 v.Aux = symToAux(sym)
4610 v.AddArg2(ptr, mem)
4611 return true
4612 }
4613
4614
4615
4616 for {
4617 off := auxIntToInt32(v.AuxInt)
4618 sym := auxToSym(v.Aux)
4619 ptr := v_0
4620 y := v_1
4621 if y.Op != Op386ANDLconst {
4622 break
4623 }
4624 c := auxIntToInt32(y.AuxInt)
4625 l := y.Args[0]
4626 if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
4627 break
4628 }
4629 mem := l.Args[1]
4630 if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
4631 break
4632 }
4633 v.reset(Op386ANDLconstmodify)
4634 v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
4635 v.Aux = symToAux(sym)
4636 v.AddArg2(ptr, mem)
4637 return true
4638 }
4639
4640
4641
4642 for {
4643 off := auxIntToInt32(v.AuxInt)
4644 sym := auxToSym(v.Aux)
4645 ptr := v_0
4646 y := v_1
4647 if y.Op != Op386ORLconst {
4648 break
4649 }
4650 c := auxIntToInt32(y.AuxInt)
4651 l := y.Args[0]
4652 if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
4653 break
4654 }
4655 mem := l.Args[1]
4656 if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
4657 break
4658 }
4659 v.reset(Op386ORLconstmodify)
4660 v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
4661 v.Aux = symToAux(sym)
4662 v.AddArg2(ptr, mem)
4663 return true
4664 }
4665
4666
4667
4668 for {
4669 off := auxIntToInt32(v.AuxInt)
4670 sym := auxToSym(v.Aux)
4671 ptr := v_0
4672 y := v_1
4673 if y.Op != Op386XORLconst {
4674 break
4675 }
4676 c := auxIntToInt32(y.AuxInt)
4677 l := y.Args[0]
4678 if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
4679 break
4680 }
4681 mem := l.Args[1]
4682 if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
4683 break
4684 }
4685 v.reset(Op386XORLconstmodify)
4686 v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
4687 v.Aux = symToAux(sym)
4688 v.AddArg2(ptr, mem)
4689 return true
4690 }
4691 return false
4692 }
4693 func rewriteValue386_Op386MOVLstoreconst(v *Value) bool {
4694 v_1 := v.Args[1]
4695 v_0 := v.Args[0]
4696 b := v.Block
4697 config := b.Func.Config
4698
4699
4700
4701 for {
4702 sc := auxIntToValAndOff(v.AuxInt)
4703 s := auxToSym(v.Aux)
4704 if v_0.Op != Op386ADDLconst {
4705 break
4706 }
4707 off := auxIntToInt32(v_0.AuxInt)
4708 ptr := v_0.Args[0]
4709 mem := v_1
4710 if !(sc.canAdd32(off)) {
4711 break
4712 }
4713 v.reset(Op386MOVLstoreconst)
4714 v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
4715 v.Aux = symToAux(s)
4716 v.AddArg2(ptr, mem)
4717 return true
4718 }
4719
4720
4721
4722 for {
4723 sc := auxIntToValAndOff(v.AuxInt)
4724 sym1 := auxToSym(v.Aux)
4725 if v_0.Op != Op386LEAL {
4726 break
4727 }
4728 off := auxIntToInt32(v_0.AuxInt)
4729 sym2 := auxToSym(v_0.Aux)
4730 ptr := v_0.Args[0]
4731 mem := v_1
4732 if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
4733 break
4734 }
4735 v.reset(Op386MOVLstoreconst)
4736 v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
4737 v.Aux = symToAux(mergeSym(sym1, sym2))
4738 v.AddArg2(ptr, mem)
4739 return true
4740 }
4741 return false
4742 }
4743 func rewriteValue386_Op386MOVSDconst(v *Value) bool {
4744 b := v.Block
4745 config := b.Func.Config
4746 typ := &b.Func.Config.Types
4747
4748
4749
4750 for {
4751 c := auxIntToFloat64(v.AuxInt)
4752 if !(config.ctxt.Flag_shared) {
4753 break
4754 }
4755 v.reset(Op386MOVSDconst2)
4756 v0 := b.NewValue0(v.Pos, Op386MOVSDconst1, typ.UInt32)
4757 v0.AuxInt = float64ToAuxInt(c)
4758 v.AddArg(v0)
4759 return true
4760 }
4761 return false
4762 }
4763 func rewriteValue386_Op386MOVSDload(v *Value) bool {
4764 v_1 := v.Args[1]
4765 v_0 := v.Args[0]
4766 b := v.Block
4767 config := b.Func.Config
4768
4769
4770
4771 for {
4772 off1 := auxIntToInt32(v.AuxInt)
4773 sym := auxToSym(v.Aux)
4774 if v_0.Op != Op386ADDLconst {
4775 break
4776 }
4777 off2 := auxIntToInt32(v_0.AuxInt)
4778 ptr := v_0.Args[0]
4779 mem := v_1
4780 if !(is32Bit(int64(off1) + int64(off2))) {
4781 break
4782 }
4783 v.reset(Op386MOVSDload)
4784 v.AuxInt = int32ToAuxInt(off1 + off2)
4785 v.Aux = symToAux(sym)
4786 v.AddArg2(ptr, mem)
4787 return true
4788 }
4789
4790
4791
4792 for {
4793 off1 := auxIntToInt32(v.AuxInt)
4794 sym1 := auxToSym(v.Aux)
4795 if v_0.Op != Op386LEAL {
4796 break
4797 }
4798 off2 := auxIntToInt32(v_0.AuxInt)
4799 sym2 := auxToSym(v_0.Aux)
4800 base := v_0.Args[0]
4801 mem := v_1
4802 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
4803 break
4804 }
4805 v.reset(Op386MOVSDload)
4806 v.AuxInt = int32ToAuxInt(off1 + off2)
4807 v.Aux = symToAux(mergeSym(sym1, sym2))
4808 v.AddArg2(base, mem)
4809 return true
4810 }
4811 return false
4812 }
4813 func rewriteValue386_Op386MOVSDstore(v *Value) bool {
4814 v_2 := v.Args[2]
4815 v_1 := v.Args[1]
4816 v_0 := v.Args[0]
4817 b := v.Block
4818 config := b.Func.Config
4819
4820
4821
4822 for {
4823 off1 := auxIntToInt32(v.AuxInt)
4824 sym := auxToSym(v.Aux)
4825 if v_0.Op != Op386ADDLconst {
4826 break
4827 }
4828 off2 := auxIntToInt32(v_0.AuxInt)
4829 ptr := v_0.Args[0]
4830 val := v_1
4831 mem := v_2
4832 if !(is32Bit(int64(off1) + int64(off2))) {
4833 break
4834 }
4835 v.reset(Op386MOVSDstore)
4836 v.AuxInt = int32ToAuxInt(off1 + off2)
4837 v.Aux = symToAux(sym)
4838 v.AddArg3(ptr, val, mem)
4839 return true
4840 }
4841
4842
4843
4844 for {
4845 off1 := auxIntToInt32(v.AuxInt)
4846 sym1 := auxToSym(v.Aux)
4847 if v_0.Op != Op386LEAL {
4848 break
4849 }
4850 off2 := auxIntToInt32(v_0.AuxInt)
4851 sym2 := auxToSym(v_0.Aux)
4852 base := v_0.Args[0]
4853 val := v_1
4854 mem := v_2
4855 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
4856 break
4857 }
4858 v.reset(Op386MOVSDstore)
4859 v.AuxInt = int32ToAuxInt(off1 + off2)
4860 v.Aux = symToAux(mergeSym(sym1, sym2))
4861 v.AddArg3(base, val, mem)
4862 return true
4863 }
4864 return false
4865 }
4866 func rewriteValue386_Op386MOVSSconst(v *Value) bool {
4867 b := v.Block
4868 config := b.Func.Config
4869 typ := &b.Func.Config.Types
4870
4871
4872
4873 for {
4874 c := auxIntToFloat32(v.AuxInt)
4875 if !(config.ctxt.Flag_shared) {
4876 break
4877 }
4878 v.reset(Op386MOVSSconst2)
4879 v0 := b.NewValue0(v.Pos, Op386MOVSSconst1, typ.UInt32)
4880 v0.AuxInt = float32ToAuxInt(c)
4881 v.AddArg(v0)
4882 return true
4883 }
4884 return false
4885 }
4886 func rewriteValue386_Op386MOVSSload(v *Value) bool {
4887 v_1 := v.Args[1]
4888 v_0 := v.Args[0]
4889 b := v.Block
4890 config := b.Func.Config
4891
4892
4893
4894 for {
4895 off1 := auxIntToInt32(v.AuxInt)
4896 sym := auxToSym(v.Aux)
4897 if v_0.Op != Op386ADDLconst {
4898 break
4899 }
4900 off2 := auxIntToInt32(v_0.AuxInt)
4901 ptr := v_0.Args[0]
4902 mem := v_1
4903 if !(is32Bit(int64(off1) + int64(off2))) {
4904 break
4905 }
4906 v.reset(Op386MOVSSload)
4907 v.AuxInt = int32ToAuxInt(off1 + off2)
4908 v.Aux = symToAux(sym)
4909 v.AddArg2(ptr, mem)
4910 return true
4911 }
4912
4913
4914
4915 for {
4916 off1 := auxIntToInt32(v.AuxInt)
4917 sym1 := auxToSym(v.Aux)
4918 if v_0.Op != Op386LEAL {
4919 break
4920 }
4921 off2 := auxIntToInt32(v_0.AuxInt)
4922 sym2 := auxToSym(v_0.Aux)
4923 base := v_0.Args[0]
4924 mem := v_1
4925 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
4926 break
4927 }
4928 v.reset(Op386MOVSSload)
4929 v.AuxInt = int32ToAuxInt(off1 + off2)
4930 v.Aux = symToAux(mergeSym(sym1, sym2))
4931 v.AddArg2(base, mem)
4932 return true
4933 }
4934 return false
4935 }
4936 func rewriteValue386_Op386MOVSSstore(v *Value) bool {
4937 v_2 := v.Args[2]
4938 v_1 := v.Args[1]
4939 v_0 := v.Args[0]
4940 b := v.Block
4941 config := b.Func.Config
4942
4943
4944
4945 for {
4946 off1 := auxIntToInt32(v.AuxInt)
4947 sym := auxToSym(v.Aux)
4948 if v_0.Op != Op386ADDLconst {
4949 break
4950 }
4951 off2 := auxIntToInt32(v_0.AuxInt)
4952 ptr := v_0.Args[0]
4953 val := v_1
4954 mem := v_2
4955 if !(is32Bit(int64(off1) + int64(off2))) {
4956 break
4957 }
4958 v.reset(Op386MOVSSstore)
4959 v.AuxInt = int32ToAuxInt(off1 + off2)
4960 v.Aux = symToAux(sym)
4961 v.AddArg3(ptr, val, mem)
4962 return true
4963 }
4964
4965
4966
4967 for {
4968 off1 := auxIntToInt32(v.AuxInt)
4969 sym1 := auxToSym(v.Aux)
4970 if v_0.Op != Op386LEAL {
4971 break
4972 }
4973 off2 := auxIntToInt32(v_0.AuxInt)
4974 sym2 := auxToSym(v_0.Aux)
4975 base := v_0.Args[0]
4976 val := v_1
4977 mem := v_2
4978 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
4979 break
4980 }
4981 v.reset(Op386MOVSSstore)
4982 v.AuxInt = int32ToAuxInt(off1 + off2)
4983 v.Aux = symToAux(mergeSym(sym1, sym2))
4984 v.AddArg3(base, val, mem)
4985 return true
4986 }
4987 return false
4988 }
4989 func rewriteValue386_Op386MOVWLSX(v *Value) bool {
4990 v_0 := v.Args[0]
4991 b := v.Block
4992
4993
4994
4995 for {
4996 x := v_0
4997 if x.Op != Op386MOVWload {
4998 break
4999 }
5000 off := auxIntToInt32(x.AuxInt)
5001 sym := auxToSym(x.Aux)
5002 mem := x.Args[1]
5003 ptr := x.Args[0]
5004 if !(x.Uses == 1 && clobber(x)) {
5005 break
5006 }
5007 b = x.Block
5008 v0 := b.NewValue0(x.Pos, Op386MOVWLSXload, v.Type)
5009 v.copyOf(v0)
5010 v0.AuxInt = int32ToAuxInt(off)
5011 v0.Aux = symToAux(sym)
5012 v0.AddArg2(ptr, mem)
5013 return true
5014 }
5015
5016
5017
5018 for {
5019 if v_0.Op != Op386ANDLconst {
5020 break
5021 }
5022 c := auxIntToInt32(v_0.AuxInt)
5023 x := v_0.Args[0]
5024 if !(c&0x8000 == 0) {
5025 break
5026 }
5027 v.reset(Op386ANDLconst)
5028 v.AuxInt = int32ToAuxInt(c & 0x7fff)
5029 v.AddArg(x)
5030 return true
5031 }
5032 return false
5033 }
5034 func rewriteValue386_Op386MOVWLSXload(v *Value) bool {
5035 v_1 := v.Args[1]
5036 v_0 := v.Args[0]
5037 b := v.Block
5038 config := b.Func.Config
5039
5040
5041
5042 for {
5043 off := auxIntToInt32(v.AuxInt)
5044 sym := auxToSym(v.Aux)
5045 ptr := v_0
5046 if v_1.Op != Op386MOVWstore {
5047 break
5048 }
5049 off2 := auxIntToInt32(v_1.AuxInt)
5050 sym2 := auxToSym(v_1.Aux)
5051 x := v_1.Args[1]
5052 ptr2 := v_1.Args[0]
5053 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
5054 break
5055 }
5056 v.reset(Op386MOVWLSX)
5057 v.AddArg(x)
5058 return true
5059 }
5060
5061
5062
5063 for {
5064 off1 := auxIntToInt32(v.AuxInt)
5065 sym1 := auxToSym(v.Aux)
5066 if v_0.Op != Op386LEAL {
5067 break
5068 }
5069 off2 := auxIntToInt32(v_0.AuxInt)
5070 sym2 := auxToSym(v_0.Aux)
5071 base := v_0.Args[0]
5072 mem := v_1
5073 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
5074 break
5075 }
5076 v.reset(Op386MOVWLSXload)
5077 v.AuxInt = int32ToAuxInt(off1 + off2)
5078 v.Aux = symToAux(mergeSym(sym1, sym2))
5079 v.AddArg2(base, mem)
5080 return true
5081 }
5082 return false
5083 }
5084 func rewriteValue386_Op386MOVWLZX(v *Value) bool {
5085 v_0 := v.Args[0]
5086 b := v.Block
5087
5088
5089
5090 for {
5091 x := v_0
5092 if x.Op != Op386MOVWload {
5093 break
5094 }
5095 off := auxIntToInt32(x.AuxInt)
5096 sym := auxToSym(x.Aux)
5097 mem := x.Args[1]
5098 ptr := x.Args[0]
5099 if !(x.Uses == 1 && clobber(x)) {
5100 break
5101 }
5102 b = x.Block
5103 v0 := b.NewValue0(x.Pos, Op386MOVWload, v.Type)
5104 v.copyOf(v0)
5105 v0.AuxInt = int32ToAuxInt(off)
5106 v0.Aux = symToAux(sym)
5107 v0.AddArg2(ptr, mem)
5108 return true
5109 }
5110
5111
5112 for {
5113 if v_0.Op != Op386ANDLconst {
5114 break
5115 }
5116 c := auxIntToInt32(v_0.AuxInt)
5117 x := v_0.Args[0]
5118 v.reset(Op386ANDLconst)
5119 v.AuxInt = int32ToAuxInt(c & 0xffff)
5120 v.AddArg(x)
5121 return true
5122 }
5123 return false
5124 }
5125 func rewriteValue386_Op386MOVWload(v *Value) bool {
5126 v_1 := v.Args[1]
5127 v_0 := v.Args[0]
5128 b := v.Block
5129 config := b.Func.Config
5130
5131
5132
5133 for {
5134 off := auxIntToInt32(v.AuxInt)
5135 sym := auxToSym(v.Aux)
5136 ptr := v_0
5137 if v_1.Op != Op386MOVWstore {
5138 break
5139 }
5140 off2 := auxIntToInt32(v_1.AuxInt)
5141 sym2 := auxToSym(v_1.Aux)
5142 x := v_1.Args[1]
5143 ptr2 := v_1.Args[0]
5144 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
5145 break
5146 }
5147 v.reset(Op386MOVWLZX)
5148 v.AddArg(x)
5149 return true
5150 }
5151
5152
5153
5154 for {
5155 off1 := auxIntToInt32(v.AuxInt)
5156 sym := auxToSym(v.Aux)
5157 if v_0.Op != Op386ADDLconst {
5158 break
5159 }
5160 off2 := auxIntToInt32(v_0.AuxInt)
5161 ptr := v_0.Args[0]
5162 mem := v_1
5163 if !(is32Bit(int64(off1) + int64(off2))) {
5164 break
5165 }
5166 v.reset(Op386MOVWload)
5167 v.AuxInt = int32ToAuxInt(off1 + off2)
5168 v.Aux = symToAux(sym)
5169 v.AddArg2(ptr, mem)
5170 return true
5171 }
5172
5173
5174
5175 for {
5176 off1 := auxIntToInt32(v.AuxInt)
5177 sym1 := auxToSym(v.Aux)
5178 if v_0.Op != Op386LEAL {
5179 break
5180 }
5181 off2 := auxIntToInt32(v_0.AuxInt)
5182 sym2 := auxToSym(v_0.Aux)
5183 base := v_0.Args[0]
5184 mem := v_1
5185 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
5186 break
5187 }
5188 v.reset(Op386MOVWload)
5189 v.AuxInt = int32ToAuxInt(off1 + off2)
5190 v.Aux = symToAux(mergeSym(sym1, sym2))
5191 v.AddArg2(base, mem)
5192 return true
5193 }
5194
5195
5196
5197 for {
5198 off := auxIntToInt32(v.AuxInt)
5199 sym := auxToSym(v.Aux)
5200 if v_0.Op != OpSB || !(symIsRO(sym)) {
5201 break
5202 }
5203 v.reset(Op386MOVLconst)
5204 v.AuxInt = int32ToAuxInt(int32(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
5205 return true
5206 }
5207 return false
5208 }
5209 func rewriteValue386_Op386MOVWstore(v *Value) bool {
5210 v_2 := v.Args[2]
5211 v_1 := v.Args[1]
5212 v_0 := v.Args[0]
5213 b := v.Block
5214 config := b.Func.Config
5215
5216
5217 for {
5218 off := auxIntToInt32(v.AuxInt)
5219 sym := auxToSym(v.Aux)
5220 ptr := v_0
5221 if v_1.Op != Op386MOVWLSX {
5222 break
5223 }
5224 x := v_1.Args[0]
5225 mem := v_2
5226 v.reset(Op386MOVWstore)
5227 v.AuxInt = int32ToAuxInt(off)
5228 v.Aux = symToAux(sym)
5229 v.AddArg3(ptr, x, mem)
5230 return true
5231 }
5232
5233
5234 for {
5235 off := auxIntToInt32(v.AuxInt)
5236 sym := auxToSym(v.Aux)
5237 ptr := v_0
5238 if v_1.Op != Op386MOVWLZX {
5239 break
5240 }
5241 x := v_1.Args[0]
5242 mem := v_2
5243 v.reset(Op386MOVWstore)
5244 v.AuxInt = int32ToAuxInt(off)
5245 v.Aux = symToAux(sym)
5246 v.AddArg3(ptr, x, mem)
5247 return true
5248 }
5249
5250
5251
5252 for {
5253 off1 := auxIntToInt32(v.AuxInt)
5254 sym := auxToSym(v.Aux)
5255 if v_0.Op != Op386ADDLconst {
5256 break
5257 }
5258 off2 := auxIntToInt32(v_0.AuxInt)
5259 ptr := v_0.Args[0]
5260 val := v_1
5261 mem := v_2
5262 if !(is32Bit(int64(off1) + int64(off2))) {
5263 break
5264 }
5265 v.reset(Op386MOVWstore)
5266 v.AuxInt = int32ToAuxInt(off1 + off2)
5267 v.Aux = symToAux(sym)
5268 v.AddArg3(ptr, val, mem)
5269 return true
5270 }
5271
5272
5273 for {
5274 off := auxIntToInt32(v.AuxInt)
5275 sym := auxToSym(v.Aux)
5276 ptr := v_0
5277 if v_1.Op != Op386MOVLconst {
5278 break
5279 }
5280 c := auxIntToInt32(v_1.AuxInt)
5281 mem := v_2
5282 v.reset(Op386MOVWstoreconst)
5283 v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
5284 v.Aux = symToAux(sym)
5285 v.AddArg2(ptr, mem)
5286 return true
5287 }
5288
5289
5290
5291 for {
5292 off1 := auxIntToInt32(v.AuxInt)
5293 sym1 := auxToSym(v.Aux)
5294 if v_0.Op != Op386LEAL {
5295 break
5296 }
5297 off2 := auxIntToInt32(v_0.AuxInt)
5298 sym2 := auxToSym(v_0.Aux)
5299 base := v_0.Args[0]
5300 val := v_1
5301 mem := v_2
5302 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
5303 break
5304 }
5305 v.reset(Op386MOVWstore)
5306 v.AuxInt = int32ToAuxInt(off1 + off2)
5307 v.Aux = symToAux(mergeSym(sym1, sym2))
5308 v.AddArg3(base, val, mem)
5309 return true
5310 }
5311
5312
5313
5314 for {
5315 i := auxIntToInt32(v.AuxInt)
5316 s := auxToSym(v.Aux)
5317 p := v_0
5318 if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 16 {
5319 break
5320 }
5321 w := v_1.Args[0]
5322 x := v_2
5323 if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
5324 break
5325 }
5326 mem := x.Args[2]
5327 if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
5328 break
5329 }
5330 v.reset(Op386MOVLstore)
5331 v.AuxInt = int32ToAuxInt(i - 2)
5332 v.Aux = symToAux(s)
5333 v.AddArg3(p, w, mem)
5334 return true
5335 }
5336
5337
5338
5339 for {
5340 i := auxIntToInt32(v.AuxInt)
5341 s := auxToSym(v.Aux)
5342 p := v_0
5343 if v_1.Op != Op386SHRLconst {
5344 break
5345 }
5346 j := auxIntToInt32(v_1.AuxInt)
5347 w := v_1.Args[0]
5348 x := v_2
5349 if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
5350 break
5351 }
5352 mem := x.Args[2]
5353 if p != x.Args[0] {
5354 break
5355 }
5356 w0 := x.Args[1]
5357 if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-16 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
5358 break
5359 }
5360 v.reset(Op386MOVLstore)
5361 v.AuxInt = int32ToAuxInt(i - 2)
5362 v.Aux = symToAux(s)
5363 v.AddArg3(p, w0, mem)
5364 return true
5365 }
5366
5367
5368
5369 for {
5370 i := auxIntToInt32(v.AuxInt)
5371 s := auxToSym(v.Aux)
5372 p1 := v_0
5373 if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 16 {
5374 break
5375 }
5376 w := v_1.Args[0]
5377 x := v_2
5378 if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
5379 break
5380 }
5381 mem := x.Args[2]
5382 p0 := x.Args[0]
5383 if w != x.Args[1] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 2) && clobber(x)) {
5384 break
5385 }
5386 v.reset(Op386MOVLstore)
5387 v.AuxInt = int32ToAuxInt(i)
5388 v.Aux = symToAux(s)
5389 v.AddArg3(p0, w, mem)
5390 return true
5391 }
5392
5393
5394
5395 for {
5396 i := auxIntToInt32(v.AuxInt)
5397 s := auxToSym(v.Aux)
5398 p1 := v_0
5399 if v_1.Op != Op386SHRLconst {
5400 break
5401 }
5402 j := auxIntToInt32(v_1.AuxInt)
5403 w := v_1.Args[0]
5404 x := v_2
5405 if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
5406 break
5407 }
5408 mem := x.Args[2]
5409 p0 := x.Args[0]
5410 w0 := x.Args[1]
5411 if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-16 || w != w0.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 2) && clobber(x)) {
5412 break
5413 }
5414 v.reset(Op386MOVLstore)
5415 v.AuxInt = int32ToAuxInt(i)
5416 v.Aux = symToAux(s)
5417 v.AddArg3(p0, w0, mem)
5418 return true
5419 }
5420 return false
5421 }
5422 func rewriteValue386_Op386MOVWstoreconst(v *Value) bool {
5423 v_1 := v.Args[1]
5424 v_0 := v.Args[0]
5425 b := v.Block
5426 config := b.Func.Config
5427
5428
5429
5430 for {
5431 sc := auxIntToValAndOff(v.AuxInt)
5432 s := auxToSym(v.Aux)
5433 if v_0.Op != Op386ADDLconst {
5434 break
5435 }
5436 off := auxIntToInt32(v_0.AuxInt)
5437 ptr := v_0.Args[0]
5438 mem := v_1
5439 if !(sc.canAdd32(off)) {
5440 break
5441 }
5442 v.reset(Op386MOVWstoreconst)
5443 v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
5444 v.Aux = symToAux(s)
5445 v.AddArg2(ptr, mem)
5446 return true
5447 }
5448
5449
5450
5451 for {
5452 sc := auxIntToValAndOff(v.AuxInt)
5453 sym1 := auxToSym(v.Aux)
5454 if v_0.Op != Op386LEAL {
5455 break
5456 }
5457 off := auxIntToInt32(v_0.AuxInt)
5458 sym2 := auxToSym(v_0.Aux)
5459 ptr := v_0.Args[0]
5460 mem := v_1
5461 if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
5462 break
5463 }
5464 v.reset(Op386MOVWstoreconst)
5465 v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
5466 v.Aux = symToAux(mergeSym(sym1, sym2))
5467 v.AddArg2(ptr, mem)
5468 return true
5469 }
5470
5471
5472
5473 for {
5474 c := auxIntToValAndOff(v.AuxInt)
5475 s := auxToSym(v.Aux)
5476 p := v_0
5477 x := v_1
5478 if x.Op != Op386MOVWstoreconst {
5479 break
5480 }
5481 a := auxIntToValAndOff(x.AuxInt)
5482 if auxToSym(x.Aux) != s {
5483 break
5484 }
5485 mem := x.Args[1]
5486 if p != x.Args[0] || !(x.Uses == 1 && a.Off()+2 == c.Off() && clobber(x)) {
5487 break
5488 }
5489 v.reset(Op386MOVLstoreconst)
5490 v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xffff|c.Val()<<16, a.Off()))
5491 v.Aux = symToAux(s)
5492 v.AddArg2(p, mem)
5493 return true
5494 }
5495
5496
5497
5498 for {
5499 a := auxIntToValAndOff(v.AuxInt)
5500 s := auxToSym(v.Aux)
5501 p := v_0
5502 x := v_1
5503 if x.Op != Op386MOVWstoreconst {
5504 break
5505 }
5506 c := auxIntToValAndOff(x.AuxInt)
5507 if auxToSym(x.Aux) != s {
5508 break
5509 }
5510 mem := x.Args[1]
5511 if p != x.Args[0] || !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
5512 break
5513 }
5514 v.reset(Op386MOVLstoreconst)
5515 v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xffff|c.Val()<<16, a.Off()))
5516 v.Aux = symToAux(s)
5517 v.AddArg2(p, mem)
5518 return true
5519 }
5520
5521
5522
5523 for {
5524 c := auxIntToValAndOff(v.AuxInt)
5525 s := auxToSym(v.Aux)
5526 p1 := v_0
5527 x := v_1
5528 if x.Op != Op386MOVWstoreconst {
5529 break
5530 }
5531 a := auxIntToValAndOff(x.AuxInt)
5532 if auxToSym(x.Aux) != s {
5533 break
5534 }
5535 mem := x.Args[1]
5536 p0 := x.Args[0]
5537 if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 2) && clobber(x)) {
5538 break
5539 }
5540 v.reset(Op386MOVLstoreconst)
5541 v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xffff|c.Val()<<16, a.Off()))
5542 v.Aux = symToAux(s)
5543 v.AddArg2(p0, mem)
5544 return true
5545 }
5546
5547
5548
5549 for {
5550 a := auxIntToValAndOff(v.AuxInt)
5551 s := auxToSym(v.Aux)
5552 p0 := v_0
5553 x := v_1
5554 if x.Op != Op386MOVWstoreconst {
5555 break
5556 }
5557 c := auxIntToValAndOff(x.AuxInt)
5558 if auxToSym(x.Aux) != s {
5559 break
5560 }
5561 mem := x.Args[1]
5562 p1 := x.Args[0]
5563 if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 2) && clobber(x)) {
5564 break
5565 }
5566 v.reset(Op386MOVLstoreconst)
5567 v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xffff|c.Val()<<16, a.Off()))
5568 v.Aux = symToAux(s)
5569 v.AddArg2(p0, mem)
5570 return true
5571 }
5572 return false
5573 }
5574 func rewriteValue386_Op386MULL(v *Value) bool {
5575 v_1 := v.Args[1]
5576 v_0 := v.Args[0]
5577
5578
5579 for {
5580 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5581 x := v_0
5582 if v_1.Op != Op386MOVLconst {
5583 continue
5584 }
5585 c := auxIntToInt32(v_1.AuxInt)
5586 v.reset(Op386MULLconst)
5587 v.AuxInt = int32ToAuxInt(c)
5588 v.AddArg(x)
5589 return true
5590 }
5591 break
5592 }
5593
5594
5595
5596 for {
5597 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5598 x := v_0
5599 l := v_1
5600 if l.Op != Op386MOVLload {
5601 continue
5602 }
5603 off := auxIntToInt32(l.AuxInt)
5604 sym := auxToSym(l.Aux)
5605 mem := l.Args[1]
5606 ptr := l.Args[0]
5607 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
5608 continue
5609 }
5610 v.reset(Op386MULLload)
5611 v.AuxInt = int32ToAuxInt(off)
5612 v.Aux = symToAux(sym)
5613 v.AddArg3(x, ptr, mem)
5614 return true
5615 }
5616 break
5617 }
5618 return false
5619 }
5620 func rewriteValue386_Op386MULLconst(v *Value) bool {
5621 v_0 := v.Args[0]
5622 b := v.Block
5623
5624
5625 for {
5626 c := auxIntToInt32(v.AuxInt)
5627 if v_0.Op != Op386MULLconst {
5628 break
5629 }
5630 d := auxIntToInt32(v_0.AuxInt)
5631 x := v_0.Args[0]
5632 v.reset(Op386MULLconst)
5633 v.AuxInt = int32ToAuxInt(c * d)
5634 v.AddArg(x)
5635 return true
5636 }
5637
5638
5639 for {
5640 if auxIntToInt32(v.AuxInt) != -9 {
5641 break
5642 }
5643 x := v_0
5644 v.reset(Op386NEGL)
5645 v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
5646 v0.AddArg2(x, x)
5647 v.AddArg(v0)
5648 return true
5649 }
5650
5651
5652 for {
5653 if auxIntToInt32(v.AuxInt) != -5 {
5654 break
5655 }
5656 x := v_0
5657 v.reset(Op386NEGL)
5658 v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
5659 v0.AddArg2(x, x)
5660 v.AddArg(v0)
5661 return true
5662 }
5663
5664
5665 for {
5666 if auxIntToInt32(v.AuxInt) != -3 {
5667 break
5668 }
5669 x := v_0
5670 v.reset(Op386NEGL)
5671 v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
5672 v0.AddArg2(x, x)
5673 v.AddArg(v0)
5674 return true
5675 }
5676
5677
5678 for {
5679 if auxIntToInt32(v.AuxInt) != -1 {
5680 break
5681 }
5682 x := v_0
5683 v.reset(Op386NEGL)
5684 v.AddArg(x)
5685 return true
5686 }
5687
5688
5689 for {
5690 if auxIntToInt32(v.AuxInt) != 0 {
5691 break
5692 }
5693 v.reset(Op386MOVLconst)
5694 v.AuxInt = int32ToAuxInt(0)
5695 return true
5696 }
5697
5698
5699 for {
5700 if auxIntToInt32(v.AuxInt) != 1 {
5701 break
5702 }
5703 x := v_0
5704 v.copyOf(x)
5705 return true
5706 }
5707
5708
5709 for {
5710 if auxIntToInt32(v.AuxInt) != 3 {
5711 break
5712 }
5713 x := v_0
5714 v.reset(Op386LEAL2)
5715 v.AddArg2(x, x)
5716 return true
5717 }
5718
5719
5720 for {
5721 if auxIntToInt32(v.AuxInt) != 5 {
5722 break
5723 }
5724 x := v_0
5725 v.reset(Op386LEAL4)
5726 v.AddArg2(x, x)
5727 return true
5728 }
5729
5730
5731 for {
5732 if auxIntToInt32(v.AuxInt) != 7 {
5733 break
5734 }
5735 x := v_0
5736 v.reset(Op386LEAL2)
5737 v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
5738 v0.AddArg2(x, x)
5739 v.AddArg2(x, v0)
5740 return true
5741 }
5742
5743
5744 for {
5745 if auxIntToInt32(v.AuxInt) != 9 {
5746 break
5747 }
5748 x := v_0
5749 v.reset(Op386LEAL8)
5750 v.AddArg2(x, x)
5751 return true
5752 }
5753
5754
5755 for {
5756 if auxIntToInt32(v.AuxInt) != 11 {
5757 break
5758 }
5759 x := v_0
5760 v.reset(Op386LEAL2)
5761 v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
5762 v0.AddArg2(x, x)
5763 v.AddArg2(x, v0)
5764 return true
5765 }
5766
5767
5768 for {
5769 if auxIntToInt32(v.AuxInt) != 13 {
5770 break
5771 }
5772 x := v_0
5773 v.reset(Op386LEAL4)
5774 v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
5775 v0.AddArg2(x, x)
5776 v.AddArg2(x, v0)
5777 return true
5778 }
5779
5780
5781 for {
5782 if auxIntToInt32(v.AuxInt) != 19 {
5783 break
5784 }
5785 x := v_0
5786 v.reset(Op386LEAL2)
5787 v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
5788 v0.AddArg2(x, x)
5789 v.AddArg2(x, v0)
5790 return true
5791 }
5792
5793
5794 for {
5795 if auxIntToInt32(v.AuxInt) != 21 {
5796 break
5797 }
5798 x := v_0
5799 v.reset(Op386LEAL4)
5800 v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
5801 v0.AddArg2(x, x)
5802 v.AddArg2(x, v0)
5803 return true
5804 }
5805
5806
5807 for {
5808 if auxIntToInt32(v.AuxInt) != 25 {
5809 break
5810 }
5811 x := v_0
5812 v.reset(Op386LEAL8)
5813 v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
5814 v0.AddArg2(x, x)
5815 v.AddArg2(x, v0)
5816 return true
5817 }
5818
5819
5820 for {
5821 if auxIntToInt32(v.AuxInt) != 27 {
5822 break
5823 }
5824 x := v_0
5825 v.reset(Op386LEAL8)
5826 v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
5827 v0.AddArg2(x, x)
5828 v.AddArg2(v0, v0)
5829 return true
5830 }
5831
5832
5833 for {
5834 if auxIntToInt32(v.AuxInt) != 37 {
5835 break
5836 }
5837 x := v_0
5838 v.reset(Op386LEAL4)
5839 v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
5840 v0.AddArg2(x, x)
5841 v.AddArg2(x, v0)
5842 return true
5843 }
5844
5845
5846 for {
5847 if auxIntToInt32(v.AuxInt) != 41 {
5848 break
5849 }
5850 x := v_0
5851 v.reset(Op386LEAL8)
5852 v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
5853 v0.AddArg2(x, x)
5854 v.AddArg2(x, v0)
5855 return true
5856 }
5857
5858
5859 for {
5860 if auxIntToInt32(v.AuxInt) != 45 {
5861 break
5862 }
5863 x := v_0
5864 v.reset(Op386LEAL8)
5865 v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
5866 v0.AddArg2(x, x)
5867 v.AddArg2(v0, v0)
5868 return true
5869 }
5870
5871
5872 for {
5873 if auxIntToInt32(v.AuxInt) != 73 {
5874 break
5875 }
5876 x := v_0
5877 v.reset(Op386LEAL8)
5878 v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
5879 v0.AddArg2(x, x)
5880 v.AddArg2(x, v0)
5881 return true
5882 }
5883
5884
5885 for {
5886 if auxIntToInt32(v.AuxInt) != 81 {
5887 break
5888 }
5889 x := v_0
5890 v.reset(Op386LEAL8)
5891 v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
5892 v0.AddArg2(x, x)
5893 v.AddArg2(v0, v0)
5894 return true
5895 }
5896
5897
5898
5899 for {
5900 c := auxIntToInt32(v.AuxInt)
5901 x := v_0
5902 if !(isPowerOfTwo32(c+1) && c >= 15) {
5903 break
5904 }
5905 v.reset(Op386SUBL)
5906 v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
5907 v0.AuxInt = int32ToAuxInt(int32(log32(c + 1)))
5908 v0.AddArg(x)
5909 v.AddArg2(v0, x)
5910 return true
5911 }
5912
5913
5914
5915 for {
5916 c := auxIntToInt32(v.AuxInt)
5917 x := v_0
5918 if !(isPowerOfTwo32(c-1) && c >= 17) {
5919 break
5920 }
5921 v.reset(Op386LEAL1)
5922 v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
5923 v0.AuxInt = int32ToAuxInt(int32(log32(c - 1)))
5924 v0.AddArg(x)
5925 v.AddArg2(v0, x)
5926 return true
5927 }
5928
5929
5930
5931 for {
5932 c := auxIntToInt32(v.AuxInt)
5933 x := v_0
5934 if !(isPowerOfTwo32(c-2) && c >= 34) {
5935 break
5936 }
5937 v.reset(Op386LEAL2)
5938 v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
5939 v0.AuxInt = int32ToAuxInt(int32(log32(c - 2)))
5940 v0.AddArg(x)
5941 v.AddArg2(v0, x)
5942 return true
5943 }
5944
5945
5946
5947 for {
5948 c := auxIntToInt32(v.AuxInt)
5949 x := v_0
5950 if !(isPowerOfTwo32(c-4) && c >= 68) {
5951 break
5952 }
5953 v.reset(Op386LEAL4)
5954 v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
5955 v0.AuxInt = int32ToAuxInt(int32(log32(c - 4)))
5956 v0.AddArg(x)
5957 v.AddArg2(v0, x)
5958 return true
5959 }
5960
5961
5962
5963 for {
5964 c := auxIntToInt32(v.AuxInt)
5965 x := v_0
5966 if !(isPowerOfTwo32(c-8) && c >= 136) {
5967 break
5968 }
5969 v.reset(Op386LEAL8)
5970 v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
5971 v0.AuxInt = int32ToAuxInt(int32(log32(c - 8)))
5972 v0.AddArg(x)
5973 v.AddArg2(v0, x)
5974 return true
5975 }
5976
5977
5978
5979 for {
5980 c := auxIntToInt32(v.AuxInt)
5981 x := v_0
5982 if !(c%3 == 0 && isPowerOfTwo32(c/3)) {
5983 break
5984 }
5985 v.reset(Op386SHLLconst)
5986 v.AuxInt = int32ToAuxInt(int32(log32(c / 3)))
5987 v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
5988 v0.AddArg2(x, x)
5989 v.AddArg(v0)
5990 return true
5991 }
5992
5993
5994
5995 for {
5996 c := auxIntToInt32(v.AuxInt)
5997 x := v_0
5998 if !(c%5 == 0 && isPowerOfTwo32(c/5)) {
5999 break
6000 }
6001 v.reset(Op386SHLLconst)
6002 v.AuxInt = int32ToAuxInt(int32(log32(c / 5)))
6003 v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
6004 v0.AddArg2(x, x)
6005 v.AddArg(v0)
6006 return true
6007 }
6008
6009
6010
6011 for {
6012 c := auxIntToInt32(v.AuxInt)
6013 x := v_0
6014 if !(c%9 == 0 && isPowerOfTwo32(c/9)) {
6015 break
6016 }
6017 v.reset(Op386SHLLconst)
6018 v.AuxInt = int32ToAuxInt(int32(log32(c / 9)))
6019 v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
6020 v0.AddArg2(x, x)
6021 v.AddArg(v0)
6022 return true
6023 }
6024
6025
6026 for {
6027 c := auxIntToInt32(v.AuxInt)
6028 if v_0.Op != Op386MOVLconst {
6029 break
6030 }
6031 d := auxIntToInt32(v_0.AuxInt)
6032 v.reset(Op386MOVLconst)
6033 v.AuxInt = int32ToAuxInt(c * d)
6034 return true
6035 }
6036 return false
6037 }
6038 func rewriteValue386_Op386MULLload(v *Value) bool {
6039 v_2 := v.Args[2]
6040 v_1 := v.Args[1]
6041 v_0 := v.Args[0]
6042 b := v.Block
6043 config := b.Func.Config
6044
6045
6046
6047 for {
6048 off1 := auxIntToInt32(v.AuxInt)
6049 sym := auxToSym(v.Aux)
6050 val := v_0
6051 if v_1.Op != Op386ADDLconst {
6052 break
6053 }
6054 off2 := auxIntToInt32(v_1.AuxInt)
6055 base := v_1.Args[0]
6056 mem := v_2
6057 if !(is32Bit(int64(off1) + int64(off2))) {
6058 break
6059 }
6060 v.reset(Op386MULLload)
6061 v.AuxInt = int32ToAuxInt(off1 + off2)
6062 v.Aux = symToAux(sym)
6063 v.AddArg3(val, base, mem)
6064 return true
6065 }
6066
6067
6068
6069 for {
6070 off1 := auxIntToInt32(v.AuxInt)
6071 sym1 := auxToSym(v.Aux)
6072 val := v_0
6073 if v_1.Op != Op386LEAL {
6074 break
6075 }
6076 off2 := auxIntToInt32(v_1.AuxInt)
6077 sym2 := auxToSym(v_1.Aux)
6078 base := v_1.Args[0]
6079 mem := v_2
6080 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
6081 break
6082 }
6083 v.reset(Op386MULLload)
6084 v.AuxInt = int32ToAuxInt(off1 + off2)
6085 v.Aux = symToAux(mergeSym(sym1, sym2))
6086 v.AddArg3(val, base, mem)
6087 return true
6088 }
6089 return false
6090 }
6091 func rewriteValue386_Op386MULSD(v *Value) bool {
6092 v_1 := v.Args[1]
6093 v_0 := v.Args[0]
6094
6095
6096
6097 for {
6098 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6099 x := v_0
6100 l := v_1
6101 if l.Op != Op386MOVSDload {
6102 continue
6103 }
6104 off := auxIntToInt32(l.AuxInt)
6105 sym := auxToSym(l.Aux)
6106 mem := l.Args[1]
6107 ptr := l.Args[0]
6108 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
6109 continue
6110 }
6111 v.reset(Op386MULSDload)
6112 v.AuxInt = int32ToAuxInt(off)
6113 v.Aux = symToAux(sym)
6114 v.AddArg3(x, ptr, mem)
6115 return true
6116 }
6117 break
6118 }
6119 return false
6120 }
6121 func rewriteValue386_Op386MULSDload(v *Value) bool {
6122 v_2 := v.Args[2]
6123 v_1 := v.Args[1]
6124 v_0 := v.Args[0]
6125 b := v.Block
6126 config := b.Func.Config
6127
6128
6129
6130 for {
6131 off1 := auxIntToInt32(v.AuxInt)
6132 sym := auxToSym(v.Aux)
6133 val := v_0
6134 if v_1.Op != Op386ADDLconst {
6135 break
6136 }
6137 off2 := auxIntToInt32(v_1.AuxInt)
6138 base := v_1.Args[0]
6139 mem := v_2
6140 if !(is32Bit(int64(off1) + int64(off2))) {
6141 break
6142 }
6143 v.reset(Op386MULSDload)
6144 v.AuxInt = int32ToAuxInt(off1 + off2)
6145 v.Aux = symToAux(sym)
6146 v.AddArg3(val, base, mem)
6147 return true
6148 }
6149
6150
6151
6152 for {
6153 off1 := auxIntToInt32(v.AuxInt)
6154 sym1 := auxToSym(v.Aux)
6155 val := v_0
6156 if v_1.Op != Op386LEAL {
6157 break
6158 }
6159 off2 := auxIntToInt32(v_1.AuxInt)
6160 sym2 := auxToSym(v_1.Aux)
6161 base := v_1.Args[0]
6162 mem := v_2
6163 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
6164 break
6165 }
6166 v.reset(Op386MULSDload)
6167 v.AuxInt = int32ToAuxInt(off1 + off2)
6168 v.Aux = symToAux(mergeSym(sym1, sym2))
6169 v.AddArg3(val, base, mem)
6170 return true
6171 }
6172 return false
6173 }
6174 func rewriteValue386_Op386MULSS(v *Value) bool {
6175 v_1 := v.Args[1]
6176 v_0 := v.Args[0]
6177
6178
6179
6180 for {
6181 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6182 x := v_0
6183 l := v_1
6184 if l.Op != Op386MOVSSload {
6185 continue
6186 }
6187 off := auxIntToInt32(l.AuxInt)
6188 sym := auxToSym(l.Aux)
6189 mem := l.Args[1]
6190 ptr := l.Args[0]
6191 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
6192 continue
6193 }
6194 v.reset(Op386MULSSload)
6195 v.AuxInt = int32ToAuxInt(off)
6196 v.Aux = symToAux(sym)
6197 v.AddArg3(x, ptr, mem)
6198 return true
6199 }
6200 break
6201 }
6202 return false
6203 }
6204 func rewriteValue386_Op386MULSSload(v *Value) bool {
6205 v_2 := v.Args[2]
6206 v_1 := v.Args[1]
6207 v_0 := v.Args[0]
6208 b := v.Block
6209 config := b.Func.Config
6210
6211
6212
6213 for {
6214 off1 := auxIntToInt32(v.AuxInt)
6215 sym := auxToSym(v.Aux)
6216 val := v_0
6217 if v_1.Op != Op386ADDLconst {
6218 break
6219 }
6220 off2 := auxIntToInt32(v_1.AuxInt)
6221 base := v_1.Args[0]
6222 mem := v_2
6223 if !(is32Bit(int64(off1) + int64(off2))) {
6224 break
6225 }
6226 v.reset(Op386MULSSload)
6227 v.AuxInt = int32ToAuxInt(off1 + off2)
6228 v.Aux = symToAux(sym)
6229 v.AddArg3(val, base, mem)
6230 return true
6231 }
6232
6233
6234
6235 for {
6236 off1 := auxIntToInt32(v.AuxInt)
6237 sym1 := auxToSym(v.Aux)
6238 val := v_0
6239 if v_1.Op != Op386LEAL {
6240 break
6241 }
6242 off2 := auxIntToInt32(v_1.AuxInt)
6243 sym2 := auxToSym(v_1.Aux)
6244 base := v_1.Args[0]
6245 mem := v_2
6246 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
6247 break
6248 }
6249 v.reset(Op386MULSSload)
6250 v.AuxInt = int32ToAuxInt(off1 + off2)
6251 v.Aux = symToAux(mergeSym(sym1, sym2))
6252 v.AddArg3(val, base, mem)
6253 return true
6254 }
6255 return false
6256 }
6257 func rewriteValue386_Op386NEGL(v *Value) bool {
6258 v_0 := v.Args[0]
6259
6260
6261 for {
6262 if v_0.Op != Op386MOVLconst {
6263 break
6264 }
6265 c := auxIntToInt32(v_0.AuxInt)
6266 v.reset(Op386MOVLconst)
6267 v.AuxInt = int32ToAuxInt(-c)
6268 return true
6269 }
6270 return false
6271 }
6272 func rewriteValue386_Op386NOTL(v *Value) bool {
6273 v_0 := v.Args[0]
6274
6275
6276 for {
6277 if v_0.Op != Op386MOVLconst {
6278 break
6279 }
6280 c := auxIntToInt32(v_0.AuxInt)
6281 v.reset(Op386MOVLconst)
6282 v.AuxInt = int32ToAuxInt(^c)
6283 return true
6284 }
6285 return false
6286 }
6287 func rewriteValue386_Op386ORL(v *Value) bool {
6288 v_1 := v.Args[1]
6289 v_0 := v.Args[0]
6290 b := v.Block
6291 typ := &b.Func.Config.Types
6292
6293
6294 for {
6295 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6296 x := v_0
6297 if v_1.Op != Op386MOVLconst {
6298 continue
6299 }
6300 c := auxIntToInt32(v_1.AuxInt)
6301 v.reset(Op386ORLconst)
6302 v.AuxInt = int32ToAuxInt(c)
6303 v.AddArg(x)
6304 return true
6305 }
6306 break
6307 }
6308
6309
6310
6311 for {
6312 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6313 if v_0.Op != Op386SHLLconst {
6314 continue
6315 }
6316 c := auxIntToInt32(v_0.AuxInt)
6317 x := v_0.Args[0]
6318 if v_1.Op != Op386SHRLconst {
6319 continue
6320 }
6321 d := auxIntToInt32(v_1.AuxInt)
6322 if x != v_1.Args[0] || !(d == 32-c) {
6323 continue
6324 }
6325 v.reset(Op386ROLLconst)
6326 v.AuxInt = int32ToAuxInt(c)
6327 v.AddArg(x)
6328 return true
6329 }
6330 break
6331 }
6332
6333
6334
6335 for {
6336 t := v.Type
6337 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6338 if v_0.Op != Op386SHLLconst {
6339 continue
6340 }
6341 c := auxIntToInt32(v_0.AuxInt)
6342 x := v_0.Args[0]
6343 if v_1.Op != Op386SHRWconst {
6344 continue
6345 }
6346 d := auxIntToInt16(v_1.AuxInt)
6347 if x != v_1.Args[0] || !(c < 16 && d == int16(16-c) && t.Size() == 2) {
6348 continue
6349 }
6350 v.reset(Op386ROLWconst)
6351 v.AuxInt = int16ToAuxInt(int16(c))
6352 v.AddArg(x)
6353 return true
6354 }
6355 break
6356 }
6357
6358
6359
6360 for {
6361 t := v.Type
6362 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6363 if v_0.Op != Op386SHLLconst {
6364 continue
6365 }
6366 c := auxIntToInt32(v_0.AuxInt)
6367 x := v_0.Args[0]
6368 if v_1.Op != Op386SHRBconst {
6369 continue
6370 }
6371 d := auxIntToInt8(v_1.AuxInt)
6372 if x != v_1.Args[0] || !(c < 8 && d == int8(8-c) && t.Size() == 1) {
6373 continue
6374 }
6375 v.reset(Op386ROLBconst)
6376 v.AuxInt = int8ToAuxInt(int8(c))
6377 v.AddArg(x)
6378 return true
6379 }
6380 break
6381 }
6382
6383
6384
6385 for {
6386 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6387 x := v_0
6388 l := v_1
6389 if l.Op != Op386MOVLload {
6390 continue
6391 }
6392 off := auxIntToInt32(l.AuxInt)
6393 sym := auxToSym(l.Aux)
6394 mem := l.Args[1]
6395 ptr := l.Args[0]
6396 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
6397 continue
6398 }
6399 v.reset(Op386ORLload)
6400 v.AuxInt = int32ToAuxInt(off)
6401 v.Aux = symToAux(sym)
6402 v.AddArg3(x, ptr, mem)
6403 return true
6404 }
6405 break
6406 }
6407
6408
6409 for {
6410 x := v_0
6411 if x != v_1 {
6412 break
6413 }
6414 v.copyOf(x)
6415 return true
6416 }
6417
6418
6419
6420 for {
6421 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6422 x0 := v_0
6423 if x0.Op != Op386MOVBload {
6424 continue
6425 }
6426 i0 := auxIntToInt32(x0.AuxInt)
6427 s := auxToSym(x0.Aux)
6428 mem := x0.Args[1]
6429 p := x0.Args[0]
6430 s0 := v_1
6431 if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 8 {
6432 continue
6433 }
6434 x1 := s0.Args[0]
6435 if x1.Op != Op386MOVBload {
6436 continue
6437 }
6438 i1 := auxIntToInt32(x1.AuxInt)
6439 if auxToSym(x1.Aux) != s {
6440 continue
6441 }
6442 _ = x1.Args[1]
6443 if p != x1.Args[0] || mem != x1.Args[1] || !(i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, s0)) {
6444 continue
6445 }
6446 b = mergePoint(b, x0, x1)
6447 v0 := b.NewValue0(x1.Pos, Op386MOVWload, typ.UInt16)
6448 v.copyOf(v0)
6449 v0.AuxInt = int32ToAuxInt(i0)
6450 v0.Aux = symToAux(s)
6451 v0.AddArg2(p, mem)
6452 return true
6453 }
6454 break
6455 }
6456
6457
6458
6459 for {
6460 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6461 x0 := v_0
6462 if x0.Op != Op386MOVBload {
6463 continue
6464 }
6465 i := auxIntToInt32(x0.AuxInt)
6466 s := auxToSym(x0.Aux)
6467 mem := x0.Args[1]
6468 p0 := x0.Args[0]
6469 s0 := v_1
6470 if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 8 {
6471 continue
6472 }
6473 x1 := s0.Args[0]
6474 if x1.Op != Op386MOVBload || auxIntToInt32(x1.AuxInt) != i || auxToSym(x1.Aux) != s {
6475 continue
6476 }
6477 _ = x1.Args[1]
6478 p1 := x1.Args[0]
6479 if mem != x1.Args[1] || !(x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && sequentialAddresses(p0, p1, 1) && mergePoint(b, x0, x1) != nil && clobber(x0, x1, s0)) {
6480 continue
6481 }
6482 b = mergePoint(b, x0, x1)
6483 v0 := b.NewValue0(x1.Pos, Op386MOVWload, typ.UInt16)
6484 v.copyOf(v0)
6485 v0.AuxInt = int32ToAuxInt(i)
6486 v0.Aux = symToAux(s)
6487 v0.AddArg2(p0, mem)
6488 return true
6489 }
6490 break
6491 }
6492
6493
6494
6495 for {
6496 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6497 o0 := v_0
6498 if o0.Op != Op386ORL {
6499 continue
6500 }
6501 _ = o0.Args[1]
6502 o0_0 := o0.Args[0]
6503 o0_1 := o0.Args[1]
6504 for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
6505 x0 := o0_0
6506 if x0.Op != Op386MOVWload {
6507 continue
6508 }
6509 i0 := auxIntToInt32(x0.AuxInt)
6510 s := auxToSym(x0.Aux)
6511 mem := x0.Args[1]
6512 p := x0.Args[0]
6513 s0 := o0_1
6514 if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 16 {
6515 continue
6516 }
6517 x1 := s0.Args[0]
6518 if x1.Op != Op386MOVBload {
6519 continue
6520 }
6521 i2 := auxIntToInt32(x1.AuxInt)
6522 if auxToSym(x1.Aux) != s {
6523 continue
6524 }
6525 _ = x1.Args[1]
6526 if p != x1.Args[0] || mem != x1.Args[1] {
6527 continue
6528 }
6529 s1 := v_1
6530 if s1.Op != Op386SHLLconst || auxIntToInt32(s1.AuxInt) != 24 {
6531 continue
6532 }
6533 x2 := s1.Args[0]
6534 if x2.Op != Op386MOVBload {
6535 continue
6536 }
6537 i3 := auxIntToInt32(x2.AuxInt)
6538 if auxToSym(x2.Aux) != s {
6539 continue
6540 }
6541 _ = x2.Args[1]
6542 if p != x2.Args[0] || mem != x2.Args[1] || !(i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && o0.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)) {
6543 continue
6544 }
6545 b = mergePoint(b, x0, x1, x2)
6546 v0 := b.NewValue0(x2.Pos, Op386MOVLload, typ.UInt32)
6547 v.copyOf(v0)
6548 v0.AuxInt = int32ToAuxInt(i0)
6549 v0.Aux = symToAux(s)
6550 v0.AddArg2(p, mem)
6551 return true
6552 }
6553 }
6554 break
6555 }
6556
6557
6558
6559 for {
6560 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6561 o0 := v_0
6562 if o0.Op != Op386ORL {
6563 continue
6564 }
6565 _ = o0.Args[1]
6566 o0_0 := o0.Args[0]
6567 o0_1 := o0.Args[1]
6568 for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
6569 x0 := o0_0
6570 if x0.Op != Op386MOVWload {
6571 continue
6572 }
6573 i := auxIntToInt32(x0.AuxInt)
6574 s := auxToSym(x0.Aux)
6575 mem := x0.Args[1]
6576 p0 := x0.Args[0]
6577 s0 := o0_1
6578 if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 16 {
6579 continue
6580 }
6581 x1 := s0.Args[0]
6582 if x1.Op != Op386MOVBload || auxIntToInt32(x1.AuxInt) != i || auxToSym(x1.Aux) != s {
6583 continue
6584 }
6585 _ = x1.Args[1]
6586 p1 := x1.Args[0]
6587 if mem != x1.Args[1] {
6588 continue
6589 }
6590 s1 := v_1
6591 if s1.Op != Op386SHLLconst || auxIntToInt32(s1.AuxInt) != 24 {
6592 continue
6593 }
6594 x2 := s1.Args[0]
6595 if x2.Op != Op386MOVBload || auxIntToInt32(x2.AuxInt) != i || auxToSym(x2.Aux) != s {
6596 continue
6597 }
6598 _ = x2.Args[1]
6599 p2 := x2.Args[0]
6600 if mem != x2.Args[1] || !(x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && o0.Uses == 1 && sequentialAddresses(p0, p1, 2) && sequentialAddresses(p1, p2, 1) && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)) {
6601 continue
6602 }
6603 b = mergePoint(b, x0, x1, x2)
6604 v0 := b.NewValue0(x2.Pos, Op386MOVLload, typ.UInt32)
6605 v.copyOf(v0)
6606 v0.AuxInt = int32ToAuxInt(i)
6607 v0.Aux = symToAux(s)
6608 v0.AddArg2(p0, mem)
6609 return true
6610 }
6611 }
6612 break
6613 }
6614 return false
6615 }
6616 func rewriteValue386_Op386ORLconst(v *Value) bool {
6617 v_0 := v.Args[0]
6618
6619
6620
6621 for {
6622 c := auxIntToInt32(v.AuxInt)
6623 x := v_0
6624 if !(c == 0) {
6625 break
6626 }
6627 v.copyOf(x)
6628 return true
6629 }
6630
6631
6632
6633 for {
6634 c := auxIntToInt32(v.AuxInt)
6635 if !(c == -1) {
6636 break
6637 }
6638 v.reset(Op386MOVLconst)
6639 v.AuxInt = int32ToAuxInt(-1)
6640 return true
6641 }
6642
6643
6644 for {
6645 c := auxIntToInt32(v.AuxInt)
6646 if v_0.Op != Op386MOVLconst {
6647 break
6648 }
6649 d := auxIntToInt32(v_0.AuxInt)
6650 v.reset(Op386MOVLconst)
6651 v.AuxInt = int32ToAuxInt(c | d)
6652 return true
6653 }
6654 return false
6655 }
6656 func rewriteValue386_Op386ORLconstmodify(v *Value) bool {
6657 v_1 := v.Args[1]
6658 v_0 := v.Args[0]
6659 b := v.Block
6660 config := b.Func.Config
6661
6662
6663
6664 for {
6665 valoff1 := auxIntToValAndOff(v.AuxInt)
6666 sym := auxToSym(v.Aux)
6667 if v_0.Op != Op386ADDLconst {
6668 break
6669 }
6670 off2 := auxIntToInt32(v_0.AuxInt)
6671 base := v_0.Args[0]
6672 mem := v_1
6673 if !(valoff1.canAdd32(off2)) {
6674 break
6675 }
6676 v.reset(Op386ORLconstmodify)
6677 v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
6678 v.Aux = symToAux(sym)
6679 v.AddArg2(base, mem)
6680 return true
6681 }
6682
6683
6684
6685 for {
6686 valoff1 := auxIntToValAndOff(v.AuxInt)
6687 sym1 := auxToSym(v.Aux)
6688 if v_0.Op != Op386LEAL {
6689 break
6690 }
6691 off2 := auxIntToInt32(v_0.AuxInt)
6692 sym2 := auxToSym(v_0.Aux)
6693 base := v_0.Args[0]
6694 mem := v_1
6695 if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
6696 break
6697 }
6698 v.reset(Op386ORLconstmodify)
6699 v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
6700 v.Aux = symToAux(mergeSym(sym1, sym2))
6701 v.AddArg2(base, mem)
6702 return true
6703 }
6704 return false
6705 }
6706 func rewriteValue386_Op386ORLload(v *Value) bool {
6707 v_2 := v.Args[2]
6708 v_1 := v.Args[1]
6709 v_0 := v.Args[0]
6710 b := v.Block
6711 config := b.Func.Config
6712
6713
6714
6715 for {
6716 off1 := auxIntToInt32(v.AuxInt)
6717 sym := auxToSym(v.Aux)
6718 val := v_0
6719 if v_1.Op != Op386ADDLconst {
6720 break
6721 }
6722 off2 := auxIntToInt32(v_1.AuxInt)
6723 base := v_1.Args[0]
6724 mem := v_2
6725 if !(is32Bit(int64(off1) + int64(off2))) {
6726 break
6727 }
6728 v.reset(Op386ORLload)
6729 v.AuxInt = int32ToAuxInt(off1 + off2)
6730 v.Aux = symToAux(sym)
6731 v.AddArg3(val, base, mem)
6732 return true
6733 }
6734
6735
6736
6737 for {
6738 off1 := auxIntToInt32(v.AuxInt)
6739 sym1 := auxToSym(v.Aux)
6740 val := v_0
6741 if v_1.Op != Op386LEAL {
6742 break
6743 }
6744 off2 := auxIntToInt32(v_1.AuxInt)
6745 sym2 := auxToSym(v_1.Aux)
6746 base := v_1.Args[0]
6747 mem := v_2
6748 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
6749 break
6750 }
6751 v.reset(Op386ORLload)
6752 v.AuxInt = int32ToAuxInt(off1 + off2)
6753 v.Aux = symToAux(mergeSym(sym1, sym2))
6754 v.AddArg3(val, base, mem)
6755 return true
6756 }
6757 return false
6758 }
6759 func rewriteValue386_Op386ORLmodify(v *Value) bool {
6760 v_2 := v.Args[2]
6761 v_1 := v.Args[1]
6762 v_0 := v.Args[0]
6763 b := v.Block
6764 config := b.Func.Config
6765
6766
6767
6768 for {
6769 off1 := auxIntToInt32(v.AuxInt)
6770 sym := auxToSym(v.Aux)
6771 if v_0.Op != Op386ADDLconst {
6772 break
6773 }
6774 off2 := auxIntToInt32(v_0.AuxInt)
6775 base := v_0.Args[0]
6776 val := v_1
6777 mem := v_2
6778 if !(is32Bit(int64(off1) + int64(off2))) {
6779 break
6780 }
6781 v.reset(Op386ORLmodify)
6782 v.AuxInt = int32ToAuxInt(off1 + off2)
6783 v.Aux = symToAux(sym)
6784 v.AddArg3(base, val, mem)
6785 return true
6786 }
6787
6788
6789
6790 for {
6791 off1 := auxIntToInt32(v.AuxInt)
6792 sym1 := auxToSym(v.Aux)
6793 if v_0.Op != Op386LEAL {
6794 break
6795 }
6796 off2 := auxIntToInt32(v_0.AuxInt)
6797 sym2 := auxToSym(v_0.Aux)
6798 base := v_0.Args[0]
6799 val := v_1
6800 mem := v_2
6801 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
6802 break
6803 }
6804 v.reset(Op386ORLmodify)
6805 v.AuxInt = int32ToAuxInt(off1 + off2)
6806 v.Aux = symToAux(mergeSym(sym1, sym2))
6807 v.AddArg3(base, val, mem)
6808 return true
6809 }
6810 return false
6811 }
6812 func rewriteValue386_Op386ROLBconst(v *Value) bool {
6813 v_0 := v.Args[0]
6814
6815
6816 for {
6817 c := auxIntToInt8(v.AuxInt)
6818 if v_0.Op != Op386ROLBconst {
6819 break
6820 }
6821 d := auxIntToInt8(v_0.AuxInt)
6822 x := v_0.Args[0]
6823 v.reset(Op386ROLBconst)
6824 v.AuxInt = int8ToAuxInt((c + d) & 7)
6825 v.AddArg(x)
6826 return true
6827 }
6828
6829
6830 for {
6831 if auxIntToInt8(v.AuxInt) != 0 {
6832 break
6833 }
6834 x := v_0
6835 v.copyOf(x)
6836 return true
6837 }
6838 return false
6839 }
6840 func rewriteValue386_Op386ROLLconst(v *Value) bool {
6841 v_0 := v.Args[0]
6842
6843
6844 for {
6845 c := auxIntToInt32(v.AuxInt)
6846 if v_0.Op != Op386ROLLconst {
6847 break
6848 }
6849 d := auxIntToInt32(v_0.AuxInt)
6850 x := v_0.Args[0]
6851 v.reset(Op386ROLLconst)
6852 v.AuxInt = int32ToAuxInt((c + d) & 31)
6853 v.AddArg(x)
6854 return true
6855 }
6856
6857
6858 for {
6859 if auxIntToInt32(v.AuxInt) != 0 {
6860 break
6861 }
6862 x := v_0
6863 v.copyOf(x)
6864 return true
6865 }
6866 return false
6867 }
6868 func rewriteValue386_Op386ROLWconst(v *Value) bool {
6869 v_0 := v.Args[0]
6870
6871
6872 for {
6873 c := auxIntToInt16(v.AuxInt)
6874 if v_0.Op != Op386ROLWconst {
6875 break
6876 }
6877 d := auxIntToInt16(v_0.AuxInt)
6878 x := v_0.Args[0]
6879 v.reset(Op386ROLWconst)
6880 v.AuxInt = int16ToAuxInt((c + d) & 15)
6881 v.AddArg(x)
6882 return true
6883 }
6884
6885
6886 for {
6887 if auxIntToInt16(v.AuxInt) != 0 {
6888 break
6889 }
6890 x := v_0
6891 v.copyOf(x)
6892 return true
6893 }
6894 return false
6895 }
6896 func rewriteValue386_Op386SARB(v *Value) bool {
6897 v_1 := v.Args[1]
6898 v_0 := v.Args[0]
6899
6900
6901 for {
6902 x := v_0
6903 if v_1.Op != Op386MOVLconst {
6904 break
6905 }
6906 c := auxIntToInt32(v_1.AuxInt)
6907 v.reset(Op386SARBconst)
6908 v.AuxInt = int8ToAuxInt(int8(min(int64(c&31), 7)))
6909 v.AddArg(x)
6910 return true
6911 }
6912 return false
6913 }
6914 func rewriteValue386_Op386SARBconst(v *Value) bool {
6915 v_0 := v.Args[0]
6916
6917
6918 for {
6919 if auxIntToInt8(v.AuxInt) != 0 {
6920 break
6921 }
6922 x := v_0
6923 v.copyOf(x)
6924 return true
6925 }
6926
6927
6928 for {
6929 c := auxIntToInt8(v.AuxInt)
6930 if v_0.Op != Op386MOVLconst {
6931 break
6932 }
6933 d := auxIntToInt32(v_0.AuxInt)
6934 v.reset(Op386MOVLconst)
6935 v.AuxInt = int32ToAuxInt(d >> uint64(c))
6936 return true
6937 }
6938 return false
6939 }
6940 func rewriteValue386_Op386SARL(v *Value) bool {
6941 v_1 := v.Args[1]
6942 v_0 := v.Args[0]
6943
6944
6945 for {
6946 x := v_0
6947 if v_1.Op != Op386MOVLconst {
6948 break
6949 }
6950 c := auxIntToInt32(v_1.AuxInt)
6951 v.reset(Op386SARLconst)
6952 v.AuxInt = int32ToAuxInt(c & 31)
6953 v.AddArg(x)
6954 return true
6955 }
6956
6957
6958 for {
6959 x := v_0
6960 if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
6961 break
6962 }
6963 y := v_1.Args[0]
6964 v.reset(Op386SARL)
6965 v.AddArg2(x, y)
6966 return true
6967 }
6968 return false
6969 }
6970 func rewriteValue386_Op386SARLconst(v *Value) bool {
6971 v_0 := v.Args[0]
6972
6973
6974 for {
6975 if auxIntToInt32(v.AuxInt) != 0 {
6976 break
6977 }
6978 x := v_0
6979 v.copyOf(x)
6980 return true
6981 }
6982
6983
6984 for {
6985 c := auxIntToInt32(v.AuxInt)
6986 if v_0.Op != Op386MOVLconst {
6987 break
6988 }
6989 d := auxIntToInt32(v_0.AuxInt)
6990 v.reset(Op386MOVLconst)
6991 v.AuxInt = int32ToAuxInt(d >> uint64(c))
6992 return true
6993 }
6994 return false
6995 }
6996 func rewriteValue386_Op386SARW(v *Value) bool {
6997 v_1 := v.Args[1]
6998 v_0 := v.Args[0]
6999
7000
7001 for {
7002 x := v_0
7003 if v_1.Op != Op386MOVLconst {
7004 break
7005 }
7006 c := auxIntToInt32(v_1.AuxInt)
7007 v.reset(Op386SARWconst)
7008 v.AuxInt = int16ToAuxInt(int16(min(int64(c&31), 15)))
7009 v.AddArg(x)
7010 return true
7011 }
7012 return false
7013 }
7014 func rewriteValue386_Op386SARWconst(v *Value) bool {
7015 v_0 := v.Args[0]
7016
7017
7018 for {
7019 if auxIntToInt16(v.AuxInt) != 0 {
7020 break
7021 }
7022 x := v_0
7023 v.copyOf(x)
7024 return true
7025 }
7026
7027
7028 for {
7029 c := auxIntToInt16(v.AuxInt)
7030 if v_0.Op != Op386MOVLconst {
7031 break
7032 }
7033 d := auxIntToInt32(v_0.AuxInt)
7034 v.reset(Op386MOVLconst)
7035 v.AuxInt = int32ToAuxInt(d >> uint64(c))
7036 return true
7037 }
7038 return false
7039 }
7040 func rewriteValue386_Op386SBBL(v *Value) bool {
7041 v_2 := v.Args[2]
7042 v_1 := v.Args[1]
7043 v_0 := v.Args[0]
7044
7045
7046 for {
7047 x := v_0
7048 if v_1.Op != Op386MOVLconst {
7049 break
7050 }
7051 c := auxIntToInt32(v_1.AuxInt)
7052 f := v_2
7053 v.reset(Op386SBBLconst)
7054 v.AuxInt = int32ToAuxInt(c)
7055 v.AddArg2(x, f)
7056 return true
7057 }
7058 return false
7059 }
7060 func rewriteValue386_Op386SBBLcarrymask(v *Value) bool {
7061 v_0 := v.Args[0]
7062
7063
7064 for {
7065 if v_0.Op != Op386FlagEQ {
7066 break
7067 }
7068 v.reset(Op386MOVLconst)
7069 v.AuxInt = int32ToAuxInt(0)
7070 return true
7071 }
7072
7073
7074 for {
7075 if v_0.Op != Op386FlagLT_ULT {
7076 break
7077 }
7078 v.reset(Op386MOVLconst)
7079 v.AuxInt = int32ToAuxInt(-1)
7080 return true
7081 }
7082
7083
7084 for {
7085 if v_0.Op != Op386FlagLT_UGT {
7086 break
7087 }
7088 v.reset(Op386MOVLconst)
7089 v.AuxInt = int32ToAuxInt(0)
7090 return true
7091 }
7092
7093
7094 for {
7095 if v_0.Op != Op386FlagGT_ULT {
7096 break
7097 }
7098 v.reset(Op386MOVLconst)
7099 v.AuxInt = int32ToAuxInt(-1)
7100 return true
7101 }
7102
7103
7104 for {
7105 if v_0.Op != Op386FlagGT_UGT {
7106 break
7107 }
7108 v.reset(Op386MOVLconst)
7109 v.AuxInt = int32ToAuxInt(0)
7110 return true
7111 }
7112 return false
7113 }
7114 func rewriteValue386_Op386SETA(v *Value) bool {
7115 v_0 := v.Args[0]
7116
7117
7118 for {
7119 if v_0.Op != Op386InvertFlags {
7120 break
7121 }
7122 x := v_0.Args[0]
7123 v.reset(Op386SETB)
7124 v.AddArg(x)
7125 return true
7126 }
7127
7128
7129 for {
7130 if v_0.Op != Op386FlagEQ {
7131 break
7132 }
7133 v.reset(Op386MOVLconst)
7134 v.AuxInt = int32ToAuxInt(0)
7135 return true
7136 }
7137
7138
7139 for {
7140 if v_0.Op != Op386FlagLT_ULT {
7141 break
7142 }
7143 v.reset(Op386MOVLconst)
7144 v.AuxInt = int32ToAuxInt(0)
7145 return true
7146 }
7147
7148
7149 for {
7150 if v_0.Op != Op386FlagLT_UGT {
7151 break
7152 }
7153 v.reset(Op386MOVLconst)
7154 v.AuxInt = int32ToAuxInt(1)
7155 return true
7156 }
7157
7158
7159 for {
7160 if v_0.Op != Op386FlagGT_ULT {
7161 break
7162 }
7163 v.reset(Op386MOVLconst)
7164 v.AuxInt = int32ToAuxInt(0)
7165 return true
7166 }
7167
7168
7169 for {
7170 if v_0.Op != Op386FlagGT_UGT {
7171 break
7172 }
7173 v.reset(Op386MOVLconst)
7174 v.AuxInt = int32ToAuxInt(1)
7175 return true
7176 }
7177 return false
7178 }
7179 func rewriteValue386_Op386SETAE(v *Value) bool {
7180 v_0 := v.Args[0]
7181
7182
7183 for {
7184 if v_0.Op != Op386InvertFlags {
7185 break
7186 }
7187 x := v_0.Args[0]
7188 v.reset(Op386SETBE)
7189 v.AddArg(x)
7190 return true
7191 }
7192
7193
7194 for {
7195 if v_0.Op != Op386FlagEQ {
7196 break
7197 }
7198 v.reset(Op386MOVLconst)
7199 v.AuxInt = int32ToAuxInt(1)
7200 return true
7201 }
7202
7203
7204 for {
7205 if v_0.Op != Op386FlagLT_ULT {
7206 break
7207 }
7208 v.reset(Op386MOVLconst)
7209 v.AuxInt = int32ToAuxInt(0)
7210 return true
7211 }
7212
7213
7214 for {
7215 if v_0.Op != Op386FlagLT_UGT {
7216 break
7217 }
7218 v.reset(Op386MOVLconst)
7219 v.AuxInt = int32ToAuxInt(1)
7220 return true
7221 }
7222
7223
7224 for {
7225 if v_0.Op != Op386FlagGT_ULT {
7226 break
7227 }
7228 v.reset(Op386MOVLconst)
7229 v.AuxInt = int32ToAuxInt(0)
7230 return true
7231 }
7232
7233
7234 for {
7235 if v_0.Op != Op386FlagGT_UGT {
7236 break
7237 }
7238 v.reset(Op386MOVLconst)
7239 v.AuxInt = int32ToAuxInt(1)
7240 return true
7241 }
7242 return false
7243 }
7244 func rewriteValue386_Op386SETB(v *Value) bool {
7245 v_0 := v.Args[0]
7246
7247
7248 for {
7249 if v_0.Op != Op386InvertFlags {
7250 break
7251 }
7252 x := v_0.Args[0]
7253 v.reset(Op386SETA)
7254 v.AddArg(x)
7255 return true
7256 }
7257
7258
7259 for {
7260 if v_0.Op != Op386FlagEQ {
7261 break
7262 }
7263 v.reset(Op386MOVLconst)
7264 v.AuxInt = int32ToAuxInt(0)
7265 return true
7266 }
7267
7268
7269 for {
7270 if v_0.Op != Op386FlagLT_ULT {
7271 break
7272 }
7273 v.reset(Op386MOVLconst)
7274 v.AuxInt = int32ToAuxInt(1)
7275 return true
7276 }
7277
7278
7279 for {
7280 if v_0.Op != Op386FlagLT_UGT {
7281 break
7282 }
7283 v.reset(Op386MOVLconst)
7284 v.AuxInt = int32ToAuxInt(0)
7285 return true
7286 }
7287
7288
7289 for {
7290 if v_0.Op != Op386FlagGT_ULT {
7291 break
7292 }
7293 v.reset(Op386MOVLconst)
7294 v.AuxInt = int32ToAuxInt(1)
7295 return true
7296 }
7297
7298
7299 for {
7300 if v_0.Op != Op386FlagGT_UGT {
7301 break
7302 }
7303 v.reset(Op386MOVLconst)
7304 v.AuxInt = int32ToAuxInt(0)
7305 return true
7306 }
7307 return false
7308 }
7309 func rewriteValue386_Op386SETBE(v *Value) bool {
7310 v_0 := v.Args[0]
7311
7312
7313 for {
7314 if v_0.Op != Op386InvertFlags {
7315 break
7316 }
7317 x := v_0.Args[0]
7318 v.reset(Op386SETAE)
7319 v.AddArg(x)
7320 return true
7321 }
7322
7323
7324 for {
7325 if v_0.Op != Op386FlagEQ {
7326 break
7327 }
7328 v.reset(Op386MOVLconst)
7329 v.AuxInt = int32ToAuxInt(1)
7330 return true
7331 }
7332
7333
7334 for {
7335 if v_0.Op != Op386FlagLT_ULT {
7336 break
7337 }
7338 v.reset(Op386MOVLconst)
7339 v.AuxInt = int32ToAuxInt(1)
7340 return true
7341 }
7342
7343
7344 for {
7345 if v_0.Op != Op386FlagLT_UGT {
7346 break
7347 }
7348 v.reset(Op386MOVLconst)
7349 v.AuxInt = int32ToAuxInt(0)
7350 return true
7351 }
7352
7353
7354 for {
7355 if v_0.Op != Op386FlagGT_ULT {
7356 break
7357 }
7358 v.reset(Op386MOVLconst)
7359 v.AuxInt = int32ToAuxInt(1)
7360 return true
7361 }
7362
7363
7364 for {
7365 if v_0.Op != Op386FlagGT_UGT {
7366 break
7367 }
7368 v.reset(Op386MOVLconst)
7369 v.AuxInt = int32ToAuxInt(0)
7370 return true
7371 }
7372 return false
7373 }
7374 func rewriteValue386_Op386SETEQ(v *Value) bool {
7375 v_0 := v.Args[0]
7376
7377
7378 for {
7379 if v_0.Op != Op386InvertFlags {
7380 break
7381 }
7382 x := v_0.Args[0]
7383 v.reset(Op386SETEQ)
7384 v.AddArg(x)
7385 return true
7386 }
7387
7388
7389 for {
7390 if v_0.Op != Op386FlagEQ {
7391 break
7392 }
7393 v.reset(Op386MOVLconst)
7394 v.AuxInt = int32ToAuxInt(1)
7395 return true
7396 }
7397
7398
7399 for {
7400 if v_0.Op != Op386FlagLT_ULT {
7401 break
7402 }
7403 v.reset(Op386MOVLconst)
7404 v.AuxInt = int32ToAuxInt(0)
7405 return true
7406 }
7407
7408
7409 for {
7410 if v_0.Op != Op386FlagLT_UGT {
7411 break
7412 }
7413 v.reset(Op386MOVLconst)
7414 v.AuxInt = int32ToAuxInt(0)
7415 return true
7416 }
7417
7418
7419 for {
7420 if v_0.Op != Op386FlagGT_ULT {
7421 break
7422 }
7423 v.reset(Op386MOVLconst)
7424 v.AuxInt = int32ToAuxInt(0)
7425 return true
7426 }
7427
7428
7429 for {
7430 if v_0.Op != Op386FlagGT_UGT {
7431 break
7432 }
7433 v.reset(Op386MOVLconst)
7434 v.AuxInt = int32ToAuxInt(0)
7435 return true
7436 }
7437 return false
7438 }
7439 func rewriteValue386_Op386SETG(v *Value) bool {
7440 v_0 := v.Args[0]
7441
7442
7443 for {
7444 if v_0.Op != Op386InvertFlags {
7445 break
7446 }
7447 x := v_0.Args[0]
7448 v.reset(Op386SETL)
7449 v.AddArg(x)
7450 return true
7451 }
7452
7453
7454 for {
7455 if v_0.Op != Op386FlagEQ {
7456 break
7457 }
7458 v.reset(Op386MOVLconst)
7459 v.AuxInt = int32ToAuxInt(0)
7460 return true
7461 }
7462
7463
7464 for {
7465 if v_0.Op != Op386FlagLT_ULT {
7466 break
7467 }
7468 v.reset(Op386MOVLconst)
7469 v.AuxInt = int32ToAuxInt(0)
7470 return true
7471 }
7472
7473
7474 for {
7475 if v_0.Op != Op386FlagLT_UGT {
7476 break
7477 }
7478 v.reset(Op386MOVLconst)
7479 v.AuxInt = int32ToAuxInt(0)
7480 return true
7481 }
7482
7483
7484 for {
7485 if v_0.Op != Op386FlagGT_ULT {
7486 break
7487 }
7488 v.reset(Op386MOVLconst)
7489 v.AuxInt = int32ToAuxInt(1)
7490 return true
7491 }
7492
7493
7494 for {
7495 if v_0.Op != Op386FlagGT_UGT {
7496 break
7497 }
7498 v.reset(Op386MOVLconst)
7499 v.AuxInt = int32ToAuxInt(1)
7500 return true
7501 }
7502 return false
7503 }
7504 func rewriteValue386_Op386SETGE(v *Value) bool {
7505 v_0 := v.Args[0]
7506
7507
7508 for {
7509 if v_0.Op != Op386InvertFlags {
7510 break
7511 }
7512 x := v_0.Args[0]
7513 v.reset(Op386SETLE)
7514 v.AddArg(x)
7515 return true
7516 }
7517
7518
7519 for {
7520 if v_0.Op != Op386FlagEQ {
7521 break
7522 }
7523 v.reset(Op386MOVLconst)
7524 v.AuxInt = int32ToAuxInt(1)
7525 return true
7526 }
7527
7528
7529 for {
7530 if v_0.Op != Op386FlagLT_ULT {
7531 break
7532 }
7533 v.reset(Op386MOVLconst)
7534 v.AuxInt = int32ToAuxInt(0)
7535 return true
7536 }
7537
7538
7539 for {
7540 if v_0.Op != Op386FlagLT_UGT {
7541 break
7542 }
7543 v.reset(Op386MOVLconst)
7544 v.AuxInt = int32ToAuxInt(0)
7545 return true
7546 }
7547
7548
7549 for {
7550 if v_0.Op != Op386FlagGT_ULT {
7551 break
7552 }
7553 v.reset(Op386MOVLconst)
7554 v.AuxInt = int32ToAuxInt(1)
7555 return true
7556 }
7557
7558
7559 for {
7560 if v_0.Op != Op386FlagGT_UGT {
7561 break
7562 }
7563 v.reset(Op386MOVLconst)
7564 v.AuxInt = int32ToAuxInt(1)
7565 return true
7566 }
7567 return false
7568 }
7569 func rewriteValue386_Op386SETL(v *Value) bool {
7570 v_0 := v.Args[0]
7571
7572
7573 for {
7574 if v_0.Op != Op386InvertFlags {
7575 break
7576 }
7577 x := v_0.Args[0]
7578 v.reset(Op386SETG)
7579 v.AddArg(x)
7580 return true
7581 }
7582
7583
7584 for {
7585 if v_0.Op != Op386FlagEQ {
7586 break
7587 }
7588 v.reset(Op386MOVLconst)
7589 v.AuxInt = int32ToAuxInt(0)
7590 return true
7591 }
7592
7593
7594 for {
7595 if v_0.Op != Op386FlagLT_ULT {
7596 break
7597 }
7598 v.reset(Op386MOVLconst)
7599 v.AuxInt = int32ToAuxInt(1)
7600 return true
7601 }
7602
7603
7604 for {
7605 if v_0.Op != Op386FlagLT_UGT {
7606 break
7607 }
7608 v.reset(Op386MOVLconst)
7609 v.AuxInt = int32ToAuxInt(1)
7610 return true
7611 }
7612
7613
7614 for {
7615 if v_0.Op != Op386FlagGT_ULT {
7616 break
7617 }
7618 v.reset(Op386MOVLconst)
7619 v.AuxInt = int32ToAuxInt(0)
7620 return true
7621 }
7622
7623
7624 for {
7625 if v_0.Op != Op386FlagGT_UGT {
7626 break
7627 }
7628 v.reset(Op386MOVLconst)
7629 v.AuxInt = int32ToAuxInt(0)
7630 return true
7631 }
7632 return false
7633 }
7634 func rewriteValue386_Op386SETLE(v *Value) bool {
7635 v_0 := v.Args[0]
7636
7637
7638 for {
7639 if v_0.Op != Op386InvertFlags {
7640 break
7641 }
7642 x := v_0.Args[0]
7643 v.reset(Op386SETGE)
7644 v.AddArg(x)
7645 return true
7646 }
7647
7648
7649 for {
7650 if v_0.Op != Op386FlagEQ {
7651 break
7652 }
7653 v.reset(Op386MOVLconst)
7654 v.AuxInt = int32ToAuxInt(1)
7655 return true
7656 }
7657
7658
7659 for {
7660 if v_0.Op != Op386FlagLT_ULT {
7661 break
7662 }
7663 v.reset(Op386MOVLconst)
7664 v.AuxInt = int32ToAuxInt(1)
7665 return true
7666 }
7667
7668
7669 for {
7670 if v_0.Op != Op386FlagLT_UGT {
7671 break
7672 }
7673 v.reset(Op386MOVLconst)
7674 v.AuxInt = int32ToAuxInt(1)
7675 return true
7676 }
7677
7678
7679 for {
7680 if v_0.Op != Op386FlagGT_ULT {
7681 break
7682 }
7683 v.reset(Op386MOVLconst)
7684 v.AuxInt = int32ToAuxInt(0)
7685 return true
7686 }
7687
7688
7689 for {
7690 if v_0.Op != Op386FlagGT_UGT {
7691 break
7692 }
7693 v.reset(Op386MOVLconst)
7694 v.AuxInt = int32ToAuxInt(0)
7695 return true
7696 }
7697 return false
7698 }
7699 func rewriteValue386_Op386SETNE(v *Value) bool {
7700 v_0 := v.Args[0]
7701
7702
7703 for {
7704 if v_0.Op != Op386InvertFlags {
7705 break
7706 }
7707 x := v_0.Args[0]
7708 v.reset(Op386SETNE)
7709 v.AddArg(x)
7710 return true
7711 }
7712
7713
7714 for {
7715 if v_0.Op != Op386FlagEQ {
7716 break
7717 }
7718 v.reset(Op386MOVLconst)
7719 v.AuxInt = int32ToAuxInt(0)
7720 return true
7721 }
7722
7723
7724 for {
7725 if v_0.Op != Op386FlagLT_ULT {
7726 break
7727 }
7728 v.reset(Op386MOVLconst)
7729 v.AuxInt = int32ToAuxInt(1)
7730 return true
7731 }
7732
7733
7734 for {
7735 if v_0.Op != Op386FlagLT_UGT {
7736 break
7737 }
7738 v.reset(Op386MOVLconst)
7739 v.AuxInt = int32ToAuxInt(1)
7740 return true
7741 }
7742
7743
7744 for {
7745 if v_0.Op != Op386FlagGT_ULT {
7746 break
7747 }
7748 v.reset(Op386MOVLconst)
7749 v.AuxInt = int32ToAuxInt(1)
7750 return true
7751 }
7752
7753
7754 for {
7755 if v_0.Op != Op386FlagGT_UGT {
7756 break
7757 }
7758 v.reset(Op386MOVLconst)
7759 v.AuxInt = int32ToAuxInt(1)
7760 return true
7761 }
7762 return false
7763 }
7764 func rewriteValue386_Op386SHLL(v *Value) bool {
7765 v_1 := v.Args[1]
7766 v_0 := v.Args[0]
7767
7768
7769 for {
7770 x := v_0
7771 if v_1.Op != Op386MOVLconst {
7772 break
7773 }
7774 c := auxIntToInt32(v_1.AuxInt)
7775 v.reset(Op386SHLLconst)
7776 v.AuxInt = int32ToAuxInt(c & 31)
7777 v.AddArg(x)
7778 return true
7779 }
7780
7781
7782 for {
7783 x := v_0
7784 if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
7785 break
7786 }
7787 y := v_1.Args[0]
7788 v.reset(Op386SHLL)
7789 v.AddArg2(x, y)
7790 return true
7791 }
7792 return false
7793 }
7794 func rewriteValue386_Op386SHLLconst(v *Value) bool {
7795 v_0 := v.Args[0]
7796
7797
7798 for {
7799 if auxIntToInt32(v.AuxInt) != 0 {
7800 break
7801 }
7802 x := v_0
7803 v.copyOf(x)
7804 return true
7805 }
7806 return false
7807 }
7808 func rewriteValue386_Op386SHRB(v *Value) bool {
7809 v_1 := v.Args[1]
7810 v_0 := v.Args[0]
7811
7812
7813
7814 for {
7815 x := v_0
7816 if v_1.Op != Op386MOVLconst {
7817 break
7818 }
7819 c := auxIntToInt32(v_1.AuxInt)
7820 if !(c&31 < 8) {
7821 break
7822 }
7823 v.reset(Op386SHRBconst)
7824 v.AuxInt = int8ToAuxInt(int8(c & 31))
7825 v.AddArg(x)
7826 return true
7827 }
7828
7829
7830
7831 for {
7832 if v_1.Op != Op386MOVLconst {
7833 break
7834 }
7835 c := auxIntToInt32(v_1.AuxInt)
7836 if !(c&31 >= 8) {
7837 break
7838 }
7839 v.reset(Op386MOVLconst)
7840 v.AuxInt = int32ToAuxInt(0)
7841 return true
7842 }
7843 return false
7844 }
7845 func rewriteValue386_Op386SHRBconst(v *Value) bool {
7846 v_0 := v.Args[0]
7847
7848
7849 for {
7850 if auxIntToInt8(v.AuxInt) != 0 {
7851 break
7852 }
7853 x := v_0
7854 v.copyOf(x)
7855 return true
7856 }
7857 return false
7858 }
7859 func rewriteValue386_Op386SHRL(v *Value) bool {
7860 v_1 := v.Args[1]
7861 v_0 := v.Args[0]
7862
7863
7864 for {
7865 x := v_0
7866 if v_1.Op != Op386MOVLconst {
7867 break
7868 }
7869 c := auxIntToInt32(v_1.AuxInt)
7870 v.reset(Op386SHRLconst)
7871 v.AuxInt = int32ToAuxInt(c & 31)
7872 v.AddArg(x)
7873 return true
7874 }
7875
7876
7877 for {
7878 x := v_0
7879 if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
7880 break
7881 }
7882 y := v_1.Args[0]
7883 v.reset(Op386SHRL)
7884 v.AddArg2(x, y)
7885 return true
7886 }
7887 return false
7888 }
7889 func rewriteValue386_Op386SHRLconst(v *Value) bool {
7890 v_0 := v.Args[0]
7891
7892
7893 for {
7894 if auxIntToInt32(v.AuxInt) != 0 {
7895 break
7896 }
7897 x := v_0
7898 v.copyOf(x)
7899 return true
7900 }
7901 return false
7902 }
7903 func rewriteValue386_Op386SHRW(v *Value) bool {
7904 v_1 := v.Args[1]
7905 v_0 := v.Args[0]
7906
7907
7908
7909 for {
7910 x := v_0
7911 if v_1.Op != Op386MOVLconst {
7912 break
7913 }
7914 c := auxIntToInt32(v_1.AuxInt)
7915 if !(c&31 < 16) {
7916 break
7917 }
7918 v.reset(Op386SHRWconst)
7919 v.AuxInt = int16ToAuxInt(int16(c & 31))
7920 v.AddArg(x)
7921 return true
7922 }
7923
7924
7925
7926 for {
7927 if v_1.Op != Op386MOVLconst {
7928 break
7929 }
7930 c := auxIntToInt32(v_1.AuxInt)
7931 if !(c&31 >= 16) {
7932 break
7933 }
7934 v.reset(Op386MOVLconst)
7935 v.AuxInt = int32ToAuxInt(0)
7936 return true
7937 }
7938 return false
7939 }
7940 func rewriteValue386_Op386SHRWconst(v *Value) bool {
7941 v_0 := v.Args[0]
7942
7943
7944 for {
7945 if auxIntToInt16(v.AuxInt) != 0 {
7946 break
7947 }
7948 x := v_0
7949 v.copyOf(x)
7950 return true
7951 }
7952 return false
7953 }
7954 func rewriteValue386_Op386SUBL(v *Value) bool {
7955 v_1 := v.Args[1]
7956 v_0 := v.Args[0]
7957 b := v.Block
7958
7959
7960 for {
7961 x := v_0
7962 if v_1.Op != Op386MOVLconst {
7963 break
7964 }
7965 c := auxIntToInt32(v_1.AuxInt)
7966 v.reset(Op386SUBLconst)
7967 v.AuxInt = int32ToAuxInt(c)
7968 v.AddArg(x)
7969 return true
7970 }
7971
7972
7973 for {
7974 if v_0.Op != Op386MOVLconst {
7975 break
7976 }
7977 c := auxIntToInt32(v_0.AuxInt)
7978 x := v_1
7979 v.reset(Op386NEGL)
7980 v0 := b.NewValue0(v.Pos, Op386SUBLconst, v.Type)
7981 v0.AuxInt = int32ToAuxInt(c)
7982 v0.AddArg(x)
7983 v.AddArg(v0)
7984 return true
7985 }
7986
7987
7988
7989 for {
7990 x := v_0
7991 l := v_1
7992 if l.Op != Op386MOVLload {
7993 break
7994 }
7995 off := auxIntToInt32(l.AuxInt)
7996 sym := auxToSym(l.Aux)
7997 mem := l.Args[1]
7998 ptr := l.Args[0]
7999 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
8000 break
8001 }
8002 v.reset(Op386SUBLload)
8003 v.AuxInt = int32ToAuxInt(off)
8004 v.Aux = symToAux(sym)
8005 v.AddArg3(x, ptr, mem)
8006 return true
8007 }
8008
8009
8010 for {
8011 x := v_0
8012 if x != v_1 {
8013 break
8014 }
8015 v.reset(Op386MOVLconst)
8016 v.AuxInt = int32ToAuxInt(0)
8017 return true
8018 }
8019 return false
8020 }
8021 func rewriteValue386_Op386SUBLcarry(v *Value) bool {
8022 v_1 := v.Args[1]
8023 v_0 := v.Args[0]
8024
8025
8026 for {
8027 x := v_0
8028 if v_1.Op != Op386MOVLconst {
8029 break
8030 }
8031 c := auxIntToInt32(v_1.AuxInt)
8032 v.reset(Op386SUBLconstcarry)
8033 v.AuxInt = int32ToAuxInt(c)
8034 v.AddArg(x)
8035 return true
8036 }
8037 return false
8038 }
8039 func rewriteValue386_Op386SUBLconst(v *Value) bool {
8040 v_0 := v.Args[0]
8041
8042
8043
8044 for {
8045 c := auxIntToInt32(v.AuxInt)
8046 x := v_0
8047 if !(c == 0) {
8048 break
8049 }
8050 v.copyOf(x)
8051 return true
8052 }
8053
8054
8055 for {
8056 c := auxIntToInt32(v.AuxInt)
8057 x := v_0
8058 v.reset(Op386ADDLconst)
8059 v.AuxInt = int32ToAuxInt(-c)
8060 v.AddArg(x)
8061 return true
8062 }
8063 }
8064 func rewriteValue386_Op386SUBLload(v *Value) bool {
8065 v_2 := v.Args[2]
8066 v_1 := v.Args[1]
8067 v_0 := v.Args[0]
8068 b := v.Block
8069 config := b.Func.Config
8070
8071
8072
8073 for {
8074 off1 := auxIntToInt32(v.AuxInt)
8075 sym := auxToSym(v.Aux)
8076 val := v_0
8077 if v_1.Op != Op386ADDLconst {
8078 break
8079 }
8080 off2 := auxIntToInt32(v_1.AuxInt)
8081 base := v_1.Args[0]
8082 mem := v_2
8083 if !(is32Bit(int64(off1) + int64(off2))) {
8084 break
8085 }
8086 v.reset(Op386SUBLload)
8087 v.AuxInt = int32ToAuxInt(off1 + off2)
8088 v.Aux = symToAux(sym)
8089 v.AddArg3(val, base, mem)
8090 return true
8091 }
8092
8093
8094
8095 for {
8096 off1 := auxIntToInt32(v.AuxInt)
8097 sym1 := auxToSym(v.Aux)
8098 val := v_0
8099 if v_1.Op != Op386LEAL {
8100 break
8101 }
8102 off2 := auxIntToInt32(v_1.AuxInt)
8103 sym2 := auxToSym(v_1.Aux)
8104 base := v_1.Args[0]
8105 mem := v_2
8106 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
8107 break
8108 }
8109 v.reset(Op386SUBLload)
8110 v.AuxInt = int32ToAuxInt(off1 + off2)
8111 v.Aux = symToAux(mergeSym(sym1, sym2))
8112 v.AddArg3(val, base, mem)
8113 return true
8114 }
8115 return false
8116 }
8117 func rewriteValue386_Op386SUBLmodify(v *Value) bool {
8118 v_2 := v.Args[2]
8119 v_1 := v.Args[1]
8120 v_0 := v.Args[0]
8121 b := v.Block
8122 config := b.Func.Config
8123
8124
8125
8126 for {
8127 off1 := auxIntToInt32(v.AuxInt)
8128 sym := auxToSym(v.Aux)
8129 if v_0.Op != Op386ADDLconst {
8130 break
8131 }
8132 off2 := auxIntToInt32(v_0.AuxInt)
8133 base := v_0.Args[0]
8134 val := v_1
8135 mem := v_2
8136 if !(is32Bit(int64(off1) + int64(off2))) {
8137 break
8138 }
8139 v.reset(Op386SUBLmodify)
8140 v.AuxInt = int32ToAuxInt(off1 + off2)
8141 v.Aux = symToAux(sym)
8142 v.AddArg3(base, val, mem)
8143 return true
8144 }
8145
8146
8147
8148 for {
8149 off1 := auxIntToInt32(v.AuxInt)
8150 sym1 := auxToSym(v.Aux)
8151 if v_0.Op != Op386LEAL {
8152 break
8153 }
8154 off2 := auxIntToInt32(v_0.AuxInt)
8155 sym2 := auxToSym(v_0.Aux)
8156 base := v_0.Args[0]
8157 val := v_1
8158 mem := v_2
8159 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
8160 break
8161 }
8162 v.reset(Op386SUBLmodify)
8163 v.AuxInt = int32ToAuxInt(off1 + off2)
8164 v.Aux = symToAux(mergeSym(sym1, sym2))
8165 v.AddArg3(base, val, mem)
8166 return true
8167 }
8168 return false
8169 }
8170 func rewriteValue386_Op386SUBSD(v *Value) bool {
8171 v_1 := v.Args[1]
8172 v_0 := v.Args[0]
8173
8174
8175
8176 for {
8177 x := v_0
8178 l := v_1
8179 if l.Op != Op386MOVSDload {
8180 break
8181 }
8182 off := auxIntToInt32(l.AuxInt)
8183 sym := auxToSym(l.Aux)
8184 mem := l.Args[1]
8185 ptr := l.Args[0]
8186 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
8187 break
8188 }
8189 v.reset(Op386SUBSDload)
8190 v.AuxInt = int32ToAuxInt(off)
8191 v.Aux = symToAux(sym)
8192 v.AddArg3(x, ptr, mem)
8193 return true
8194 }
8195 return false
8196 }
8197 func rewriteValue386_Op386SUBSDload(v *Value) bool {
8198 v_2 := v.Args[2]
8199 v_1 := v.Args[1]
8200 v_0 := v.Args[0]
8201 b := v.Block
8202 config := b.Func.Config
8203
8204
8205
8206 for {
8207 off1 := auxIntToInt32(v.AuxInt)
8208 sym := auxToSym(v.Aux)
8209 val := v_0
8210 if v_1.Op != Op386ADDLconst {
8211 break
8212 }
8213 off2 := auxIntToInt32(v_1.AuxInt)
8214 base := v_1.Args[0]
8215 mem := v_2
8216 if !(is32Bit(int64(off1) + int64(off2))) {
8217 break
8218 }
8219 v.reset(Op386SUBSDload)
8220 v.AuxInt = int32ToAuxInt(off1 + off2)
8221 v.Aux = symToAux(sym)
8222 v.AddArg3(val, base, mem)
8223 return true
8224 }
8225
8226
8227
8228 for {
8229 off1 := auxIntToInt32(v.AuxInt)
8230 sym1 := auxToSym(v.Aux)
8231 val := v_0
8232 if v_1.Op != Op386LEAL {
8233 break
8234 }
8235 off2 := auxIntToInt32(v_1.AuxInt)
8236 sym2 := auxToSym(v_1.Aux)
8237 base := v_1.Args[0]
8238 mem := v_2
8239 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
8240 break
8241 }
8242 v.reset(Op386SUBSDload)
8243 v.AuxInt = int32ToAuxInt(off1 + off2)
8244 v.Aux = symToAux(mergeSym(sym1, sym2))
8245 v.AddArg3(val, base, mem)
8246 return true
8247 }
8248 return false
8249 }
8250 func rewriteValue386_Op386SUBSS(v *Value) bool {
8251 v_1 := v.Args[1]
8252 v_0 := v.Args[0]
8253
8254
8255
8256 for {
8257 x := v_0
8258 l := v_1
8259 if l.Op != Op386MOVSSload {
8260 break
8261 }
8262 off := auxIntToInt32(l.AuxInt)
8263 sym := auxToSym(l.Aux)
8264 mem := l.Args[1]
8265 ptr := l.Args[0]
8266 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
8267 break
8268 }
8269 v.reset(Op386SUBSSload)
8270 v.AuxInt = int32ToAuxInt(off)
8271 v.Aux = symToAux(sym)
8272 v.AddArg3(x, ptr, mem)
8273 return true
8274 }
8275 return false
8276 }
8277 func rewriteValue386_Op386SUBSSload(v *Value) bool {
8278 v_2 := v.Args[2]
8279 v_1 := v.Args[1]
8280 v_0 := v.Args[0]
8281 b := v.Block
8282 config := b.Func.Config
8283
8284
8285
8286 for {
8287 off1 := auxIntToInt32(v.AuxInt)
8288 sym := auxToSym(v.Aux)
8289 val := v_0
8290 if v_1.Op != Op386ADDLconst {
8291 break
8292 }
8293 off2 := auxIntToInt32(v_1.AuxInt)
8294 base := v_1.Args[0]
8295 mem := v_2
8296 if !(is32Bit(int64(off1) + int64(off2))) {
8297 break
8298 }
8299 v.reset(Op386SUBSSload)
8300 v.AuxInt = int32ToAuxInt(off1 + off2)
8301 v.Aux = symToAux(sym)
8302 v.AddArg3(val, base, mem)
8303 return true
8304 }
8305
8306
8307
8308 for {
8309 off1 := auxIntToInt32(v.AuxInt)
8310 sym1 := auxToSym(v.Aux)
8311 val := v_0
8312 if v_1.Op != Op386LEAL {
8313 break
8314 }
8315 off2 := auxIntToInt32(v_1.AuxInt)
8316 sym2 := auxToSym(v_1.Aux)
8317 base := v_1.Args[0]
8318 mem := v_2
8319 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
8320 break
8321 }
8322 v.reset(Op386SUBSSload)
8323 v.AuxInt = int32ToAuxInt(off1 + off2)
8324 v.Aux = symToAux(mergeSym(sym1, sym2))
8325 v.AddArg3(val, base, mem)
8326 return true
8327 }
8328 return false
8329 }
8330 func rewriteValue386_Op386XORL(v *Value) bool {
8331 v_1 := v.Args[1]
8332 v_0 := v.Args[0]
8333
8334
8335 for {
8336 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8337 x := v_0
8338 if v_1.Op != Op386MOVLconst {
8339 continue
8340 }
8341 c := auxIntToInt32(v_1.AuxInt)
8342 v.reset(Op386XORLconst)
8343 v.AuxInt = int32ToAuxInt(c)
8344 v.AddArg(x)
8345 return true
8346 }
8347 break
8348 }
8349
8350
8351
8352 for {
8353 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8354 if v_0.Op != Op386SHLLconst {
8355 continue
8356 }
8357 c := auxIntToInt32(v_0.AuxInt)
8358 x := v_0.Args[0]
8359 if v_1.Op != Op386SHRLconst {
8360 continue
8361 }
8362 d := auxIntToInt32(v_1.AuxInt)
8363 if x != v_1.Args[0] || !(d == 32-c) {
8364 continue
8365 }
8366 v.reset(Op386ROLLconst)
8367 v.AuxInt = int32ToAuxInt(c)
8368 v.AddArg(x)
8369 return true
8370 }
8371 break
8372 }
8373
8374
8375
8376 for {
8377 t := v.Type
8378 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8379 if v_0.Op != Op386SHLLconst {
8380 continue
8381 }
8382 c := auxIntToInt32(v_0.AuxInt)
8383 x := v_0.Args[0]
8384 if v_1.Op != Op386SHRWconst {
8385 continue
8386 }
8387 d := auxIntToInt16(v_1.AuxInt)
8388 if x != v_1.Args[0] || !(c < 16 && d == int16(16-c) && t.Size() == 2) {
8389 continue
8390 }
8391 v.reset(Op386ROLWconst)
8392 v.AuxInt = int16ToAuxInt(int16(c))
8393 v.AddArg(x)
8394 return true
8395 }
8396 break
8397 }
8398
8399
8400
8401 for {
8402 t := v.Type
8403 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8404 if v_0.Op != Op386SHLLconst {
8405 continue
8406 }
8407 c := auxIntToInt32(v_0.AuxInt)
8408 x := v_0.Args[0]
8409 if v_1.Op != Op386SHRBconst {
8410 continue
8411 }
8412 d := auxIntToInt8(v_1.AuxInt)
8413 if x != v_1.Args[0] || !(c < 8 && d == int8(8-c) && t.Size() == 1) {
8414 continue
8415 }
8416 v.reset(Op386ROLBconst)
8417 v.AuxInt = int8ToAuxInt(int8(c))
8418 v.AddArg(x)
8419 return true
8420 }
8421 break
8422 }
8423
8424
8425
8426 for {
8427 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8428 x := v_0
8429 l := v_1
8430 if l.Op != Op386MOVLload {
8431 continue
8432 }
8433 off := auxIntToInt32(l.AuxInt)
8434 sym := auxToSym(l.Aux)
8435 mem := l.Args[1]
8436 ptr := l.Args[0]
8437 if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
8438 continue
8439 }
8440 v.reset(Op386XORLload)
8441 v.AuxInt = int32ToAuxInt(off)
8442 v.Aux = symToAux(sym)
8443 v.AddArg3(x, ptr, mem)
8444 return true
8445 }
8446 break
8447 }
8448
8449
8450 for {
8451 x := v_0
8452 if x != v_1 {
8453 break
8454 }
8455 v.reset(Op386MOVLconst)
8456 v.AuxInt = int32ToAuxInt(0)
8457 return true
8458 }
8459 return false
8460 }
8461 func rewriteValue386_Op386XORLconst(v *Value) bool {
8462 v_0 := v.Args[0]
8463
8464
8465 for {
8466 c := auxIntToInt32(v.AuxInt)
8467 if v_0.Op != Op386XORLconst {
8468 break
8469 }
8470 d := auxIntToInt32(v_0.AuxInt)
8471 x := v_0.Args[0]
8472 v.reset(Op386XORLconst)
8473 v.AuxInt = int32ToAuxInt(c ^ d)
8474 v.AddArg(x)
8475 return true
8476 }
8477
8478
8479
8480 for {
8481 c := auxIntToInt32(v.AuxInt)
8482 x := v_0
8483 if !(c == 0) {
8484 break
8485 }
8486 v.copyOf(x)
8487 return true
8488 }
8489
8490
8491 for {
8492 c := auxIntToInt32(v.AuxInt)
8493 if v_0.Op != Op386MOVLconst {
8494 break
8495 }
8496 d := auxIntToInt32(v_0.AuxInt)
8497 v.reset(Op386MOVLconst)
8498 v.AuxInt = int32ToAuxInt(c ^ d)
8499 return true
8500 }
8501 return false
8502 }
8503 func rewriteValue386_Op386XORLconstmodify(v *Value) bool {
8504 v_1 := v.Args[1]
8505 v_0 := v.Args[0]
8506 b := v.Block
8507 config := b.Func.Config
8508
8509
8510
8511 for {
8512 valoff1 := auxIntToValAndOff(v.AuxInt)
8513 sym := auxToSym(v.Aux)
8514 if v_0.Op != Op386ADDLconst {
8515 break
8516 }
8517 off2 := auxIntToInt32(v_0.AuxInt)
8518 base := v_0.Args[0]
8519 mem := v_1
8520 if !(valoff1.canAdd32(off2)) {
8521 break
8522 }
8523 v.reset(Op386XORLconstmodify)
8524 v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
8525 v.Aux = symToAux(sym)
8526 v.AddArg2(base, mem)
8527 return true
8528 }
8529
8530
8531
8532 for {
8533 valoff1 := auxIntToValAndOff(v.AuxInt)
8534 sym1 := auxToSym(v.Aux)
8535 if v_0.Op != Op386LEAL {
8536 break
8537 }
8538 off2 := auxIntToInt32(v_0.AuxInt)
8539 sym2 := auxToSym(v_0.Aux)
8540 base := v_0.Args[0]
8541 mem := v_1
8542 if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
8543 break
8544 }
8545 v.reset(Op386XORLconstmodify)
8546 v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
8547 v.Aux = symToAux(mergeSym(sym1, sym2))
8548 v.AddArg2(base, mem)
8549 return true
8550 }
8551 return false
8552 }
8553 func rewriteValue386_Op386XORLload(v *Value) bool {
8554 v_2 := v.Args[2]
8555 v_1 := v.Args[1]
8556 v_0 := v.Args[0]
8557 b := v.Block
8558 config := b.Func.Config
8559
8560
8561
8562 for {
8563 off1 := auxIntToInt32(v.AuxInt)
8564 sym := auxToSym(v.Aux)
8565 val := v_0
8566 if v_1.Op != Op386ADDLconst {
8567 break
8568 }
8569 off2 := auxIntToInt32(v_1.AuxInt)
8570 base := v_1.Args[0]
8571 mem := v_2
8572 if !(is32Bit(int64(off1) + int64(off2))) {
8573 break
8574 }
8575 v.reset(Op386XORLload)
8576 v.AuxInt = int32ToAuxInt(off1 + off2)
8577 v.Aux = symToAux(sym)
8578 v.AddArg3(val, base, mem)
8579 return true
8580 }
8581
8582
8583
8584 for {
8585 off1 := auxIntToInt32(v.AuxInt)
8586 sym1 := auxToSym(v.Aux)
8587 val := v_0
8588 if v_1.Op != Op386LEAL {
8589 break
8590 }
8591 off2 := auxIntToInt32(v_1.AuxInt)
8592 sym2 := auxToSym(v_1.Aux)
8593 base := v_1.Args[0]
8594 mem := v_2
8595 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
8596 break
8597 }
8598 v.reset(Op386XORLload)
8599 v.AuxInt = int32ToAuxInt(off1 + off2)
8600 v.Aux = symToAux(mergeSym(sym1, sym2))
8601 v.AddArg3(val, base, mem)
8602 return true
8603 }
8604 return false
8605 }
8606 func rewriteValue386_Op386XORLmodify(v *Value) bool {
8607 v_2 := v.Args[2]
8608 v_1 := v.Args[1]
8609 v_0 := v.Args[0]
8610 b := v.Block
8611 config := b.Func.Config
8612
8613
8614
8615 for {
8616 off1 := auxIntToInt32(v.AuxInt)
8617 sym := auxToSym(v.Aux)
8618 if v_0.Op != Op386ADDLconst {
8619 break
8620 }
8621 off2 := auxIntToInt32(v_0.AuxInt)
8622 base := v_0.Args[0]
8623 val := v_1
8624 mem := v_2
8625 if !(is32Bit(int64(off1) + int64(off2))) {
8626 break
8627 }
8628 v.reset(Op386XORLmodify)
8629 v.AuxInt = int32ToAuxInt(off1 + off2)
8630 v.Aux = symToAux(sym)
8631 v.AddArg3(base, val, mem)
8632 return true
8633 }
8634
8635
8636
8637 for {
8638 off1 := auxIntToInt32(v.AuxInt)
8639 sym1 := auxToSym(v.Aux)
8640 if v_0.Op != Op386LEAL {
8641 break
8642 }
8643 off2 := auxIntToInt32(v_0.AuxInt)
8644 sym2 := auxToSym(v_0.Aux)
8645 base := v_0.Args[0]
8646 val := v_1
8647 mem := v_2
8648 if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
8649 break
8650 }
8651 v.reset(Op386XORLmodify)
8652 v.AuxInt = int32ToAuxInt(off1 + off2)
8653 v.Aux = symToAux(mergeSym(sym1, sym2))
8654 v.AddArg3(base, val, mem)
8655 return true
8656 }
8657 return false
8658 }
8659 func rewriteValue386_OpAddr(v *Value) bool {
8660 v_0 := v.Args[0]
8661
8662
8663 for {
8664 sym := auxToSym(v.Aux)
8665 base := v_0
8666 v.reset(Op386LEAL)
8667 v.Aux = symToAux(sym)
8668 v.AddArg(base)
8669 return true
8670 }
8671 }
8672 func rewriteValue386_OpConst16(v *Value) bool {
8673
8674
8675 for {
8676 c := auxIntToInt16(v.AuxInt)
8677 v.reset(Op386MOVLconst)
8678 v.AuxInt = int32ToAuxInt(int32(c))
8679 return true
8680 }
8681 }
8682 func rewriteValue386_OpConst8(v *Value) bool {
8683
8684
8685 for {
8686 c := auxIntToInt8(v.AuxInt)
8687 v.reset(Op386MOVLconst)
8688 v.AuxInt = int32ToAuxInt(int32(c))
8689 return true
8690 }
8691 }
8692 func rewriteValue386_OpConstBool(v *Value) bool {
8693
8694
8695 for {
8696 c := auxIntToBool(v.AuxInt)
8697 v.reset(Op386MOVLconst)
8698 v.AuxInt = int32ToAuxInt(b2i32(c))
8699 return true
8700 }
8701 }
8702 func rewriteValue386_OpConstNil(v *Value) bool {
8703
8704
8705 for {
8706 v.reset(Op386MOVLconst)
8707 v.AuxInt = int32ToAuxInt(0)
8708 return true
8709 }
8710 }
8711 func rewriteValue386_OpCtz16(v *Value) bool {
8712 v_0 := v.Args[0]
8713 b := v.Block
8714 typ := &b.Func.Config.Types
8715
8716
8717 for {
8718 x := v_0
8719 v.reset(Op386BSFL)
8720 v0 := b.NewValue0(v.Pos, Op386ORLconst, typ.UInt32)
8721 v0.AuxInt = int32ToAuxInt(0x10000)
8722 v0.AddArg(x)
8723 v.AddArg(v0)
8724 return true
8725 }
8726 }
8727 func rewriteValue386_OpDiv8(v *Value) bool {
8728 v_1 := v.Args[1]
8729 v_0 := v.Args[0]
8730 b := v.Block
8731 typ := &b.Func.Config.Types
8732
8733
8734 for {
8735 x := v_0
8736 y := v_1
8737 v.reset(Op386DIVW)
8738 v0 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
8739 v0.AddArg(x)
8740 v1 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
8741 v1.AddArg(y)
8742 v.AddArg2(v0, v1)
8743 return true
8744 }
8745 }
8746 func rewriteValue386_OpDiv8u(v *Value) bool {
8747 v_1 := v.Args[1]
8748 v_0 := v.Args[0]
8749 b := v.Block
8750 typ := &b.Func.Config.Types
8751
8752
8753 for {
8754 x := v_0
8755 y := v_1
8756 v.reset(Op386DIVWU)
8757 v0 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
8758 v0.AddArg(x)
8759 v1 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
8760 v1.AddArg(y)
8761 v.AddArg2(v0, v1)
8762 return true
8763 }
8764 }
8765 func rewriteValue386_OpEq16(v *Value) bool {
8766 v_1 := v.Args[1]
8767 v_0 := v.Args[0]
8768 b := v.Block
8769
8770
8771 for {
8772 x := v_0
8773 y := v_1
8774 v.reset(Op386SETEQ)
8775 v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
8776 v0.AddArg2(x, y)
8777 v.AddArg(v0)
8778 return true
8779 }
8780 }
8781 func rewriteValue386_OpEq32(v *Value) bool {
8782 v_1 := v.Args[1]
8783 v_0 := v.Args[0]
8784 b := v.Block
8785
8786
8787 for {
8788 x := v_0
8789 y := v_1
8790 v.reset(Op386SETEQ)
8791 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
8792 v0.AddArg2(x, y)
8793 v.AddArg(v0)
8794 return true
8795 }
8796 }
8797 func rewriteValue386_OpEq32F(v *Value) bool {
8798 v_1 := v.Args[1]
8799 v_0 := v.Args[0]
8800 b := v.Block
8801
8802
8803 for {
8804 x := v_0
8805 y := v_1
8806 v.reset(Op386SETEQF)
8807 v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
8808 v0.AddArg2(x, y)
8809 v.AddArg(v0)
8810 return true
8811 }
8812 }
8813 func rewriteValue386_OpEq64F(v *Value) bool {
8814 v_1 := v.Args[1]
8815 v_0 := v.Args[0]
8816 b := v.Block
8817
8818
8819 for {
8820 x := v_0
8821 y := v_1
8822 v.reset(Op386SETEQF)
8823 v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
8824 v0.AddArg2(x, y)
8825 v.AddArg(v0)
8826 return true
8827 }
8828 }
8829 func rewriteValue386_OpEq8(v *Value) bool {
8830 v_1 := v.Args[1]
8831 v_0 := v.Args[0]
8832 b := v.Block
8833
8834
8835 for {
8836 x := v_0
8837 y := v_1
8838 v.reset(Op386SETEQ)
8839 v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
8840 v0.AddArg2(x, y)
8841 v.AddArg(v0)
8842 return true
8843 }
8844 }
8845 func rewriteValue386_OpEqB(v *Value) bool {
8846 v_1 := v.Args[1]
8847 v_0 := v.Args[0]
8848 b := v.Block
8849
8850
8851 for {
8852 x := v_0
8853 y := v_1
8854 v.reset(Op386SETEQ)
8855 v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
8856 v0.AddArg2(x, y)
8857 v.AddArg(v0)
8858 return true
8859 }
8860 }
8861 func rewriteValue386_OpEqPtr(v *Value) bool {
8862 v_1 := v.Args[1]
8863 v_0 := v.Args[0]
8864 b := v.Block
8865
8866
8867 for {
8868 x := v_0
8869 y := v_1
8870 v.reset(Op386SETEQ)
8871 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
8872 v0.AddArg2(x, y)
8873 v.AddArg(v0)
8874 return true
8875 }
8876 }
8877 func rewriteValue386_OpIsInBounds(v *Value) bool {
8878 v_1 := v.Args[1]
8879 v_0 := v.Args[0]
8880 b := v.Block
8881
8882
8883 for {
8884 idx := v_0
8885 len := v_1
8886 v.reset(Op386SETB)
8887 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
8888 v0.AddArg2(idx, len)
8889 v.AddArg(v0)
8890 return true
8891 }
8892 }
8893 func rewriteValue386_OpIsNonNil(v *Value) bool {
8894 v_0 := v.Args[0]
8895 b := v.Block
8896
8897
8898 for {
8899 p := v_0
8900 v.reset(Op386SETNE)
8901 v0 := b.NewValue0(v.Pos, Op386TESTL, types.TypeFlags)
8902 v0.AddArg2(p, p)
8903 v.AddArg(v0)
8904 return true
8905 }
8906 }
8907 func rewriteValue386_OpIsSliceInBounds(v *Value) bool {
8908 v_1 := v.Args[1]
8909 v_0 := v.Args[0]
8910 b := v.Block
8911
8912
8913 for {
8914 idx := v_0
8915 len := v_1
8916 v.reset(Op386SETBE)
8917 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
8918 v0.AddArg2(idx, len)
8919 v.AddArg(v0)
8920 return true
8921 }
8922 }
8923 func rewriteValue386_OpLeq16(v *Value) bool {
8924 v_1 := v.Args[1]
8925 v_0 := v.Args[0]
8926 b := v.Block
8927
8928
8929 for {
8930 x := v_0
8931 y := v_1
8932 v.reset(Op386SETLE)
8933 v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
8934 v0.AddArg2(x, y)
8935 v.AddArg(v0)
8936 return true
8937 }
8938 }
8939 func rewriteValue386_OpLeq16U(v *Value) bool {
8940 v_1 := v.Args[1]
8941 v_0 := v.Args[0]
8942 b := v.Block
8943
8944
8945 for {
8946 x := v_0
8947 y := v_1
8948 v.reset(Op386SETBE)
8949 v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
8950 v0.AddArg2(x, y)
8951 v.AddArg(v0)
8952 return true
8953 }
8954 }
8955 func rewriteValue386_OpLeq32(v *Value) bool {
8956 v_1 := v.Args[1]
8957 v_0 := v.Args[0]
8958 b := v.Block
8959
8960
8961 for {
8962 x := v_0
8963 y := v_1
8964 v.reset(Op386SETLE)
8965 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
8966 v0.AddArg2(x, y)
8967 v.AddArg(v0)
8968 return true
8969 }
8970 }
8971 func rewriteValue386_OpLeq32F(v *Value) bool {
8972 v_1 := v.Args[1]
8973 v_0 := v.Args[0]
8974 b := v.Block
8975
8976
8977 for {
8978 x := v_0
8979 y := v_1
8980 v.reset(Op386SETGEF)
8981 v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
8982 v0.AddArg2(y, x)
8983 v.AddArg(v0)
8984 return true
8985 }
8986 }
8987 func rewriteValue386_OpLeq32U(v *Value) bool {
8988 v_1 := v.Args[1]
8989 v_0 := v.Args[0]
8990 b := v.Block
8991
8992
8993 for {
8994 x := v_0
8995 y := v_1
8996 v.reset(Op386SETBE)
8997 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
8998 v0.AddArg2(x, y)
8999 v.AddArg(v0)
9000 return true
9001 }
9002 }
9003 func rewriteValue386_OpLeq64F(v *Value) bool {
9004 v_1 := v.Args[1]
9005 v_0 := v.Args[0]
9006 b := v.Block
9007
9008
9009 for {
9010 x := v_0
9011 y := v_1
9012 v.reset(Op386SETGEF)
9013 v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
9014 v0.AddArg2(y, x)
9015 v.AddArg(v0)
9016 return true
9017 }
9018 }
9019 func rewriteValue386_OpLeq8(v *Value) bool {
9020 v_1 := v.Args[1]
9021 v_0 := v.Args[0]
9022 b := v.Block
9023
9024
9025 for {
9026 x := v_0
9027 y := v_1
9028 v.reset(Op386SETLE)
9029 v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
9030 v0.AddArg2(x, y)
9031 v.AddArg(v0)
9032 return true
9033 }
9034 }
9035 func rewriteValue386_OpLeq8U(v *Value) bool {
9036 v_1 := v.Args[1]
9037 v_0 := v.Args[0]
9038 b := v.Block
9039
9040
9041 for {
9042 x := v_0
9043 y := v_1
9044 v.reset(Op386SETBE)
9045 v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
9046 v0.AddArg2(x, y)
9047 v.AddArg(v0)
9048 return true
9049 }
9050 }
9051 func rewriteValue386_OpLess16(v *Value) bool {
9052 v_1 := v.Args[1]
9053 v_0 := v.Args[0]
9054 b := v.Block
9055
9056
9057 for {
9058 x := v_0
9059 y := v_1
9060 v.reset(Op386SETL)
9061 v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
9062 v0.AddArg2(x, y)
9063 v.AddArg(v0)
9064 return true
9065 }
9066 }
9067 func rewriteValue386_OpLess16U(v *Value) bool {
9068 v_1 := v.Args[1]
9069 v_0 := v.Args[0]
9070 b := v.Block
9071
9072
9073 for {
9074 x := v_0
9075 y := v_1
9076 v.reset(Op386SETB)
9077 v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
9078 v0.AddArg2(x, y)
9079 v.AddArg(v0)
9080 return true
9081 }
9082 }
9083 func rewriteValue386_OpLess32(v *Value) bool {
9084 v_1 := v.Args[1]
9085 v_0 := v.Args[0]
9086 b := v.Block
9087
9088
9089 for {
9090 x := v_0
9091 y := v_1
9092 v.reset(Op386SETL)
9093 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
9094 v0.AddArg2(x, y)
9095 v.AddArg(v0)
9096 return true
9097 }
9098 }
9099 func rewriteValue386_OpLess32F(v *Value) bool {
9100 v_1 := v.Args[1]
9101 v_0 := v.Args[0]
9102 b := v.Block
9103
9104
9105 for {
9106 x := v_0
9107 y := v_1
9108 v.reset(Op386SETGF)
9109 v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
9110 v0.AddArg2(y, x)
9111 v.AddArg(v0)
9112 return true
9113 }
9114 }
9115 func rewriteValue386_OpLess32U(v *Value) bool {
9116 v_1 := v.Args[1]
9117 v_0 := v.Args[0]
9118 b := v.Block
9119
9120
9121 for {
9122 x := v_0
9123 y := v_1
9124 v.reset(Op386SETB)
9125 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
9126 v0.AddArg2(x, y)
9127 v.AddArg(v0)
9128 return true
9129 }
9130 }
9131 func rewriteValue386_OpLess64F(v *Value) bool {
9132 v_1 := v.Args[1]
9133 v_0 := v.Args[0]
9134 b := v.Block
9135
9136
9137 for {
9138 x := v_0
9139 y := v_1
9140 v.reset(Op386SETGF)
9141 v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
9142 v0.AddArg2(y, x)
9143 v.AddArg(v0)
9144 return true
9145 }
9146 }
9147 func rewriteValue386_OpLess8(v *Value) bool {
9148 v_1 := v.Args[1]
9149 v_0 := v.Args[0]
9150 b := v.Block
9151
9152
9153 for {
9154 x := v_0
9155 y := v_1
9156 v.reset(Op386SETL)
9157 v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
9158 v0.AddArg2(x, y)
9159 v.AddArg(v0)
9160 return true
9161 }
9162 }
9163 func rewriteValue386_OpLess8U(v *Value) bool {
9164 v_1 := v.Args[1]
9165 v_0 := v.Args[0]
9166 b := v.Block
9167
9168
9169 for {
9170 x := v_0
9171 y := v_1
9172 v.reset(Op386SETB)
9173 v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
9174 v0.AddArg2(x, y)
9175 v.AddArg(v0)
9176 return true
9177 }
9178 }
9179 func rewriteValue386_OpLoad(v *Value) bool {
9180 v_1 := v.Args[1]
9181 v_0 := v.Args[0]
9182
9183
9184
9185 for {
9186 t := v.Type
9187 ptr := v_0
9188 mem := v_1
9189 if !(is32BitInt(t) || isPtr(t)) {
9190 break
9191 }
9192 v.reset(Op386MOVLload)
9193 v.AddArg2(ptr, mem)
9194 return true
9195 }
9196
9197
9198
9199 for {
9200 t := v.Type
9201 ptr := v_0
9202 mem := v_1
9203 if !(is16BitInt(t)) {
9204 break
9205 }
9206 v.reset(Op386MOVWload)
9207 v.AddArg2(ptr, mem)
9208 return true
9209 }
9210
9211
9212
9213 for {
9214 t := v.Type
9215 ptr := v_0
9216 mem := v_1
9217 if !(t.IsBoolean() || is8BitInt(t)) {
9218 break
9219 }
9220 v.reset(Op386MOVBload)
9221 v.AddArg2(ptr, mem)
9222 return true
9223 }
9224
9225
9226
9227 for {
9228 t := v.Type
9229 ptr := v_0
9230 mem := v_1
9231 if !(is32BitFloat(t)) {
9232 break
9233 }
9234 v.reset(Op386MOVSSload)
9235 v.AddArg2(ptr, mem)
9236 return true
9237 }
9238
9239
9240
9241 for {
9242 t := v.Type
9243 ptr := v_0
9244 mem := v_1
9245 if !(is64BitFloat(t)) {
9246 break
9247 }
9248 v.reset(Op386MOVSDload)
9249 v.AddArg2(ptr, mem)
9250 return true
9251 }
9252 return false
9253 }
9254 func rewriteValue386_OpLocalAddr(v *Value) bool {
9255 v_0 := v.Args[0]
9256
9257
9258 for {
9259 sym := auxToSym(v.Aux)
9260 base := v_0
9261 v.reset(Op386LEAL)
9262 v.Aux = symToAux(sym)
9263 v.AddArg(base)
9264 return true
9265 }
9266 }
9267 func rewriteValue386_OpLsh16x16(v *Value) bool {
9268 v_1 := v.Args[1]
9269 v_0 := v.Args[0]
9270 b := v.Block
9271
9272
9273
9274 for {
9275 t := v.Type
9276 x := v_0
9277 y := v_1
9278 if !(!shiftIsBounded(v)) {
9279 break
9280 }
9281 v.reset(Op386ANDL)
9282 v0 := b.NewValue0(v.Pos, Op386SHLL, t)
9283 v0.AddArg2(x, y)
9284 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
9285 v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
9286 v2.AuxInt = int16ToAuxInt(32)
9287 v2.AddArg(y)
9288 v1.AddArg(v2)
9289 v.AddArg2(v0, v1)
9290 return true
9291 }
9292
9293
9294
9295 for {
9296 t := v.Type
9297 x := v_0
9298 y := v_1
9299 if !(shiftIsBounded(v)) {
9300 break
9301 }
9302 v.reset(Op386SHLL)
9303 v.Type = t
9304 v.AddArg2(x, y)
9305 return true
9306 }
9307 return false
9308 }
9309 func rewriteValue386_OpLsh16x32(v *Value) bool {
9310 v_1 := v.Args[1]
9311 v_0 := v.Args[0]
9312 b := v.Block
9313
9314
9315
9316 for {
9317 t := v.Type
9318 x := v_0
9319 y := v_1
9320 if !(!shiftIsBounded(v)) {
9321 break
9322 }
9323 v.reset(Op386ANDL)
9324 v0 := b.NewValue0(v.Pos, Op386SHLL, t)
9325 v0.AddArg2(x, y)
9326 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
9327 v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
9328 v2.AuxInt = int32ToAuxInt(32)
9329 v2.AddArg(y)
9330 v1.AddArg(v2)
9331 v.AddArg2(v0, v1)
9332 return true
9333 }
9334
9335
9336
9337 for {
9338 t := v.Type
9339 x := v_0
9340 y := v_1
9341 if !(shiftIsBounded(v)) {
9342 break
9343 }
9344 v.reset(Op386SHLL)
9345 v.Type = t
9346 v.AddArg2(x, y)
9347 return true
9348 }
9349 return false
9350 }
9351 func rewriteValue386_OpLsh16x64(v *Value) bool {
9352 v_1 := v.Args[1]
9353 v_0 := v.Args[0]
9354
9355
9356
9357 for {
9358 x := v_0
9359 if v_1.Op != OpConst64 {
9360 break
9361 }
9362 c := auxIntToInt64(v_1.AuxInt)
9363 if !(uint64(c) < 16) {
9364 break
9365 }
9366 v.reset(Op386SHLLconst)
9367 v.AuxInt = int32ToAuxInt(int32(c))
9368 v.AddArg(x)
9369 return true
9370 }
9371
9372
9373
9374 for {
9375 if v_1.Op != OpConst64 {
9376 break
9377 }
9378 c := auxIntToInt64(v_1.AuxInt)
9379 if !(uint64(c) >= 16) {
9380 break
9381 }
9382 v.reset(OpConst16)
9383 v.AuxInt = int16ToAuxInt(0)
9384 return true
9385 }
9386 return false
9387 }
9388 func rewriteValue386_OpLsh16x8(v *Value) bool {
9389 v_1 := v.Args[1]
9390 v_0 := v.Args[0]
9391 b := v.Block
9392
9393
9394
9395 for {
9396 t := v.Type
9397 x := v_0
9398 y := v_1
9399 if !(!shiftIsBounded(v)) {
9400 break
9401 }
9402 v.reset(Op386ANDL)
9403 v0 := b.NewValue0(v.Pos, Op386SHLL, t)
9404 v0.AddArg2(x, y)
9405 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
9406 v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
9407 v2.AuxInt = int8ToAuxInt(32)
9408 v2.AddArg(y)
9409 v1.AddArg(v2)
9410 v.AddArg2(v0, v1)
9411 return true
9412 }
9413
9414
9415
9416 for {
9417 t := v.Type
9418 x := v_0
9419 y := v_1
9420 if !(shiftIsBounded(v)) {
9421 break
9422 }
9423 v.reset(Op386SHLL)
9424 v.Type = t
9425 v.AddArg2(x, y)
9426 return true
9427 }
9428 return false
9429 }
9430 func rewriteValue386_OpLsh32x16(v *Value) bool {
9431 v_1 := v.Args[1]
9432 v_0 := v.Args[0]
9433 b := v.Block
9434
9435
9436
9437 for {
9438 t := v.Type
9439 x := v_0
9440 y := v_1
9441 if !(!shiftIsBounded(v)) {
9442 break
9443 }
9444 v.reset(Op386ANDL)
9445 v0 := b.NewValue0(v.Pos, Op386SHLL, t)
9446 v0.AddArg2(x, y)
9447 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
9448 v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
9449 v2.AuxInt = int16ToAuxInt(32)
9450 v2.AddArg(y)
9451 v1.AddArg(v2)
9452 v.AddArg2(v0, v1)
9453 return true
9454 }
9455
9456
9457
9458 for {
9459 t := v.Type
9460 x := v_0
9461 y := v_1
9462 if !(shiftIsBounded(v)) {
9463 break
9464 }
9465 v.reset(Op386SHLL)
9466 v.Type = t
9467 v.AddArg2(x, y)
9468 return true
9469 }
9470 return false
9471 }
9472 func rewriteValue386_OpLsh32x32(v *Value) bool {
9473 v_1 := v.Args[1]
9474 v_0 := v.Args[0]
9475 b := v.Block
9476
9477
9478
9479 for {
9480 t := v.Type
9481 x := v_0
9482 y := v_1
9483 if !(!shiftIsBounded(v)) {
9484 break
9485 }
9486 v.reset(Op386ANDL)
9487 v0 := b.NewValue0(v.Pos, Op386SHLL, t)
9488 v0.AddArg2(x, y)
9489 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
9490 v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
9491 v2.AuxInt = int32ToAuxInt(32)
9492 v2.AddArg(y)
9493 v1.AddArg(v2)
9494 v.AddArg2(v0, v1)
9495 return true
9496 }
9497
9498
9499
9500 for {
9501 t := v.Type
9502 x := v_0
9503 y := v_1
9504 if !(shiftIsBounded(v)) {
9505 break
9506 }
9507 v.reset(Op386SHLL)
9508 v.Type = t
9509 v.AddArg2(x, y)
9510 return true
9511 }
9512 return false
9513 }
9514 func rewriteValue386_OpLsh32x64(v *Value) bool {
9515 v_1 := v.Args[1]
9516 v_0 := v.Args[0]
9517
9518
9519
9520 for {
9521 x := v_0
9522 if v_1.Op != OpConst64 {
9523 break
9524 }
9525 c := auxIntToInt64(v_1.AuxInt)
9526 if !(uint64(c) < 32) {
9527 break
9528 }
9529 v.reset(Op386SHLLconst)
9530 v.AuxInt = int32ToAuxInt(int32(c))
9531 v.AddArg(x)
9532 return true
9533 }
9534
9535
9536
9537 for {
9538 if v_1.Op != OpConst64 {
9539 break
9540 }
9541 c := auxIntToInt64(v_1.AuxInt)
9542 if !(uint64(c) >= 32) {
9543 break
9544 }
9545 v.reset(OpConst32)
9546 v.AuxInt = int32ToAuxInt(0)
9547 return true
9548 }
9549 return false
9550 }
9551 func rewriteValue386_OpLsh32x8(v *Value) bool {
9552 v_1 := v.Args[1]
9553 v_0 := v.Args[0]
9554 b := v.Block
9555
9556
9557
9558 for {
9559 t := v.Type
9560 x := v_0
9561 y := v_1
9562 if !(!shiftIsBounded(v)) {
9563 break
9564 }
9565 v.reset(Op386ANDL)
9566 v0 := b.NewValue0(v.Pos, Op386SHLL, t)
9567 v0.AddArg2(x, y)
9568 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
9569 v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
9570 v2.AuxInt = int8ToAuxInt(32)
9571 v2.AddArg(y)
9572 v1.AddArg(v2)
9573 v.AddArg2(v0, v1)
9574 return true
9575 }
9576
9577
9578
9579 for {
9580 t := v.Type
9581 x := v_0
9582 y := v_1
9583 if !(shiftIsBounded(v)) {
9584 break
9585 }
9586 v.reset(Op386SHLL)
9587 v.Type = t
9588 v.AddArg2(x, y)
9589 return true
9590 }
9591 return false
9592 }
9593 func rewriteValue386_OpLsh8x16(v *Value) bool {
9594 v_1 := v.Args[1]
9595 v_0 := v.Args[0]
9596 b := v.Block
9597
9598
9599
9600 for {
9601 t := v.Type
9602 x := v_0
9603 y := v_1
9604 if !(!shiftIsBounded(v)) {
9605 break
9606 }
9607 v.reset(Op386ANDL)
9608 v0 := b.NewValue0(v.Pos, Op386SHLL, t)
9609 v0.AddArg2(x, y)
9610 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
9611 v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
9612 v2.AuxInt = int16ToAuxInt(32)
9613 v2.AddArg(y)
9614 v1.AddArg(v2)
9615 v.AddArg2(v0, v1)
9616 return true
9617 }
9618
9619
9620
9621 for {
9622 t := v.Type
9623 x := v_0
9624 y := v_1
9625 if !(shiftIsBounded(v)) {
9626 break
9627 }
9628 v.reset(Op386SHLL)
9629 v.Type = t
9630 v.AddArg2(x, y)
9631 return true
9632 }
9633 return false
9634 }
9635 func rewriteValue386_OpLsh8x32(v *Value) bool {
9636 v_1 := v.Args[1]
9637 v_0 := v.Args[0]
9638 b := v.Block
9639
9640
9641
9642 for {
9643 t := v.Type
9644 x := v_0
9645 y := v_1
9646 if !(!shiftIsBounded(v)) {
9647 break
9648 }
9649 v.reset(Op386ANDL)
9650 v0 := b.NewValue0(v.Pos, Op386SHLL, t)
9651 v0.AddArg2(x, y)
9652 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
9653 v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
9654 v2.AuxInt = int32ToAuxInt(32)
9655 v2.AddArg(y)
9656 v1.AddArg(v2)
9657 v.AddArg2(v0, v1)
9658 return true
9659 }
9660
9661
9662
9663 for {
9664 t := v.Type
9665 x := v_0
9666 y := v_1
9667 if !(shiftIsBounded(v)) {
9668 break
9669 }
9670 v.reset(Op386SHLL)
9671 v.Type = t
9672 v.AddArg2(x, y)
9673 return true
9674 }
9675 return false
9676 }
9677 func rewriteValue386_OpLsh8x64(v *Value) bool {
9678 v_1 := v.Args[1]
9679 v_0 := v.Args[0]
9680
9681
9682
9683 for {
9684 x := v_0
9685 if v_1.Op != OpConst64 {
9686 break
9687 }
9688 c := auxIntToInt64(v_1.AuxInt)
9689 if !(uint64(c) < 8) {
9690 break
9691 }
9692 v.reset(Op386SHLLconst)
9693 v.AuxInt = int32ToAuxInt(int32(c))
9694 v.AddArg(x)
9695 return true
9696 }
9697
9698
9699
9700 for {
9701 if v_1.Op != OpConst64 {
9702 break
9703 }
9704 c := auxIntToInt64(v_1.AuxInt)
9705 if !(uint64(c) >= 8) {
9706 break
9707 }
9708 v.reset(OpConst8)
9709 v.AuxInt = int8ToAuxInt(0)
9710 return true
9711 }
9712 return false
9713 }
9714 func rewriteValue386_OpLsh8x8(v *Value) bool {
9715 v_1 := v.Args[1]
9716 v_0 := v.Args[0]
9717 b := v.Block
9718
9719
9720
9721 for {
9722 t := v.Type
9723 x := v_0
9724 y := v_1
9725 if !(!shiftIsBounded(v)) {
9726 break
9727 }
9728 v.reset(Op386ANDL)
9729 v0 := b.NewValue0(v.Pos, Op386SHLL, t)
9730 v0.AddArg2(x, y)
9731 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
9732 v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
9733 v2.AuxInt = int8ToAuxInt(32)
9734 v2.AddArg(y)
9735 v1.AddArg(v2)
9736 v.AddArg2(v0, v1)
9737 return true
9738 }
9739
9740
9741
9742 for {
9743 t := v.Type
9744 x := v_0
9745 y := v_1
9746 if !(shiftIsBounded(v)) {
9747 break
9748 }
9749 v.reset(Op386SHLL)
9750 v.Type = t
9751 v.AddArg2(x, y)
9752 return true
9753 }
9754 return false
9755 }
9756 func rewriteValue386_OpMod8(v *Value) bool {
9757 v_1 := v.Args[1]
9758 v_0 := v.Args[0]
9759 b := v.Block
9760 typ := &b.Func.Config.Types
9761
9762
9763 for {
9764 x := v_0
9765 y := v_1
9766 v.reset(Op386MODW)
9767 v0 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
9768 v0.AddArg(x)
9769 v1 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
9770 v1.AddArg(y)
9771 v.AddArg2(v0, v1)
9772 return true
9773 }
9774 }
9775 func rewriteValue386_OpMod8u(v *Value) bool {
9776 v_1 := v.Args[1]
9777 v_0 := v.Args[0]
9778 b := v.Block
9779 typ := &b.Func.Config.Types
9780
9781
9782 for {
9783 x := v_0
9784 y := v_1
9785 v.reset(Op386MODWU)
9786 v0 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
9787 v0.AddArg(x)
9788 v1 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
9789 v1.AddArg(y)
9790 v.AddArg2(v0, v1)
9791 return true
9792 }
9793 }
9794 func rewriteValue386_OpMove(v *Value) bool {
9795 v_2 := v.Args[2]
9796 v_1 := v.Args[1]
9797 v_0 := v.Args[0]
9798 b := v.Block
9799 config := b.Func.Config
9800 typ := &b.Func.Config.Types
9801
9802
9803 for {
9804 if auxIntToInt64(v.AuxInt) != 0 {
9805 break
9806 }
9807 mem := v_2
9808 v.copyOf(mem)
9809 return true
9810 }
9811
9812
9813 for {
9814 if auxIntToInt64(v.AuxInt) != 1 {
9815 break
9816 }
9817 dst := v_0
9818 src := v_1
9819 mem := v_2
9820 v.reset(Op386MOVBstore)
9821 v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
9822 v0.AddArg2(src, mem)
9823 v.AddArg3(dst, v0, mem)
9824 return true
9825 }
9826
9827
9828 for {
9829 if auxIntToInt64(v.AuxInt) != 2 {
9830 break
9831 }
9832 dst := v_0
9833 src := v_1
9834 mem := v_2
9835 v.reset(Op386MOVWstore)
9836 v0 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
9837 v0.AddArg2(src, mem)
9838 v.AddArg3(dst, v0, mem)
9839 return true
9840 }
9841
9842
9843 for {
9844 if auxIntToInt64(v.AuxInt) != 4 {
9845 break
9846 }
9847 dst := v_0
9848 src := v_1
9849 mem := v_2
9850 v.reset(Op386MOVLstore)
9851 v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
9852 v0.AddArg2(src, mem)
9853 v.AddArg3(dst, v0, mem)
9854 return true
9855 }
9856
9857
9858 for {
9859 if auxIntToInt64(v.AuxInt) != 3 {
9860 break
9861 }
9862 dst := v_0
9863 src := v_1
9864 mem := v_2
9865 v.reset(Op386MOVBstore)
9866 v.AuxInt = int32ToAuxInt(2)
9867 v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
9868 v0.AuxInt = int32ToAuxInt(2)
9869 v0.AddArg2(src, mem)
9870 v1 := b.NewValue0(v.Pos, Op386MOVWstore, types.TypeMem)
9871 v2 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
9872 v2.AddArg2(src, mem)
9873 v1.AddArg3(dst, v2, mem)
9874 v.AddArg3(dst, v0, v1)
9875 return true
9876 }
9877
9878
9879 for {
9880 if auxIntToInt64(v.AuxInt) != 5 {
9881 break
9882 }
9883 dst := v_0
9884 src := v_1
9885 mem := v_2
9886 v.reset(Op386MOVBstore)
9887 v.AuxInt = int32ToAuxInt(4)
9888 v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
9889 v0.AuxInt = int32ToAuxInt(4)
9890 v0.AddArg2(src, mem)
9891 v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
9892 v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
9893 v2.AddArg2(src, mem)
9894 v1.AddArg3(dst, v2, mem)
9895 v.AddArg3(dst, v0, v1)
9896 return true
9897 }
9898
9899
9900 for {
9901 if auxIntToInt64(v.AuxInt) != 6 {
9902 break
9903 }
9904 dst := v_0
9905 src := v_1
9906 mem := v_2
9907 v.reset(Op386MOVWstore)
9908 v.AuxInt = int32ToAuxInt(4)
9909 v0 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
9910 v0.AuxInt = int32ToAuxInt(4)
9911 v0.AddArg2(src, mem)
9912 v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
9913 v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
9914 v2.AddArg2(src, mem)
9915 v1.AddArg3(dst, v2, mem)
9916 v.AddArg3(dst, v0, v1)
9917 return true
9918 }
9919
9920
9921 for {
9922 if auxIntToInt64(v.AuxInt) != 7 {
9923 break
9924 }
9925 dst := v_0
9926 src := v_1
9927 mem := v_2
9928 v.reset(Op386MOVLstore)
9929 v.AuxInt = int32ToAuxInt(3)
9930 v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
9931 v0.AuxInt = int32ToAuxInt(3)
9932 v0.AddArg2(src, mem)
9933 v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
9934 v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
9935 v2.AddArg2(src, mem)
9936 v1.AddArg3(dst, v2, mem)
9937 v.AddArg3(dst, v0, v1)
9938 return true
9939 }
9940
9941
9942 for {
9943 if auxIntToInt64(v.AuxInt) != 8 {
9944 break
9945 }
9946 dst := v_0
9947 src := v_1
9948 mem := v_2
9949 v.reset(Op386MOVLstore)
9950 v.AuxInt = int32ToAuxInt(4)
9951 v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
9952 v0.AuxInt = int32ToAuxInt(4)
9953 v0.AddArg2(src, mem)
9954 v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
9955 v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
9956 v2.AddArg2(src, mem)
9957 v1.AddArg3(dst, v2, mem)
9958 v.AddArg3(dst, v0, v1)
9959 return true
9960 }
9961
9962
9963
9964 for {
9965 s := auxIntToInt64(v.AuxInt)
9966 dst := v_0
9967 src := v_1
9968 mem := v_2
9969 if !(s > 8 && s%4 != 0) {
9970 break
9971 }
9972 v.reset(OpMove)
9973 v.AuxInt = int64ToAuxInt(s - s%4)
9974 v0 := b.NewValue0(v.Pos, Op386ADDLconst, dst.Type)
9975 v0.AuxInt = int32ToAuxInt(int32(s % 4))
9976 v0.AddArg(dst)
9977 v1 := b.NewValue0(v.Pos, Op386ADDLconst, src.Type)
9978 v1.AuxInt = int32ToAuxInt(int32(s % 4))
9979 v1.AddArg(src)
9980 v2 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
9981 v3 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
9982 v3.AddArg2(src, mem)
9983 v2.AddArg3(dst, v3, mem)
9984 v.AddArg3(v0, v1, v2)
9985 return true
9986 }
9987
9988
9989
9990 for {
9991 s := auxIntToInt64(v.AuxInt)
9992 dst := v_0
9993 src := v_1
9994 mem := v_2
9995 if !(s > 8 && s <= 4*128 && s%4 == 0 && !config.noDuffDevice && logLargeCopy(v, s)) {
9996 break
9997 }
9998 v.reset(Op386DUFFCOPY)
9999 v.AuxInt = int64ToAuxInt(10 * (128 - s/4))
10000 v.AddArg3(dst, src, mem)
10001 return true
10002 }
10003
10004
10005
10006 for {
10007 s := auxIntToInt64(v.AuxInt)
10008 dst := v_0
10009 src := v_1
10010 mem := v_2
10011 if !((s > 4*128 || config.noDuffDevice) && s%4 == 0 && logLargeCopy(v, s)) {
10012 break
10013 }
10014 v.reset(Op386REPMOVSL)
10015 v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
10016 v0.AuxInt = int32ToAuxInt(int32(s / 4))
10017 v.AddArg4(dst, src, v0, mem)
10018 return true
10019 }
10020 return false
10021 }
10022 func rewriteValue386_OpNeg32F(v *Value) bool {
10023 v_0 := v.Args[0]
10024 b := v.Block
10025 typ := &b.Func.Config.Types
10026
10027
10028 for {
10029 x := v_0
10030 v.reset(Op386PXOR)
10031 v0 := b.NewValue0(v.Pos, Op386MOVSSconst, typ.Float32)
10032 v0.AuxInt = float32ToAuxInt(float32(math.Copysign(0, -1)))
10033 v.AddArg2(x, v0)
10034 return true
10035 }
10036 }
10037 func rewriteValue386_OpNeg64F(v *Value) bool {
10038 v_0 := v.Args[0]
10039 b := v.Block
10040 typ := &b.Func.Config.Types
10041
10042
10043 for {
10044 x := v_0
10045 v.reset(Op386PXOR)
10046 v0 := b.NewValue0(v.Pos, Op386MOVSDconst, typ.Float64)
10047 v0.AuxInt = float64ToAuxInt(math.Copysign(0, -1))
10048 v.AddArg2(x, v0)
10049 return true
10050 }
10051 }
10052 func rewriteValue386_OpNeq16(v *Value) bool {
10053 v_1 := v.Args[1]
10054 v_0 := v.Args[0]
10055 b := v.Block
10056
10057
10058 for {
10059 x := v_0
10060 y := v_1
10061 v.reset(Op386SETNE)
10062 v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
10063 v0.AddArg2(x, y)
10064 v.AddArg(v0)
10065 return true
10066 }
10067 }
10068 func rewriteValue386_OpNeq32(v *Value) bool {
10069 v_1 := v.Args[1]
10070 v_0 := v.Args[0]
10071 b := v.Block
10072
10073
10074 for {
10075 x := v_0
10076 y := v_1
10077 v.reset(Op386SETNE)
10078 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
10079 v0.AddArg2(x, y)
10080 v.AddArg(v0)
10081 return true
10082 }
10083 }
10084 func rewriteValue386_OpNeq32F(v *Value) bool {
10085 v_1 := v.Args[1]
10086 v_0 := v.Args[0]
10087 b := v.Block
10088
10089
10090 for {
10091 x := v_0
10092 y := v_1
10093 v.reset(Op386SETNEF)
10094 v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
10095 v0.AddArg2(x, y)
10096 v.AddArg(v0)
10097 return true
10098 }
10099 }
10100 func rewriteValue386_OpNeq64F(v *Value) bool {
10101 v_1 := v.Args[1]
10102 v_0 := v.Args[0]
10103 b := v.Block
10104
10105
10106 for {
10107 x := v_0
10108 y := v_1
10109 v.reset(Op386SETNEF)
10110 v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
10111 v0.AddArg2(x, y)
10112 v.AddArg(v0)
10113 return true
10114 }
10115 }
10116 func rewriteValue386_OpNeq8(v *Value) bool {
10117 v_1 := v.Args[1]
10118 v_0 := v.Args[0]
10119 b := v.Block
10120
10121
10122 for {
10123 x := v_0
10124 y := v_1
10125 v.reset(Op386SETNE)
10126 v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
10127 v0.AddArg2(x, y)
10128 v.AddArg(v0)
10129 return true
10130 }
10131 }
10132 func rewriteValue386_OpNeqB(v *Value) bool {
10133 v_1 := v.Args[1]
10134 v_0 := v.Args[0]
10135 b := v.Block
10136
10137
10138 for {
10139 x := v_0
10140 y := v_1
10141 v.reset(Op386SETNE)
10142 v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
10143 v0.AddArg2(x, y)
10144 v.AddArg(v0)
10145 return true
10146 }
10147 }
10148 func rewriteValue386_OpNeqPtr(v *Value) bool {
10149 v_1 := v.Args[1]
10150 v_0 := v.Args[0]
10151 b := v.Block
10152
10153
10154 for {
10155 x := v_0
10156 y := v_1
10157 v.reset(Op386SETNE)
10158 v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
10159 v0.AddArg2(x, y)
10160 v.AddArg(v0)
10161 return true
10162 }
10163 }
10164 func rewriteValue386_OpNot(v *Value) bool {
10165 v_0 := v.Args[0]
10166
10167
10168 for {
10169 x := v_0
10170 v.reset(Op386XORLconst)
10171 v.AuxInt = int32ToAuxInt(1)
10172 v.AddArg(x)
10173 return true
10174 }
10175 }
10176 func rewriteValue386_OpOffPtr(v *Value) bool {
10177 v_0 := v.Args[0]
10178
10179
10180 for {
10181 off := auxIntToInt64(v.AuxInt)
10182 ptr := v_0
10183 v.reset(Op386ADDLconst)
10184 v.AuxInt = int32ToAuxInt(int32(off))
10185 v.AddArg(ptr)
10186 return true
10187 }
10188 }
10189 func rewriteValue386_OpPanicBounds(v *Value) bool {
10190 v_2 := v.Args[2]
10191 v_1 := v.Args[1]
10192 v_0 := v.Args[0]
10193
10194
10195
10196 for {
10197 kind := auxIntToInt64(v.AuxInt)
10198 x := v_0
10199 y := v_1
10200 mem := v_2
10201 if !(boundsABI(kind) == 0) {
10202 break
10203 }
10204 v.reset(Op386LoweredPanicBoundsA)
10205 v.AuxInt = int64ToAuxInt(kind)
10206 v.AddArg3(x, y, mem)
10207 return true
10208 }
10209
10210
10211
10212 for {
10213 kind := auxIntToInt64(v.AuxInt)
10214 x := v_0
10215 y := v_1
10216 mem := v_2
10217 if !(boundsABI(kind) == 1) {
10218 break
10219 }
10220 v.reset(Op386LoweredPanicBoundsB)
10221 v.AuxInt = int64ToAuxInt(kind)
10222 v.AddArg3(x, y, mem)
10223 return true
10224 }
10225
10226
10227
10228 for {
10229 kind := auxIntToInt64(v.AuxInt)
10230 x := v_0
10231 y := v_1
10232 mem := v_2
10233 if !(boundsABI(kind) == 2) {
10234 break
10235 }
10236 v.reset(Op386LoweredPanicBoundsC)
10237 v.AuxInt = int64ToAuxInt(kind)
10238 v.AddArg3(x, y, mem)
10239 return true
10240 }
10241 return false
10242 }
10243 func rewriteValue386_OpPanicExtend(v *Value) bool {
10244 v_3 := v.Args[3]
10245 v_2 := v.Args[2]
10246 v_1 := v.Args[1]
10247 v_0 := v.Args[0]
10248
10249
10250
10251 for {
10252 kind := auxIntToInt64(v.AuxInt)
10253 hi := v_0
10254 lo := v_1
10255 y := v_2
10256 mem := v_3
10257 if !(boundsABI(kind) == 0) {
10258 break
10259 }
10260 v.reset(Op386LoweredPanicExtendA)
10261 v.AuxInt = int64ToAuxInt(kind)
10262 v.AddArg4(hi, lo, y, mem)
10263 return true
10264 }
10265
10266
10267
10268 for {
10269 kind := auxIntToInt64(v.AuxInt)
10270 hi := v_0
10271 lo := v_1
10272 y := v_2
10273 mem := v_3
10274 if !(boundsABI(kind) == 1) {
10275 break
10276 }
10277 v.reset(Op386LoweredPanicExtendB)
10278 v.AuxInt = int64ToAuxInt(kind)
10279 v.AddArg4(hi, lo, y, mem)
10280 return true
10281 }
10282
10283
10284
10285 for {
10286 kind := auxIntToInt64(v.AuxInt)
10287 hi := v_0
10288 lo := v_1
10289 y := v_2
10290 mem := v_3
10291 if !(boundsABI(kind) == 2) {
10292 break
10293 }
10294 v.reset(Op386LoweredPanicExtendC)
10295 v.AuxInt = int64ToAuxInt(kind)
10296 v.AddArg4(hi, lo, y, mem)
10297 return true
10298 }
10299 return false
10300 }
10301 func rewriteValue386_OpRotateLeft16(v *Value) bool {
10302 v_1 := v.Args[1]
10303 v_0 := v.Args[0]
10304
10305
10306 for {
10307 x := v_0
10308 if v_1.Op != Op386MOVLconst {
10309 break
10310 }
10311 c := auxIntToInt32(v_1.AuxInt)
10312 v.reset(Op386ROLWconst)
10313 v.AuxInt = int16ToAuxInt(int16(c & 15))
10314 v.AddArg(x)
10315 return true
10316 }
10317 return false
10318 }
10319 func rewriteValue386_OpRotateLeft32(v *Value) bool {
10320 v_1 := v.Args[1]
10321 v_0 := v.Args[0]
10322
10323
10324 for {
10325 x := v_0
10326 if v_1.Op != Op386MOVLconst {
10327 break
10328 }
10329 c := auxIntToInt32(v_1.AuxInt)
10330 v.reset(Op386ROLLconst)
10331 v.AuxInt = int32ToAuxInt(c & 31)
10332 v.AddArg(x)
10333 return true
10334 }
10335 return false
10336 }
10337 func rewriteValue386_OpRotateLeft8(v *Value) bool {
10338 v_1 := v.Args[1]
10339 v_0 := v.Args[0]
10340
10341
10342 for {
10343 x := v_0
10344 if v_1.Op != Op386MOVLconst {
10345 break
10346 }
10347 c := auxIntToInt32(v_1.AuxInt)
10348 v.reset(Op386ROLBconst)
10349 v.AuxInt = int8ToAuxInt(int8(c & 7))
10350 v.AddArg(x)
10351 return true
10352 }
10353 return false
10354 }
10355 func rewriteValue386_OpRsh16Ux16(v *Value) bool {
10356 v_1 := v.Args[1]
10357 v_0 := v.Args[0]
10358 b := v.Block
10359
10360
10361
10362 for {
10363 t := v.Type
10364 x := v_0
10365 y := v_1
10366 if !(!shiftIsBounded(v)) {
10367 break
10368 }
10369 v.reset(Op386ANDL)
10370 v0 := b.NewValue0(v.Pos, Op386SHRW, t)
10371 v0.AddArg2(x, y)
10372 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
10373 v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
10374 v2.AuxInt = int16ToAuxInt(16)
10375 v2.AddArg(y)
10376 v1.AddArg(v2)
10377 v.AddArg2(v0, v1)
10378 return true
10379 }
10380
10381
10382
10383 for {
10384 t := v.Type
10385 x := v_0
10386 y := v_1
10387 if !(shiftIsBounded(v)) {
10388 break
10389 }
10390 v.reset(Op386SHRW)
10391 v.Type = t
10392 v.AddArg2(x, y)
10393 return true
10394 }
10395 return false
10396 }
10397 func rewriteValue386_OpRsh16Ux32(v *Value) bool {
10398 v_1 := v.Args[1]
10399 v_0 := v.Args[0]
10400 b := v.Block
10401
10402
10403
10404 for {
10405 t := v.Type
10406 x := v_0
10407 y := v_1
10408 if !(!shiftIsBounded(v)) {
10409 break
10410 }
10411 v.reset(Op386ANDL)
10412 v0 := b.NewValue0(v.Pos, Op386SHRW, t)
10413 v0.AddArg2(x, y)
10414 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
10415 v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
10416 v2.AuxInt = int32ToAuxInt(16)
10417 v2.AddArg(y)
10418 v1.AddArg(v2)
10419 v.AddArg2(v0, v1)
10420 return true
10421 }
10422
10423
10424
10425 for {
10426 t := v.Type
10427 x := v_0
10428 y := v_1
10429 if !(shiftIsBounded(v)) {
10430 break
10431 }
10432 v.reset(Op386SHRW)
10433 v.Type = t
10434 v.AddArg2(x, y)
10435 return true
10436 }
10437 return false
10438 }
10439 func rewriteValue386_OpRsh16Ux64(v *Value) bool {
10440 v_1 := v.Args[1]
10441 v_0 := v.Args[0]
10442
10443
10444
10445 for {
10446 x := v_0
10447 if v_1.Op != OpConst64 {
10448 break
10449 }
10450 c := auxIntToInt64(v_1.AuxInt)
10451 if !(uint64(c) < 16) {
10452 break
10453 }
10454 v.reset(Op386SHRWconst)
10455 v.AuxInt = int16ToAuxInt(int16(c))
10456 v.AddArg(x)
10457 return true
10458 }
10459
10460
10461
10462 for {
10463 if v_1.Op != OpConst64 {
10464 break
10465 }
10466 c := auxIntToInt64(v_1.AuxInt)
10467 if !(uint64(c) >= 16) {
10468 break
10469 }
10470 v.reset(OpConst16)
10471 v.AuxInt = int16ToAuxInt(0)
10472 return true
10473 }
10474 return false
10475 }
10476 func rewriteValue386_OpRsh16Ux8(v *Value) bool {
10477 v_1 := v.Args[1]
10478 v_0 := v.Args[0]
10479 b := v.Block
10480
10481
10482
10483 for {
10484 t := v.Type
10485 x := v_0
10486 y := v_1
10487 if !(!shiftIsBounded(v)) {
10488 break
10489 }
10490 v.reset(Op386ANDL)
10491 v0 := b.NewValue0(v.Pos, Op386SHRW, t)
10492 v0.AddArg2(x, y)
10493 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
10494 v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
10495 v2.AuxInt = int8ToAuxInt(16)
10496 v2.AddArg(y)
10497 v1.AddArg(v2)
10498 v.AddArg2(v0, v1)
10499 return true
10500 }
10501
10502
10503
10504 for {
10505 t := v.Type
10506 x := v_0
10507 y := v_1
10508 if !(shiftIsBounded(v)) {
10509 break
10510 }
10511 v.reset(Op386SHRW)
10512 v.Type = t
10513 v.AddArg2(x, y)
10514 return true
10515 }
10516 return false
10517 }
10518 func rewriteValue386_OpRsh16x16(v *Value) bool {
10519 v_1 := v.Args[1]
10520 v_0 := v.Args[0]
10521 b := v.Block
10522
10523
10524
10525 for {
10526 t := v.Type
10527 x := v_0
10528 y := v_1
10529 if !(!shiftIsBounded(v)) {
10530 break
10531 }
10532 v.reset(Op386SARW)
10533 v.Type = t
10534 v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
10535 v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
10536 v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
10537 v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
10538 v3.AuxInt = int16ToAuxInt(16)
10539 v3.AddArg(y)
10540 v2.AddArg(v3)
10541 v1.AddArg(v2)
10542 v0.AddArg2(y, v1)
10543 v.AddArg2(x, v0)
10544 return true
10545 }
10546
10547
10548
10549 for {
10550 x := v_0
10551 y := v_1
10552 if !(shiftIsBounded(v)) {
10553 break
10554 }
10555 v.reset(Op386SARW)
10556 v.AddArg2(x, y)
10557 return true
10558 }
10559 return false
10560 }
10561 func rewriteValue386_OpRsh16x32(v *Value) bool {
10562 v_1 := v.Args[1]
10563 v_0 := v.Args[0]
10564 b := v.Block
10565
10566
10567
10568 for {
10569 t := v.Type
10570 x := v_0
10571 y := v_1
10572 if !(!shiftIsBounded(v)) {
10573 break
10574 }
10575 v.reset(Op386SARW)
10576 v.Type = t
10577 v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
10578 v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
10579 v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
10580 v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
10581 v3.AuxInt = int32ToAuxInt(16)
10582 v3.AddArg(y)
10583 v2.AddArg(v3)
10584 v1.AddArg(v2)
10585 v0.AddArg2(y, v1)
10586 v.AddArg2(x, v0)
10587 return true
10588 }
10589
10590
10591
10592 for {
10593 x := v_0
10594 y := v_1
10595 if !(shiftIsBounded(v)) {
10596 break
10597 }
10598 v.reset(Op386SARW)
10599 v.AddArg2(x, y)
10600 return true
10601 }
10602 return false
10603 }
10604 func rewriteValue386_OpRsh16x64(v *Value) bool {
10605 v_1 := v.Args[1]
10606 v_0 := v.Args[0]
10607
10608
10609
10610 for {
10611 x := v_0
10612 if v_1.Op != OpConst64 {
10613 break
10614 }
10615 c := auxIntToInt64(v_1.AuxInt)
10616 if !(uint64(c) < 16) {
10617 break
10618 }
10619 v.reset(Op386SARWconst)
10620 v.AuxInt = int16ToAuxInt(int16(c))
10621 v.AddArg(x)
10622 return true
10623 }
10624
10625
10626
10627 for {
10628 x := v_0
10629 if v_1.Op != OpConst64 {
10630 break
10631 }
10632 c := auxIntToInt64(v_1.AuxInt)
10633 if !(uint64(c) >= 16) {
10634 break
10635 }
10636 v.reset(Op386SARWconst)
10637 v.AuxInt = int16ToAuxInt(15)
10638 v.AddArg(x)
10639 return true
10640 }
10641 return false
10642 }
10643 func rewriteValue386_OpRsh16x8(v *Value) bool {
10644 v_1 := v.Args[1]
10645 v_0 := v.Args[0]
10646 b := v.Block
10647
10648
10649
10650 for {
10651 t := v.Type
10652 x := v_0
10653 y := v_1
10654 if !(!shiftIsBounded(v)) {
10655 break
10656 }
10657 v.reset(Op386SARW)
10658 v.Type = t
10659 v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
10660 v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
10661 v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
10662 v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
10663 v3.AuxInt = int8ToAuxInt(16)
10664 v3.AddArg(y)
10665 v2.AddArg(v3)
10666 v1.AddArg(v2)
10667 v0.AddArg2(y, v1)
10668 v.AddArg2(x, v0)
10669 return true
10670 }
10671
10672
10673
10674 for {
10675 x := v_0
10676 y := v_1
10677 if !(shiftIsBounded(v)) {
10678 break
10679 }
10680 v.reset(Op386SARW)
10681 v.AddArg2(x, y)
10682 return true
10683 }
10684 return false
10685 }
10686 func rewriteValue386_OpRsh32Ux16(v *Value) bool {
10687 v_1 := v.Args[1]
10688 v_0 := v.Args[0]
10689 b := v.Block
10690
10691
10692
10693 for {
10694 t := v.Type
10695 x := v_0
10696 y := v_1
10697 if !(!shiftIsBounded(v)) {
10698 break
10699 }
10700 v.reset(Op386ANDL)
10701 v0 := b.NewValue0(v.Pos, Op386SHRL, t)
10702 v0.AddArg2(x, y)
10703 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
10704 v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
10705 v2.AuxInt = int16ToAuxInt(32)
10706 v2.AddArg(y)
10707 v1.AddArg(v2)
10708 v.AddArg2(v0, v1)
10709 return true
10710 }
10711
10712
10713
10714 for {
10715 t := v.Type
10716 x := v_0
10717 y := v_1
10718 if !(shiftIsBounded(v)) {
10719 break
10720 }
10721 v.reset(Op386SHRL)
10722 v.Type = t
10723 v.AddArg2(x, y)
10724 return true
10725 }
10726 return false
10727 }
10728 func rewriteValue386_OpRsh32Ux32(v *Value) bool {
10729 v_1 := v.Args[1]
10730 v_0 := v.Args[0]
10731 b := v.Block
10732
10733
10734
10735 for {
10736 t := v.Type
10737 x := v_0
10738 y := v_1
10739 if !(!shiftIsBounded(v)) {
10740 break
10741 }
10742 v.reset(Op386ANDL)
10743 v0 := b.NewValue0(v.Pos, Op386SHRL, t)
10744 v0.AddArg2(x, y)
10745 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
10746 v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
10747 v2.AuxInt = int32ToAuxInt(32)
10748 v2.AddArg(y)
10749 v1.AddArg(v2)
10750 v.AddArg2(v0, v1)
10751 return true
10752 }
10753
10754
10755
10756 for {
10757 t := v.Type
10758 x := v_0
10759 y := v_1
10760 if !(shiftIsBounded(v)) {
10761 break
10762 }
10763 v.reset(Op386SHRL)
10764 v.Type = t
10765 v.AddArg2(x, y)
10766 return true
10767 }
10768 return false
10769 }
10770 func rewriteValue386_OpRsh32Ux64(v *Value) bool {
10771 v_1 := v.Args[1]
10772 v_0 := v.Args[0]
10773
10774
10775
10776 for {
10777 x := v_0
10778 if v_1.Op != OpConst64 {
10779 break
10780 }
10781 c := auxIntToInt64(v_1.AuxInt)
10782 if !(uint64(c) < 32) {
10783 break
10784 }
10785 v.reset(Op386SHRLconst)
10786 v.AuxInt = int32ToAuxInt(int32(c))
10787 v.AddArg(x)
10788 return true
10789 }
10790
10791
10792
10793 for {
10794 if v_1.Op != OpConst64 {
10795 break
10796 }
10797 c := auxIntToInt64(v_1.AuxInt)
10798 if !(uint64(c) >= 32) {
10799 break
10800 }
10801 v.reset(OpConst32)
10802 v.AuxInt = int32ToAuxInt(0)
10803 return true
10804 }
10805 return false
10806 }
10807 func rewriteValue386_OpRsh32Ux8(v *Value) bool {
10808 v_1 := v.Args[1]
10809 v_0 := v.Args[0]
10810 b := v.Block
10811
10812
10813
10814 for {
10815 t := v.Type
10816 x := v_0
10817 y := v_1
10818 if !(!shiftIsBounded(v)) {
10819 break
10820 }
10821 v.reset(Op386ANDL)
10822 v0 := b.NewValue0(v.Pos, Op386SHRL, t)
10823 v0.AddArg2(x, y)
10824 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
10825 v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
10826 v2.AuxInt = int8ToAuxInt(32)
10827 v2.AddArg(y)
10828 v1.AddArg(v2)
10829 v.AddArg2(v0, v1)
10830 return true
10831 }
10832
10833
10834
10835 for {
10836 t := v.Type
10837 x := v_0
10838 y := v_1
10839 if !(shiftIsBounded(v)) {
10840 break
10841 }
10842 v.reset(Op386SHRL)
10843 v.Type = t
10844 v.AddArg2(x, y)
10845 return true
10846 }
10847 return false
10848 }
10849 func rewriteValue386_OpRsh32x16(v *Value) bool {
10850 v_1 := v.Args[1]
10851 v_0 := v.Args[0]
10852 b := v.Block
10853
10854
10855
10856 for {
10857 t := v.Type
10858 x := v_0
10859 y := v_1
10860 if !(!shiftIsBounded(v)) {
10861 break
10862 }
10863 v.reset(Op386SARL)
10864 v.Type = t
10865 v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
10866 v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
10867 v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
10868 v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
10869 v3.AuxInt = int16ToAuxInt(32)
10870 v3.AddArg(y)
10871 v2.AddArg(v3)
10872 v1.AddArg(v2)
10873 v0.AddArg2(y, v1)
10874 v.AddArg2(x, v0)
10875 return true
10876 }
10877
10878
10879
10880 for {
10881 x := v_0
10882 y := v_1
10883 if !(shiftIsBounded(v)) {
10884 break
10885 }
10886 v.reset(Op386SARL)
10887 v.AddArg2(x, y)
10888 return true
10889 }
10890 return false
10891 }
10892 func rewriteValue386_OpRsh32x32(v *Value) bool {
10893 v_1 := v.Args[1]
10894 v_0 := v.Args[0]
10895 b := v.Block
10896
10897
10898
10899 for {
10900 t := v.Type
10901 x := v_0
10902 y := v_1
10903 if !(!shiftIsBounded(v)) {
10904 break
10905 }
10906 v.reset(Op386SARL)
10907 v.Type = t
10908 v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
10909 v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
10910 v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
10911 v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
10912 v3.AuxInt = int32ToAuxInt(32)
10913 v3.AddArg(y)
10914 v2.AddArg(v3)
10915 v1.AddArg(v2)
10916 v0.AddArg2(y, v1)
10917 v.AddArg2(x, v0)
10918 return true
10919 }
10920
10921
10922
10923 for {
10924 x := v_0
10925 y := v_1
10926 if !(shiftIsBounded(v)) {
10927 break
10928 }
10929 v.reset(Op386SARL)
10930 v.AddArg2(x, y)
10931 return true
10932 }
10933 return false
10934 }
10935 func rewriteValue386_OpRsh32x64(v *Value) bool {
10936 v_1 := v.Args[1]
10937 v_0 := v.Args[0]
10938
10939
10940
10941 for {
10942 x := v_0
10943 if v_1.Op != OpConst64 {
10944 break
10945 }
10946 c := auxIntToInt64(v_1.AuxInt)
10947 if !(uint64(c) < 32) {
10948 break
10949 }
10950 v.reset(Op386SARLconst)
10951 v.AuxInt = int32ToAuxInt(int32(c))
10952 v.AddArg(x)
10953 return true
10954 }
10955
10956
10957
10958 for {
10959 x := v_0
10960 if v_1.Op != OpConst64 {
10961 break
10962 }
10963 c := auxIntToInt64(v_1.AuxInt)
10964 if !(uint64(c) >= 32) {
10965 break
10966 }
10967 v.reset(Op386SARLconst)
10968 v.AuxInt = int32ToAuxInt(31)
10969 v.AddArg(x)
10970 return true
10971 }
10972 return false
10973 }
10974 func rewriteValue386_OpRsh32x8(v *Value) bool {
10975 v_1 := v.Args[1]
10976 v_0 := v.Args[0]
10977 b := v.Block
10978
10979
10980
10981 for {
10982 t := v.Type
10983 x := v_0
10984 y := v_1
10985 if !(!shiftIsBounded(v)) {
10986 break
10987 }
10988 v.reset(Op386SARL)
10989 v.Type = t
10990 v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
10991 v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
10992 v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
10993 v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
10994 v3.AuxInt = int8ToAuxInt(32)
10995 v3.AddArg(y)
10996 v2.AddArg(v3)
10997 v1.AddArg(v2)
10998 v0.AddArg2(y, v1)
10999 v.AddArg2(x, v0)
11000 return true
11001 }
11002
11003
11004
11005 for {
11006 x := v_0
11007 y := v_1
11008 if !(shiftIsBounded(v)) {
11009 break
11010 }
11011 v.reset(Op386SARL)
11012 v.AddArg2(x, y)
11013 return true
11014 }
11015 return false
11016 }
11017 func rewriteValue386_OpRsh8Ux16(v *Value) bool {
11018 v_1 := v.Args[1]
11019 v_0 := v.Args[0]
11020 b := v.Block
11021
11022
11023
11024 for {
11025 t := v.Type
11026 x := v_0
11027 y := v_1
11028 if !(!shiftIsBounded(v)) {
11029 break
11030 }
11031 v.reset(Op386ANDL)
11032 v0 := b.NewValue0(v.Pos, Op386SHRB, t)
11033 v0.AddArg2(x, y)
11034 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
11035 v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
11036 v2.AuxInt = int16ToAuxInt(8)
11037 v2.AddArg(y)
11038 v1.AddArg(v2)
11039 v.AddArg2(v0, v1)
11040 return true
11041 }
11042
11043
11044
11045 for {
11046 t := v.Type
11047 x := v_0
11048 y := v_1
11049 if !(shiftIsBounded(v)) {
11050 break
11051 }
11052 v.reset(Op386SHRB)
11053 v.Type = t
11054 v.AddArg2(x, y)
11055 return true
11056 }
11057 return false
11058 }
11059 func rewriteValue386_OpRsh8Ux32(v *Value) bool {
11060 v_1 := v.Args[1]
11061 v_0 := v.Args[0]
11062 b := v.Block
11063
11064
11065
11066 for {
11067 t := v.Type
11068 x := v_0
11069 y := v_1
11070 if !(!shiftIsBounded(v)) {
11071 break
11072 }
11073 v.reset(Op386ANDL)
11074 v0 := b.NewValue0(v.Pos, Op386SHRB, t)
11075 v0.AddArg2(x, y)
11076 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
11077 v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
11078 v2.AuxInt = int32ToAuxInt(8)
11079 v2.AddArg(y)
11080 v1.AddArg(v2)
11081 v.AddArg2(v0, v1)
11082 return true
11083 }
11084
11085
11086
11087 for {
11088 t := v.Type
11089 x := v_0
11090 y := v_1
11091 if !(shiftIsBounded(v)) {
11092 break
11093 }
11094 v.reset(Op386SHRB)
11095 v.Type = t
11096 v.AddArg2(x, y)
11097 return true
11098 }
11099 return false
11100 }
11101 func rewriteValue386_OpRsh8Ux64(v *Value) bool {
11102 v_1 := v.Args[1]
11103 v_0 := v.Args[0]
11104
11105
11106
11107 for {
11108 x := v_0
11109 if v_1.Op != OpConst64 {
11110 break
11111 }
11112 c := auxIntToInt64(v_1.AuxInt)
11113 if !(uint64(c) < 8) {
11114 break
11115 }
11116 v.reset(Op386SHRBconst)
11117 v.AuxInt = int8ToAuxInt(int8(c))
11118 v.AddArg(x)
11119 return true
11120 }
11121
11122
11123
11124 for {
11125 if v_1.Op != OpConst64 {
11126 break
11127 }
11128 c := auxIntToInt64(v_1.AuxInt)
11129 if !(uint64(c) >= 8) {
11130 break
11131 }
11132 v.reset(OpConst8)
11133 v.AuxInt = int8ToAuxInt(0)
11134 return true
11135 }
11136 return false
11137 }
11138 func rewriteValue386_OpRsh8Ux8(v *Value) bool {
11139 v_1 := v.Args[1]
11140 v_0 := v.Args[0]
11141 b := v.Block
11142
11143
11144
11145 for {
11146 t := v.Type
11147 x := v_0
11148 y := v_1
11149 if !(!shiftIsBounded(v)) {
11150 break
11151 }
11152 v.reset(Op386ANDL)
11153 v0 := b.NewValue0(v.Pos, Op386SHRB, t)
11154 v0.AddArg2(x, y)
11155 v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
11156 v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
11157 v2.AuxInt = int8ToAuxInt(8)
11158 v2.AddArg(y)
11159 v1.AddArg(v2)
11160 v.AddArg2(v0, v1)
11161 return true
11162 }
11163
11164
11165
11166 for {
11167 t := v.Type
11168 x := v_0
11169 y := v_1
11170 if !(shiftIsBounded(v)) {
11171 break
11172 }
11173 v.reset(Op386SHRB)
11174 v.Type = t
11175 v.AddArg2(x, y)
11176 return true
11177 }
11178 return false
11179 }
11180 func rewriteValue386_OpRsh8x16(v *Value) bool {
11181 v_1 := v.Args[1]
11182 v_0 := v.Args[0]
11183 b := v.Block
11184
11185
11186
11187 for {
11188 t := v.Type
11189 x := v_0
11190 y := v_1
11191 if !(!shiftIsBounded(v)) {
11192 break
11193 }
11194 v.reset(Op386SARB)
11195 v.Type = t
11196 v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
11197 v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
11198 v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
11199 v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
11200 v3.AuxInt = int16ToAuxInt(8)
11201 v3.AddArg(y)
11202 v2.AddArg(v3)
11203 v1.AddArg(v2)
11204 v0.AddArg2(y, v1)
11205 v.AddArg2(x, v0)
11206 return true
11207 }
11208
11209
11210
11211 for {
11212 x := v_0
11213 y := v_1
11214 if !(shiftIsBounded(v)) {
11215 break
11216 }
11217 v.reset(Op386SARB)
11218 v.AddArg2(x, y)
11219 return true
11220 }
11221 return false
11222 }
11223 func rewriteValue386_OpRsh8x32(v *Value) bool {
11224 v_1 := v.Args[1]
11225 v_0 := v.Args[0]
11226 b := v.Block
11227
11228
11229
11230 for {
11231 t := v.Type
11232 x := v_0
11233 y := v_1
11234 if !(!shiftIsBounded(v)) {
11235 break
11236 }
11237 v.reset(Op386SARB)
11238 v.Type = t
11239 v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
11240 v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
11241 v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
11242 v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
11243 v3.AuxInt = int32ToAuxInt(8)
11244 v3.AddArg(y)
11245 v2.AddArg(v3)
11246 v1.AddArg(v2)
11247 v0.AddArg2(y, v1)
11248 v.AddArg2(x, v0)
11249 return true
11250 }
11251
11252
11253
11254 for {
11255 x := v_0
11256 y := v_1
11257 if !(shiftIsBounded(v)) {
11258 break
11259 }
11260 v.reset(Op386SARB)
11261 v.AddArg2(x, y)
11262 return true
11263 }
11264 return false
11265 }
11266 func rewriteValue386_OpRsh8x64(v *Value) bool {
11267 v_1 := v.Args[1]
11268 v_0 := v.Args[0]
11269
11270
11271
11272 for {
11273 x := v_0
11274 if v_1.Op != OpConst64 {
11275 break
11276 }
11277 c := auxIntToInt64(v_1.AuxInt)
11278 if !(uint64(c) < 8) {
11279 break
11280 }
11281 v.reset(Op386SARBconst)
11282 v.AuxInt = int8ToAuxInt(int8(c))
11283 v.AddArg(x)
11284 return true
11285 }
11286
11287
11288
11289 for {
11290 x := v_0
11291 if v_1.Op != OpConst64 {
11292 break
11293 }
11294 c := auxIntToInt64(v_1.AuxInt)
11295 if !(uint64(c) >= 8) {
11296 break
11297 }
11298 v.reset(Op386SARBconst)
11299 v.AuxInt = int8ToAuxInt(7)
11300 v.AddArg(x)
11301 return true
11302 }
11303 return false
11304 }
11305 func rewriteValue386_OpRsh8x8(v *Value) bool {
11306 v_1 := v.Args[1]
11307 v_0 := v.Args[0]
11308 b := v.Block
11309
11310
11311
11312 for {
11313 t := v.Type
11314 x := v_0
11315 y := v_1
11316 if !(!shiftIsBounded(v)) {
11317 break
11318 }
11319 v.reset(Op386SARB)
11320 v.Type = t
11321 v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
11322 v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
11323 v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
11324 v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
11325 v3.AuxInt = int8ToAuxInt(8)
11326 v3.AddArg(y)
11327 v2.AddArg(v3)
11328 v1.AddArg(v2)
11329 v0.AddArg2(y, v1)
11330 v.AddArg2(x, v0)
11331 return true
11332 }
11333
11334
11335
11336 for {
11337 x := v_0
11338 y := v_1
11339 if !(shiftIsBounded(v)) {
11340 break
11341 }
11342 v.reset(Op386SARB)
11343 v.AddArg2(x, y)
11344 return true
11345 }
11346 return false
11347 }
11348 func rewriteValue386_OpSelect0(v *Value) bool {
11349 v_0 := v.Args[0]
11350 b := v.Block
11351 typ := &b.Func.Config.Types
11352
11353
11354 for {
11355 if v_0.Op != OpMul32uover {
11356 break
11357 }
11358 y := v_0.Args[1]
11359 x := v_0.Args[0]
11360 v.reset(OpSelect0)
11361 v.Type = typ.UInt32
11362 v0 := b.NewValue0(v.Pos, Op386MULLU, types.NewTuple(typ.UInt32, types.TypeFlags))
11363 v0.AddArg2(x, y)
11364 v.AddArg(v0)
11365 return true
11366 }
11367 return false
11368 }
11369 func rewriteValue386_OpSelect1(v *Value) bool {
11370 v_0 := v.Args[0]
11371 b := v.Block
11372 typ := &b.Func.Config.Types
11373
11374
11375 for {
11376 if v_0.Op != OpMul32uover {
11377 break
11378 }
11379 y := v_0.Args[1]
11380 x := v_0.Args[0]
11381 v.reset(Op386SETO)
11382 v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
11383 v1 := b.NewValue0(v.Pos, Op386MULLU, types.NewTuple(typ.UInt32, types.TypeFlags))
11384 v1.AddArg2(x, y)
11385 v0.AddArg(v1)
11386 v.AddArg(v0)
11387 return true
11388 }
11389 return false
11390 }
11391 func rewriteValue386_OpSignmask(v *Value) bool {
11392 v_0 := v.Args[0]
11393
11394
11395 for {
11396 x := v_0
11397 v.reset(Op386SARLconst)
11398 v.AuxInt = int32ToAuxInt(31)
11399 v.AddArg(x)
11400 return true
11401 }
11402 }
11403 func rewriteValue386_OpSlicemask(v *Value) bool {
11404 v_0 := v.Args[0]
11405 b := v.Block
11406
11407
11408 for {
11409 t := v.Type
11410 x := v_0
11411 v.reset(Op386SARLconst)
11412 v.AuxInt = int32ToAuxInt(31)
11413 v0 := b.NewValue0(v.Pos, Op386NEGL, t)
11414 v0.AddArg(x)
11415 v.AddArg(v0)
11416 return true
11417 }
11418 }
11419 func rewriteValue386_OpStore(v *Value) bool {
11420 v_2 := v.Args[2]
11421 v_1 := v.Args[1]
11422 v_0 := v.Args[0]
11423
11424
11425
11426 for {
11427 t := auxToType(v.Aux)
11428 ptr := v_0
11429 val := v_1
11430 mem := v_2
11431 if !(t.Size() == 8 && is64BitFloat(val.Type)) {
11432 break
11433 }
11434 v.reset(Op386MOVSDstore)
11435 v.AddArg3(ptr, val, mem)
11436 return true
11437 }
11438
11439
11440
11441 for {
11442 t := auxToType(v.Aux)
11443 ptr := v_0
11444 val := v_1
11445 mem := v_2
11446 if !(t.Size() == 4 && is32BitFloat(val.Type)) {
11447 break
11448 }
11449 v.reset(Op386MOVSSstore)
11450 v.AddArg3(ptr, val, mem)
11451 return true
11452 }
11453
11454
11455
11456 for {
11457 t := auxToType(v.Aux)
11458 ptr := v_0
11459 val := v_1
11460 mem := v_2
11461 if !(t.Size() == 4) {
11462 break
11463 }
11464 v.reset(Op386MOVLstore)
11465 v.AddArg3(ptr, val, mem)
11466 return true
11467 }
11468
11469
11470
11471 for {
11472 t := auxToType(v.Aux)
11473 ptr := v_0
11474 val := v_1
11475 mem := v_2
11476 if !(t.Size() == 2) {
11477 break
11478 }
11479 v.reset(Op386MOVWstore)
11480 v.AddArg3(ptr, val, mem)
11481 return true
11482 }
11483
11484
11485
11486 for {
11487 t := auxToType(v.Aux)
11488 ptr := v_0
11489 val := v_1
11490 mem := v_2
11491 if !(t.Size() == 1) {
11492 break
11493 }
11494 v.reset(Op386MOVBstore)
11495 v.AddArg3(ptr, val, mem)
11496 return true
11497 }
11498 return false
11499 }
11500 func rewriteValue386_OpZero(v *Value) bool {
11501 v_1 := v.Args[1]
11502 v_0 := v.Args[0]
11503 b := v.Block
11504 config := b.Func.Config
11505 typ := &b.Func.Config.Types
11506
11507
11508 for {
11509 if auxIntToInt64(v.AuxInt) != 0 {
11510 break
11511 }
11512 mem := v_1
11513 v.copyOf(mem)
11514 return true
11515 }
11516
11517
11518 for {
11519 if auxIntToInt64(v.AuxInt) != 1 {
11520 break
11521 }
11522 destptr := v_0
11523 mem := v_1
11524 v.reset(Op386MOVBstoreconst)
11525 v.AuxInt = valAndOffToAuxInt(0)
11526 v.AddArg2(destptr, mem)
11527 return true
11528 }
11529
11530
11531 for {
11532 if auxIntToInt64(v.AuxInt) != 2 {
11533 break
11534 }
11535 destptr := v_0
11536 mem := v_1
11537 v.reset(Op386MOVWstoreconst)
11538 v.AuxInt = valAndOffToAuxInt(0)
11539 v.AddArg2(destptr, mem)
11540 return true
11541 }
11542
11543
11544 for {
11545 if auxIntToInt64(v.AuxInt) != 4 {
11546 break
11547 }
11548 destptr := v_0
11549 mem := v_1
11550 v.reset(Op386MOVLstoreconst)
11551 v.AuxInt = valAndOffToAuxInt(0)
11552 v.AddArg2(destptr, mem)
11553 return true
11554 }
11555
11556
11557 for {
11558 if auxIntToInt64(v.AuxInt) != 3 {
11559 break
11560 }
11561 destptr := v_0
11562 mem := v_1
11563 v.reset(Op386MOVBstoreconst)
11564 v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 2))
11565 v0 := b.NewValue0(v.Pos, Op386MOVWstoreconst, types.TypeMem)
11566 v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
11567 v0.AddArg2(destptr, mem)
11568 v.AddArg2(destptr, v0)
11569 return true
11570 }
11571
11572
11573 for {
11574 if auxIntToInt64(v.AuxInt) != 5 {
11575 break
11576 }
11577 destptr := v_0
11578 mem := v_1
11579 v.reset(Op386MOVBstoreconst)
11580 v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
11581 v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
11582 v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
11583 v0.AddArg2(destptr, mem)
11584 v.AddArg2(destptr, v0)
11585 return true
11586 }
11587
11588
11589 for {
11590 if auxIntToInt64(v.AuxInt) != 6 {
11591 break
11592 }
11593 destptr := v_0
11594 mem := v_1
11595 v.reset(Op386MOVWstoreconst)
11596 v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
11597 v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
11598 v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
11599 v0.AddArg2(destptr, mem)
11600 v.AddArg2(destptr, v0)
11601 return true
11602 }
11603
11604
11605 for {
11606 if auxIntToInt64(v.AuxInt) != 7 {
11607 break
11608 }
11609 destptr := v_0
11610 mem := v_1
11611 v.reset(Op386MOVLstoreconst)
11612 v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 3))
11613 v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
11614 v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
11615 v0.AddArg2(destptr, mem)
11616 v.AddArg2(destptr, v0)
11617 return true
11618 }
11619
11620
11621
11622 for {
11623 s := auxIntToInt64(v.AuxInt)
11624 destptr := v_0
11625 mem := v_1
11626 if !(s%4 != 0 && s > 4) {
11627 break
11628 }
11629 v.reset(OpZero)
11630 v.AuxInt = int64ToAuxInt(s - s%4)
11631 v0 := b.NewValue0(v.Pos, Op386ADDLconst, typ.UInt32)
11632 v0.AuxInt = int32ToAuxInt(int32(s % 4))
11633 v0.AddArg(destptr)
11634 v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
11635 v1.AuxInt = valAndOffToAuxInt(0)
11636 v1.AddArg2(destptr, mem)
11637 v.AddArg2(v0, v1)
11638 return true
11639 }
11640
11641
11642 for {
11643 if auxIntToInt64(v.AuxInt) != 8 {
11644 break
11645 }
11646 destptr := v_0
11647 mem := v_1
11648 v.reset(Op386MOVLstoreconst)
11649 v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
11650 v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
11651 v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
11652 v0.AddArg2(destptr, mem)
11653 v.AddArg2(destptr, v0)
11654 return true
11655 }
11656
11657
11658 for {
11659 if auxIntToInt64(v.AuxInt) != 12 {
11660 break
11661 }
11662 destptr := v_0
11663 mem := v_1
11664 v.reset(Op386MOVLstoreconst)
11665 v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 8))
11666 v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
11667 v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
11668 v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
11669 v1.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
11670 v1.AddArg2(destptr, mem)
11671 v0.AddArg2(destptr, v1)
11672 v.AddArg2(destptr, v0)
11673 return true
11674 }
11675
11676
11677 for {
11678 if auxIntToInt64(v.AuxInt) != 16 {
11679 break
11680 }
11681 destptr := v_0
11682 mem := v_1
11683 v.reset(Op386MOVLstoreconst)
11684 v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 12))
11685 v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
11686 v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 8))
11687 v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
11688 v1.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
11689 v2 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
11690 v2.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
11691 v2.AddArg2(destptr, mem)
11692 v1.AddArg2(destptr, v2)
11693 v0.AddArg2(destptr, v1)
11694 v.AddArg2(destptr, v0)
11695 return true
11696 }
11697
11698
11699
11700 for {
11701 s := auxIntToInt64(v.AuxInt)
11702 destptr := v_0
11703 mem := v_1
11704 if !(s > 16 && s <= 4*128 && s%4 == 0 && !config.noDuffDevice) {
11705 break
11706 }
11707 v.reset(Op386DUFFZERO)
11708 v.AuxInt = int64ToAuxInt(1 * (128 - s/4))
11709 v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
11710 v0.AuxInt = int32ToAuxInt(0)
11711 v.AddArg3(destptr, v0, mem)
11712 return true
11713 }
11714
11715
11716
11717 for {
11718 s := auxIntToInt64(v.AuxInt)
11719 destptr := v_0
11720 mem := v_1
11721 if !((s > 4*128 || (config.noDuffDevice && s > 16)) && s%4 == 0) {
11722 break
11723 }
11724 v.reset(Op386REPSTOSL)
11725 v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
11726 v0.AuxInt = int32ToAuxInt(int32(s / 4))
11727 v1 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
11728 v1.AuxInt = int32ToAuxInt(0)
11729 v.AddArg4(destptr, v0, v1, mem)
11730 return true
11731 }
11732 return false
11733 }
11734 func rewriteValue386_OpZeromask(v *Value) bool {
11735 v_0 := v.Args[0]
11736 b := v.Block
11737
11738
11739 for {
11740 t := v.Type
11741 x := v_0
11742 v.reset(Op386XORLconst)
11743 v.AuxInt = int32ToAuxInt(-1)
11744 v0 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
11745 v1 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
11746 v1.AuxInt = int32ToAuxInt(1)
11747 v1.AddArg(x)
11748 v0.AddArg(v1)
11749 v.AddArg(v0)
11750 return true
11751 }
11752 }
11753 func rewriteBlock386(b *Block) bool {
11754 switch b.Kind {
11755 case Block386EQ:
11756
11757
11758 for b.Controls[0].Op == Op386InvertFlags {
11759 v_0 := b.Controls[0]
11760 cmp := v_0.Args[0]
11761 b.resetWithControl(Block386EQ, cmp)
11762 return true
11763 }
11764
11765
11766 for b.Controls[0].Op == Op386FlagEQ {
11767 b.Reset(BlockFirst)
11768 return true
11769 }
11770
11771
11772 for b.Controls[0].Op == Op386FlagLT_ULT {
11773 b.Reset(BlockFirst)
11774 b.swapSuccessors()
11775 return true
11776 }
11777
11778
11779 for b.Controls[0].Op == Op386FlagLT_UGT {
11780 b.Reset(BlockFirst)
11781 b.swapSuccessors()
11782 return true
11783 }
11784
11785
11786 for b.Controls[0].Op == Op386FlagGT_ULT {
11787 b.Reset(BlockFirst)
11788 b.swapSuccessors()
11789 return true
11790 }
11791
11792
11793 for b.Controls[0].Op == Op386FlagGT_UGT {
11794 b.Reset(BlockFirst)
11795 b.swapSuccessors()
11796 return true
11797 }
11798 case Block386GE:
11799
11800
11801 for b.Controls[0].Op == Op386InvertFlags {
11802 v_0 := b.Controls[0]
11803 cmp := v_0.Args[0]
11804 b.resetWithControl(Block386LE, cmp)
11805 return true
11806 }
11807
11808
11809 for b.Controls[0].Op == Op386FlagEQ {
11810 b.Reset(BlockFirst)
11811 return true
11812 }
11813
11814
11815 for b.Controls[0].Op == Op386FlagLT_ULT {
11816 b.Reset(BlockFirst)
11817 b.swapSuccessors()
11818 return true
11819 }
11820
11821
11822 for b.Controls[0].Op == Op386FlagLT_UGT {
11823 b.Reset(BlockFirst)
11824 b.swapSuccessors()
11825 return true
11826 }
11827
11828
11829 for b.Controls[0].Op == Op386FlagGT_ULT {
11830 b.Reset(BlockFirst)
11831 return true
11832 }
11833
11834
11835 for b.Controls[0].Op == Op386FlagGT_UGT {
11836 b.Reset(BlockFirst)
11837 return true
11838 }
11839 case Block386GT:
11840
11841
11842 for b.Controls[0].Op == Op386InvertFlags {
11843 v_0 := b.Controls[0]
11844 cmp := v_0.Args[0]
11845 b.resetWithControl(Block386LT, cmp)
11846 return true
11847 }
11848
11849
11850 for b.Controls[0].Op == Op386FlagEQ {
11851 b.Reset(BlockFirst)
11852 b.swapSuccessors()
11853 return true
11854 }
11855
11856
11857 for b.Controls[0].Op == Op386FlagLT_ULT {
11858 b.Reset(BlockFirst)
11859 b.swapSuccessors()
11860 return true
11861 }
11862
11863
11864 for b.Controls[0].Op == Op386FlagLT_UGT {
11865 b.Reset(BlockFirst)
11866 b.swapSuccessors()
11867 return true
11868 }
11869
11870
11871 for b.Controls[0].Op == Op386FlagGT_ULT {
11872 b.Reset(BlockFirst)
11873 return true
11874 }
11875
11876
11877 for b.Controls[0].Op == Op386FlagGT_UGT {
11878 b.Reset(BlockFirst)
11879 return true
11880 }
11881 case BlockIf:
11882
11883
11884 for b.Controls[0].Op == Op386SETL {
11885 v_0 := b.Controls[0]
11886 cmp := v_0.Args[0]
11887 b.resetWithControl(Block386LT, cmp)
11888 return true
11889 }
11890
11891
11892 for b.Controls[0].Op == Op386SETLE {
11893 v_0 := b.Controls[0]
11894 cmp := v_0.Args[0]
11895 b.resetWithControl(Block386LE, cmp)
11896 return true
11897 }
11898
11899
11900 for b.Controls[0].Op == Op386SETG {
11901 v_0 := b.Controls[0]
11902 cmp := v_0.Args[0]
11903 b.resetWithControl(Block386GT, cmp)
11904 return true
11905 }
11906
11907
11908 for b.Controls[0].Op == Op386SETGE {
11909 v_0 := b.Controls[0]
11910 cmp := v_0.Args[0]
11911 b.resetWithControl(Block386GE, cmp)
11912 return true
11913 }
11914
11915
11916 for b.Controls[0].Op == Op386SETEQ {
11917 v_0 := b.Controls[0]
11918 cmp := v_0.Args[0]
11919 b.resetWithControl(Block386EQ, cmp)
11920 return true
11921 }
11922
11923
11924 for b.Controls[0].Op == Op386SETNE {
11925 v_0 := b.Controls[0]
11926 cmp := v_0.Args[0]
11927 b.resetWithControl(Block386NE, cmp)
11928 return true
11929 }
11930
11931
11932 for b.Controls[0].Op == Op386SETB {
11933 v_0 := b.Controls[0]
11934 cmp := v_0.Args[0]
11935 b.resetWithControl(Block386ULT, cmp)
11936 return true
11937 }
11938
11939
11940 for b.Controls[0].Op == Op386SETBE {
11941 v_0 := b.Controls[0]
11942 cmp := v_0.Args[0]
11943 b.resetWithControl(Block386ULE, cmp)
11944 return true
11945 }
11946
11947
11948 for b.Controls[0].Op == Op386SETA {
11949 v_0 := b.Controls[0]
11950 cmp := v_0.Args[0]
11951 b.resetWithControl(Block386UGT, cmp)
11952 return true
11953 }
11954
11955
11956 for b.Controls[0].Op == Op386SETAE {
11957 v_0 := b.Controls[0]
11958 cmp := v_0.Args[0]
11959 b.resetWithControl(Block386UGE, cmp)
11960 return true
11961 }
11962
11963
11964 for b.Controls[0].Op == Op386SETO {
11965 v_0 := b.Controls[0]
11966 cmp := v_0.Args[0]
11967 b.resetWithControl(Block386OS, cmp)
11968 return true
11969 }
11970
11971
11972 for b.Controls[0].Op == Op386SETGF {
11973 v_0 := b.Controls[0]
11974 cmp := v_0.Args[0]
11975 b.resetWithControl(Block386UGT, cmp)
11976 return true
11977 }
11978
11979
11980 for b.Controls[0].Op == Op386SETGEF {
11981 v_0 := b.Controls[0]
11982 cmp := v_0.Args[0]
11983 b.resetWithControl(Block386UGE, cmp)
11984 return true
11985 }
11986
11987
11988 for b.Controls[0].Op == Op386SETEQF {
11989 v_0 := b.Controls[0]
11990 cmp := v_0.Args[0]
11991 b.resetWithControl(Block386EQF, cmp)
11992 return true
11993 }
11994
11995
11996 for b.Controls[0].Op == Op386SETNEF {
11997 v_0 := b.Controls[0]
11998 cmp := v_0.Args[0]
11999 b.resetWithControl(Block386NEF, cmp)
12000 return true
12001 }
12002
12003
12004 for {
12005 cond := b.Controls[0]
12006 v0 := b.NewValue0(cond.Pos, Op386TESTB, types.TypeFlags)
12007 v0.AddArg2(cond, cond)
12008 b.resetWithControl(Block386NE, v0)
12009 return true
12010 }
12011 case Block386LE:
12012
12013
12014 for b.Controls[0].Op == Op386InvertFlags {
12015 v_0 := b.Controls[0]
12016 cmp := v_0.Args[0]
12017 b.resetWithControl(Block386GE, cmp)
12018 return true
12019 }
12020
12021
12022 for b.Controls[0].Op == Op386FlagEQ {
12023 b.Reset(BlockFirst)
12024 return true
12025 }
12026
12027
12028 for b.Controls[0].Op == Op386FlagLT_ULT {
12029 b.Reset(BlockFirst)
12030 return true
12031 }
12032
12033
12034 for b.Controls[0].Op == Op386FlagLT_UGT {
12035 b.Reset(BlockFirst)
12036 return true
12037 }
12038
12039
12040 for b.Controls[0].Op == Op386FlagGT_ULT {
12041 b.Reset(BlockFirst)
12042 b.swapSuccessors()
12043 return true
12044 }
12045
12046
12047 for b.Controls[0].Op == Op386FlagGT_UGT {
12048 b.Reset(BlockFirst)
12049 b.swapSuccessors()
12050 return true
12051 }
12052 case Block386LT:
12053
12054
12055 for b.Controls[0].Op == Op386InvertFlags {
12056 v_0 := b.Controls[0]
12057 cmp := v_0.Args[0]
12058 b.resetWithControl(Block386GT, cmp)
12059 return true
12060 }
12061
12062
12063 for b.Controls[0].Op == Op386FlagEQ {
12064 b.Reset(BlockFirst)
12065 b.swapSuccessors()
12066 return true
12067 }
12068
12069
12070 for b.Controls[0].Op == Op386FlagLT_ULT {
12071 b.Reset(BlockFirst)
12072 return true
12073 }
12074
12075
12076 for b.Controls[0].Op == Op386FlagLT_UGT {
12077 b.Reset(BlockFirst)
12078 return true
12079 }
12080
12081
12082 for b.Controls[0].Op == Op386FlagGT_ULT {
12083 b.Reset(BlockFirst)
12084 b.swapSuccessors()
12085 return true
12086 }
12087
12088
12089 for b.Controls[0].Op == Op386FlagGT_UGT {
12090 b.Reset(BlockFirst)
12091 b.swapSuccessors()
12092 return true
12093 }
12094 case Block386NE:
12095
12096
12097 for b.Controls[0].Op == Op386TESTB {
12098 v_0 := b.Controls[0]
12099 _ = v_0.Args[1]
12100 v_0_0 := v_0.Args[0]
12101 if v_0_0.Op != Op386SETL {
12102 break
12103 }
12104 cmp := v_0_0.Args[0]
12105 v_0_1 := v_0.Args[1]
12106 if v_0_1.Op != Op386SETL || cmp != v_0_1.Args[0] {
12107 break
12108 }
12109 b.resetWithControl(Block386LT, cmp)
12110 return true
12111 }
12112
12113
12114 for b.Controls[0].Op == Op386TESTB {
12115 v_0 := b.Controls[0]
12116 _ = v_0.Args[1]
12117 v_0_0 := v_0.Args[0]
12118 if v_0_0.Op != Op386SETLE {
12119 break
12120 }
12121 cmp := v_0_0.Args[0]
12122 v_0_1 := v_0.Args[1]
12123 if v_0_1.Op != Op386SETLE || cmp != v_0_1.Args[0] {
12124 break
12125 }
12126 b.resetWithControl(Block386LE, cmp)
12127 return true
12128 }
12129
12130
12131 for b.Controls[0].Op == Op386TESTB {
12132 v_0 := b.Controls[0]
12133 _ = v_0.Args[1]
12134 v_0_0 := v_0.Args[0]
12135 if v_0_0.Op != Op386SETG {
12136 break
12137 }
12138 cmp := v_0_0.Args[0]
12139 v_0_1 := v_0.Args[1]
12140 if v_0_1.Op != Op386SETG || cmp != v_0_1.Args[0] {
12141 break
12142 }
12143 b.resetWithControl(Block386GT, cmp)
12144 return true
12145 }
12146
12147
12148 for b.Controls[0].Op == Op386TESTB {
12149 v_0 := b.Controls[0]
12150 _ = v_0.Args[1]
12151 v_0_0 := v_0.Args[0]
12152 if v_0_0.Op != Op386SETGE {
12153 break
12154 }
12155 cmp := v_0_0.Args[0]
12156 v_0_1 := v_0.Args[1]
12157 if v_0_1.Op != Op386SETGE || cmp != v_0_1.Args[0] {
12158 break
12159 }
12160 b.resetWithControl(Block386GE, cmp)
12161 return true
12162 }
12163
12164
12165 for b.Controls[0].Op == Op386TESTB {
12166 v_0 := b.Controls[0]
12167 _ = v_0.Args[1]
12168 v_0_0 := v_0.Args[0]
12169 if v_0_0.Op != Op386SETEQ {
12170 break
12171 }
12172 cmp := v_0_0.Args[0]
12173 v_0_1 := v_0.Args[1]
12174 if v_0_1.Op != Op386SETEQ || cmp != v_0_1.Args[0] {
12175 break
12176 }
12177 b.resetWithControl(Block386EQ, cmp)
12178 return true
12179 }
12180
12181
12182 for b.Controls[0].Op == Op386TESTB {
12183 v_0 := b.Controls[0]
12184 _ = v_0.Args[1]
12185 v_0_0 := v_0.Args[0]
12186 if v_0_0.Op != Op386SETNE {
12187 break
12188 }
12189 cmp := v_0_0.Args[0]
12190 v_0_1 := v_0.Args[1]
12191 if v_0_1.Op != Op386SETNE || cmp != v_0_1.Args[0] {
12192 break
12193 }
12194 b.resetWithControl(Block386NE, cmp)
12195 return true
12196 }
12197
12198
12199 for b.Controls[0].Op == Op386TESTB {
12200 v_0 := b.Controls[0]
12201 _ = v_0.Args[1]
12202 v_0_0 := v_0.Args[0]
12203 if v_0_0.Op != Op386SETB {
12204 break
12205 }
12206 cmp := v_0_0.Args[0]
12207 v_0_1 := v_0.Args[1]
12208 if v_0_1.Op != Op386SETB || cmp != v_0_1.Args[0] {
12209 break
12210 }
12211 b.resetWithControl(Block386ULT, cmp)
12212 return true
12213 }
12214
12215
12216 for b.Controls[0].Op == Op386TESTB {
12217 v_0 := b.Controls[0]
12218 _ = v_0.Args[1]
12219 v_0_0 := v_0.Args[0]
12220 if v_0_0.Op != Op386SETBE {
12221 break
12222 }
12223 cmp := v_0_0.Args[0]
12224 v_0_1 := v_0.Args[1]
12225 if v_0_1.Op != Op386SETBE || cmp != v_0_1.Args[0] {
12226 break
12227 }
12228 b.resetWithControl(Block386ULE, cmp)
12229 return true
12230 }
12231
12232
12233 for b.Controls[0].Op == Op386TESTB {
12234 v_0 := b.Controls[0]
12235 _ = v_0.Args[1]
12236 v_0_0 := v_0.Args[0]
12237 if v_0_0.Op != Op386SETA {
12238 break
12239 }
12240 cmp := v_0_0.Args[0]
12241 v_0_1 := v_0.Args[1]
12242 if v_0_1.Op != Op386SETA || cmp != v_0_1.Args[0] {
12243 break
12244 }
12245 b.resetWithControl(Block386UGT, cmp)
12246 return true
12247 }
12248
12249
12250 for b.Controls[0].Op == Op386TESTB {
12251 v_0 := b.Controls[0]
12252 _ = v_0.Args[1]
12253 v_0_0 := v_0.Args[0]
12254 if v_0_0.Op != Op386SETAE {
12255 break
12256 }
12257 cmp := v_0_0.Args[0]
12258 v_0_1 := v_0.Args[1]
12259 if v_0_1.Op != Op386SETAE || cmp != v_0_1.Args[0] {
12260 break
12261 }
12262 b.resetWithControl(Block386UGE, cmp)
12263 return true
12264 }
12265
12266
12267 for b.Controls[0].Op == Op386TESTB {
12268 v_0 := b.Controls[0]
12269 _ = v_0.Args[1]
12270 v_0_0 := v_0.Args[0]
12271 if v_0_0.Op != Op386SETO {
12272 break
12273 }
12274 cmp := v_0_0.Args[0]
12275 v_0_1 := v_0.Args[1]
12276 if v_0_1.Op != Op386SETO || cmp != v_0_1.Args[0] {
12277 break
12278 }
12279 b.resetWithControl(Block386OS, cmp)
12280 return true
12281 }
12282
12283
12284 for b.Controls[0].Op == Op386TESTB {
12285 v_0 := b.Controls[0]
12286 _ = v_0.Args[1]
12287 v_0_0 := v_0.Args[0]
12288 if v_0_0.Op != Op386SETGF {
12289 break
12290 }
12291 cmp := v_0_0.Args[0]
12292 v_0_1 := v_0.Args[1]
12293 if v_0_1.Op != Op386SETGF || cmp != v_0_1.Args[0] {
12294 break
12295 }
12296 b.resetWithControl(Block386UGT, cmp)
12297 return true
12298 }
12299
12300
12301 for b.Controls[0].Op == Op386TESTB {
12302 v_0 := b.Controls[0]
12303 _ = v_0.Args[1]
12304 v_0_0 := v_0.Args[0]
12305 if v_0_0.Op != Op386SETGEF {
12306 break
12307 }
12308 cmp := v_0_0.Args[0]
12309 v_0_1 := v_0.Args[1]
12310 if v_0_1.Op != Op386SETGEF || cmp != v_0_1.Args[0] {
12311 break
12312 }
12313 b.resetWithControl(Block386UGE, cmp)
12314 return true
12315 }
12316
12317
12318 for b.Controls[0].Op == Op386TESTB {
12319 v_0 := b.Controls[0]
12320 _ = v_0.Args[1]
12321 v_0_0 := v_0.Args[0]
12322 if v_0_0.Op != Op386SETEQF {
12323 break
12324 }
12325 cmp := v_0_0.Args[0]
12326 v_0_1 := v_0.Args[1]
12327 if v_0_1.Op != Op386SETEQF || cmp != v_0_1.Args[0] {
12328 break
12329 }
12330 b.resetWithControl(Block386EQF, cmp)
12331 return true
12332 }
12333
12334
12335 for b.Controls[0].Op == Op386TESTB {
12336 v_0 := b.Controls[0]
12337 _ = v_0.Args[1]
12338 v_0_0 := v_0.Args[0]
12339 if v_0_0.Op != Op386SETNEF {
12340 break
12341 }
12342 cmp := v_0_0.Args[0]
12343 v_0_1 := v_0.Args[1]
12344 if v_0_1.Op != Op386SETNEF || cmp != v_0_1.Args[0] {
12345 break
12346 }
12347 b.resetWithControl(Block386NEF, cmp)
12348 return true
12349 }
12350
12351
12352 for b.Controls[0].Op == Op386InvertFlags {
12353 v_0 := b.Controls[0]
12354 cmp := v_0.Args[0]
12355 b.resetWithControl(Block386NE, cmp)
12356 return true
12357 }
12358
12359
12360 for b.Controls[0].Op == Op386FlagEQ {
12361 b.Reset(BlockFirst)
12362 b.swapSuccessors()
12363 return true
12364 }
12365
12366
12367 for b.Controls[0].Op == Op386FlagLT_ULT {
12368 b.Reset(BlockFirst)
12369 return true
12370 }
12371
12372
12373 for b.Controls[0].Op == Op386FlagLT_UGT {
12374 b.Reset(BlockFirst)
12375 return true
12376 }
12377
12378
12379 for b.Controls[0].Op == Op386FlagGT_ULT {
12380 b.Reset(BlockFirst)
12381 return true
12382 }
12383
12384
12385 for b.Controls[0].Op == Op386FlagGT_UGT {
12386 b.Reset(BlockFirst)
12387 return true
12388 }
12389 case Block386UGE:
12390
12391
12392 for b.Controls[0].Op == Op386InvertFlags {
12393 v_0 := b.Controls[0]
12394 cmp := v_0.Args[0]
12395 b.resetWithControl(Block386ULE, cmp)
12396 return true
12397 }
12398
12399
12400 for b.Controls[0].Op == Op386FlagEQ {
12401 b.Reset(BlockFirst)
12402 return true
12403 }
12404
12405
12406 for b.Controls[0].Op == Op386FlagLT_ULT {
12407 b.Reset(BlockFirst)
12408 b.swapSuccessors()
12409 return true
12410 }
12411
12412
12413 for b.Controls[0].Op == Op386FlagLT_UGT {
12414 b.Reset(BlockFirst)
12415 return true
12416 }
12417
12418
12419 for b.Controls[0].Op == Op386FlagGT_ULT {
12420 b.Reset(BlockFirst)
12421 b.swapSuccessors()
12422 return true
12423 }
12424
12425
12426 for b.Controls[0].Op == Op386FlagGT_UGT {
12427 b.Reset(BlockFirst)
12428 return true
12429 }
12430 case Block386UGT:
12431
12432
12433 for b.Controls[0].Op == Op386InvertFlags {
12434 v_0 := b.Controls[0]
12435 cmp := v_0.Args[0]
12436 b.resetWithControl(Block386ULT, cmp)
12437 return true
12438 }
12439
12440
12441 for b.Controls[0].Op == Op386FlagEQ {
12442 b.Reset(BlockFirst)
12443 b.swapSuccessors()
12444 return true
12445 }
12446
12447
12448 for b.Controls[0].Op == Op386FlagLT_ULT {
12449 b.Reset(BlockFirst)
12450 b.swapSuccessors()
12451 return true
12452 }
12453
12454
12455 for b.Controls[0].Op == Op386FlagLT_UGT {
12456 b.Reset(BlockFirst)
12457 return true
12458 }
12459
12460
12461 for b.Controls[0].Op == Op386FlagGT_ULT {
12462 b.Reset(BlockFirst)
12463 b.swapSuccessors()
12464 return true
12465 }
12466
12467
12468 for b.Controls[0].Op == Op386FlagGT_UGT {
12469 b.Reset(BlockFirst)
12470 return true
12471 }
12472 case Block386ULE:
12473
12474
12475 for b.Controls[0].Op == Op386InvertFlags {
12476 v_0 := b.Controls[0]
12477 cmp := v_0.Args[0]
12478 b.resetWithControl(Block386UGE, cmp)
12479 return true
12480 }
12481
12482
12483 for b.Controls[0].Op == Op386FlagEQ {
12484 b.Reset(BlockFirst)
12485 return true
12486 }
12487
12488
12489 for b.Controls[0].Op == Op386FlagLT_ULT {
12490 b.Reset(BlockFirst)
12491 return true
12492 }
12493
12494
12495 for b.Controls[0].Op == Op386FlagLT_UGT {
12496 b.Reset(BlockFirst)
12497 b.swapSuccessors()
12498 return true
12499 }
12500
12501
12502 for b.Controls[0].Op == Op386FlagGT_ULT {
12503 b.Reset(BlockFirst)
12504 return true
12505 }
12506
12507
12508 for b.Controls[0].Op == Op386FlagGT_UGT {
12509 b.Reset(BlockFirst)
12510 b.swapSuccessors()
12511 return true
12512 }
12513 case Block386ULT:
12514
12515
12516 for b.Controls[0].Op == Op386InvertFlags {
12517 v_0 := b.Controls[0]
12518 cmp := v_0.Args[0]
12519 b.resetWithControl(Block386UGT, cmp)
12520 return true
12521 }
12522
12523
12524 for b.Controls[0].Op == Op386FlagEQ {
12525 b.Reset(BlockFirst)
12526 b.swapSuccessors()
12527 return true
12528 }
12529
12530
12531 for b.Controls[0].Op == Op386FlagLT_ULT {
12532 b.Reset(BlockFirst)
12533 return true
12534 }
12535
12536
12537 for b.Controls[0].Op == Op386FlagLT_UGT {
12538 b.Reset(BlockFirst)
12539 b.swapSuccessors()
12540 return true
12541 }
12542
12543
12544 for b.Controls[0].Op == Op386FlagGT_ULT {
12545 b.Reset(BlockFirst)
12546 return true
12547 }
12548
12549
12550 for b.Controls[0].Op == Op386FlagGT_UGT {
12551 b.Reset(BlockFirst)
12552 b.swapSuccessors()
12553 return true
12554 }
12555 }
12556 return false
12557 }
12558
View as plain text