Source file
test/codegen/memcombine.go
1
2
3
4
5
6
7 package codegen
8
9 import (
10 "encoding/binary"
11 "runtime"
12 )
13
14
15
16
17
18 func load_le64(b []byte) uint64 {
19
20
21
22
23
24 return binary.LittleEndian.Uint64(b)
25 }
26
27 func load_le64_idx(b []byte, idx int) uint64 {
28
29
30
31
32
33 return binary.LittleEndian.Uint64(b[idx:])
34 }
35
36 func load_le32(b []byte) uint32 {
37
38
39
40
41
42
43 return binary.LittleEndian.Uint32(b)
44 }
45
46 func load_le32_idx(b []byte, idx int) uint32 {
47
48
49
50
51
52
53 return binary.LittleEndian.Uint32(b[idx:])
54 }
55
56 func load_le16(b []byte) uint16 {
57
58
59
60
61
62 return binary.LittleEndian.Uint16(b)
63 }
64
65 func load_le16_idx(b []byte, idx int) uint16 {
66
67
68
69
70
71 return binary.LittleEndian.Uint16(b[idx:])
72 }
73
74 func load_be64(b []byte) uint64 {
75
76
77
78
79
80
81 return binary.BigEndian.Uint64(b)
82 }
83
84 func load_be64_idx(b []byte, idx int) uint64 {
85
86
87
88
89
90
91 return binary.BigEndian.Uint64(b[idx:])
92 }
93
94 func load_be32(b []byte) uint32 {
95
96
97
98
99
100
101 return binary.BigEndian.Uint32(b)
102 }
103
104 func load_be32_idx(b []byte, idx int) uint32 {
105
106
107
108
109
110
111 return binary.BigEndian.Uint32(b[idx:])
112 }
113
114 func load_be16(b []byte) uint16 {
115
116
117
118
119
120 return binary.BigEndian.Uint16(b)
121 }
122
123 func load_be16_idx(b []byte, idx int) uint16 {
124
125
126
127
128
129 return binary.BigEndian.Uint16(b[idx:])
130 }
131
132 func load_le_byte2_uint16(s []byte) uint16 {
133
134
135
136
137
138 return uint16(s[0]) | uint16(s[1])<<8
139 }
140
141 func load_le_byte2_uint16_inv(s []byte) uint16 {
142
143
144
145
146
147 return uint16(s[1])<<8 | uint16(s[0])
148 }
149
150 func load_le_byte4_uint32(s []byte) uint32 {
151
152
153
154
155
156 return uint32(s[0]) | uint32(s[1])<<8 | uint32(s[2])<<16 | uint32(s[3])<<24
157 }
158
159 func load_le_byte4_uint32_inv(s []byte) uint32 {
160
161
162
163 return uint32(s[3])<<24 | uint32(s[2])<<16 | uint32(s[1])<<8 | uint32(s[0])
164 }
165
166 func load_le_byte8_uint64(s []byte) uint64 {
167
168
169
170
171 return uint64(s[0]) | uint64(s[1])<<8 | uint64(s[2])<<16 | uint64(s[3])<<24 | uint64(s[4])<<32 | uint64(s[5])<<40 | uint64(s[6])<<48 | uint64(s[7])<<56
172 }
173
174 func load_le_byte8_uint64_inv(s []byte) uint64 {
175
176
177
178 return uint64(s[7])<<56 | uint64(s[6])<<48 | uint64(s[5])<<40 | uint64(s[4])<<32 | uint64(s[3])<<24 | uint64(s[2])<<16 | uint64(s[1])<<8 | uint64(s[0])
179 }
180
181 func load_be_byte2_uint16(s []byte) uint16 {
182
183
184
185
186 return uint16(s[0])<<8 | uint16(s[1])
187 }
188
189 func load_be_byte2_uint16_inv(s []byte) uint16 {
190
191
192
193
194 return uint16(s[1]) | uint16(s[0])<<8
195 }
196
197 func load_be_byte4_uint32(s []byte) uint32 {
198
199
200
201 return uint32(s[0])<<24 | uint32(s[1])<<16 | uint32(s[2])<<8 | uint32(s[3])
202 }
203
204 func load_be_byte4_uint32_inv(s []byte) uint32 {
205
206
207
208
209
210 return uint32(s[3]) | uint32(s[2])<<8 | uint32(s[1])<<16 | uint32(s[0])<<24
211 }
212
213 func load_be_byte8_uint64(s []byte) uint64 {
214
215
216
217 return uint64(s[0])<<56 | uint64(s[1])<<48 | uint64(s[2])<<40 | uint64(s[3])<<32 | uint64(s[4])<<24 | uint64(s[5])<<16 | uint64(s[6])<<8 | uint64(s[7])
218 }
219
220 func load_be_byte8_uint64_inv(s []byte) uint64 {
221
222
223
224
225
226 return uint64(s[7]) | uint64(s[6])<<8 | uint64(s[5])<<16 | uint64(s[4])<<24 | uint64(s[3])<<32 | uint64(s[2])<<40 | uint64(s[1])<<48 | uint64(s[0])<<56
227 }
228
229 func load_le_byte2_uint16_idx(s []byte, idx int) uint16 {
230
231
232
233
234
235 return uint16(s[idx]) | uint16(s[idx+1])<<8
236 }
237
238 func load_le_byte2_uint16_idx_inv(s []byte, idx int) uint16 {
239
240
241
242
243
244 return uint16(s[idx+1])<<8 | uint16(s[idx])
245 }
246
247 func load_le_byte4_uint32_idx(s []byte, idx int) uint32 {
248
249
250 return uint32(s[idx]) | uint32(s[idx+1])<<8 | uint32(s[idx+2])<<16 | uint32(s[idx+3])<<24
251 }
252
253 func load_le_byte4_uint32_idx_inv(s []byte, idx int) uint32 {
254
255 return uint32(s[idx+3])<<24 | uint32(s[idx+2])<<16 | uint32(s[idx+1])<<8 | uint32(s[idx])
256 }
257
258 func load_le_byte8_uint64_idx(s []byte, idx int) uint64 {
259
260
261 return uint64(s[idx]) | uint64(s[idx+1])<<8 | uint64(s[idx+2])<<16 | uint64(s[idx+3])<<24 | uint64(s[idx+4])<<32 | uint64(s[idx+5])<<40 | uint64(s[idx+6])<<48 | uint64(s[idx+7])<<56
262 }
263
264 func load_le_byte8_uint64_idx_inv(s []byte, idx int) uint64 {
265
266 return uint64(s[idx+7])<<56 | uint64(s[idx+6])<<48 | uint64(s[idx+5])<<40 | uint64(s[idx+4])<<32 | uint64(s[idx+3])<<24 | uint64(s[idx+2])<<16 | uint64(s[idx+1])<<8 | uint64(s[idx])
267 }
268
269 func load_be_byte2_uint16_idx(s []byte, idx int) uint16 {
270
271
272 return uint16(s[idx])<<8 | uint16(s[idx+1])
273 }
274
275 func load_be_byte2_uint16_idx_inv(s []byte, idx int) uint16 {
276
277
278 return uint16(s[idx+1]) | uint16(s[idx])<<8
279 }
280
281 func load_be_byte4_uint32_idx(s []byte, idx int) uint32 {
282
283 return uint32(s[idx])<<24 | uint32(s[idx+1])<<16 | uint32(s[idx+2])<<8 | uint32(s[idx+3])
284 }
285
286 func load_be_byte8_uint64_idx(s []byte, idx int) uint64 {
287
288 return uint64(s[idx])<<56 | uint64(s[idx+1])<<48 | uint64(s[idx+2])<<40 | uint64(s[idx+3])<<32 | uint64(s[idx+4])<<24 | uint64(s[idx+5])<<16 | uint64(s[idx+6])<<8 | uint64(s[idx+7])
289 }
290
291 func load_le_byte2_uint16_idx2(s []byte, idx int) uint16 {
292
293 return uint16(s[idx<<1]) | uint16(s[(idx<<1)+1])<<8
294 }
295
296 func load_le_byte2_uint16_idx2_inv(s []byte, idx int) uint16 {
297
298 return uint16(s[(idx<<1)+1])<<8 | uint16(s[idx<<1])
299 }
300
301 func load_le_byte4_uint32_idx4(s []byte, idx int) uint32 {
302
303 return uint32(s[idx<<2]) | uint32(s[(idx<<2)+1])<<8 | uint32(s[(idx<<2)+2])<<16 | uint32(s[(idx<<2)+3])<<24
304 }
305
306 func load_le_byte4_uint32_idx4_inv(s []byte, idx int) uint32 {
307
308 return uint32(s[(idx<<2)+3])<<24 | uint32(s[(idx<<2)+2])<<16 | uint32(s[(idx<<2)+1])<<8 | uint32(s[idx<<2])
309 }
310
311 func load_le_byte8_uint64_idx8(s []byte, idx int) uint64 {
312
313 return uint64(s[idx<<3]) | uint64(s[(idx<<3)+1])<<8 | uint64(s[(idx<<3)+2])<<16 | uint64(s[(idx<<3)+3])<<24 | uint64(s[(idx<<3)+4])<<32 | uint64(s[(idx<<3)+5])<<40 | uint64(s[(idx<<3)+6])<<48 | uint64(s[(idx<<3)+7])<<56
314 }
315
316 func load_le_byte8_uint64_idx8_inv(s []byte, idx int) uint64 {
317
318 return uint64(s[(idx<<3)+7])<<56 | uint64(s[(idx<<3)+6])<<48 | uint64(s[(idx<<3)+5])<<40 | uint64(s[(idx<<3)+4])<<32 | uint64(s[(idx<<3)+3])<<24 | uint64(s[(idx<<3)+2])<<16 | uint64(s[(idx<<3)+1])<<8 | uint64(s[idx<<3])
319 }
320
321 func load_be_byte2_uint16_idx2(s []byte, idx int) uint16 {
322
323 return uint16(s[idx<<1])<<8 | uint16(s[(idx<<1)+1])
324 }
325
326 func load_be_byte2_uint16_idx2_inv(s []byte, idx int) uint16 {
327
328 return uint16(s[(idx<<1)+1]) | uint16(s[idx<<1])<<8
329 }
330
331 func load_be_byte4_uint32_idx4(s []byte, idx int) uint32 {
332
333 return uint32(s[idx<<2])<<24 | uint32(s[(idx<<2)+1])<<16 | uint32(s[(idx<<2)+2])<<8 | uint32(s[(idx<<2)+3])
334 }
335
336 func load_be_byte8_uint64_idx8(s []byte, idx int) uint64 {
337
338 return uint64(s[idx<<3])<<56 | uint64(s[(idx<<3)+1])<<48 | uint64(s[(idx<<3)+2])<<40 | uint64(s[(idx<<3)+3])<<32 | uint64(s[(idx<<3)+4])<<24 | uint64(s[(idx<<3)+5])<<16 | uint64(s[(idx<<3)+6])<<8 | uint64(s[(idx<<3)+7])
339 }
340
341
342
343 func reassoc_load_uint32(b []byte) uint32 {
344
345 return (uint32(b[0]) | uint32(b[1])<<8) | (uint32(b[2])<<16 | uint32(b[3])<<24)
346 }
347
348 func extrashift_load_uint32(b []byte) uint32 {
349
350 return uint32(b[0])<<2 | uint32(b[1])<<10 | uint32(b[2])<<18 | uint32(b[3])<<26
351 }
352
353 func outoforder_load_uint32(b []byte) uint32 {
354
355 return uint32(b[0]) | uint32(b[2])<<16 | uint32(b[1])<<8 | uint32(b[3])<<24
356 }
357
358 func extraOr_load_uint32(b []byte, x, y uint32) uint32 {
359
360 return x | binary.LittleEndian.Uint32(b) | y
361
362
363
364 }
365
366
367
368 func fcall_byte(a [2]byte) [2]byte {
369 return fcall_byte(fcall_byte(a))
370 }
371
372 func fcall_uint16(a [2]uint16) [2]uint16 {
373 return fcall_uint16(fcall_uint16(a))
374 }
375
376 func fcall_uint32(a [2]uint32) [2]uint32 {
377 return fcall_uint32(fcall_uint32(a))
378 }
379
380
381
382 func load_op_merge(p, q *int) {
383 x := *p
384 *q += x
385 }
386 func load_op_no_merge(p, q *int) {
387 x := *p
388 for i := 0; i < 10; i++ {
389 *q += x
390 }
391 }
392
393
394 func offsets_fold(_, a [20]byte) (b [20]byte) {
395
396 b = a
397 return
398 }
399
400
401
402
403 func safe_point(p, q *[2]*int) {
404 a, b := p[0], p[1]
405 runtime.GC()
406 q[0], q[1] = a, b
407 }
408
409
410
411
412
413 func store_le64(b []byte, x uint64) {
414
415
416
417
418
419 binary.LittleEndian.PutUint64(b, x)
420 }
421
422 func store_le64_idx(b []byte, x uint64, idx int) {
423
424
425
426
427
428 binary.LittleEndian.PutUint64(b[idx:], x)
429 }
430
431 func store_le64_idx2(dst []byte, d, length, offset int) []byte {
432 a := dst[d : d+length]
433 b := dst[d-offset:]
434
435 binary.LittleEndian.PutUint64(a, binary.LittleEndian.Uint64(b))
436 return dst
437 }
438
439 func store_le64_idx_const(b []byte, idx int) {
440
441 binary.LittleEndian.PutUint64(b[idx:], 123)
442 }
443
444 func store_le64_load(b []byte, x *[8]byte) {
445 _ = b[8]
446
447
448
449
450
451 binary.LittleEndian.PutUint64(b, binary.LittleEndian.Uint64(x[:]))
452 }
453
454 func store_le32(b []byte, x uint32) {
455
456
457
458
459
460 binary.LittleEndian.PutUint32(b, x)
461 }
462
463 func store_le32_idx(b []byte, x uint32, idx int) {
464
465
466
467
468
469 binary.LittleEndian.PutUint32(b[idx:], x)
470 }
471
472 func store_le32_idx_const(b []byte, idx int) {
473
474
475 binary.LittleEndian.PutUint32(b[idx:], 123)
476 }
477
478 func store_le16(b []byte, x uint16) {
479
480
481
482
483
484 binary.LittleEndian.PutUint16(b, x)
485 }
486
487 func store_le16_idx(b []byte, x uint16, idx int) {
488
489
490
491
492
493 binary.LittleEndian.PutUint16(b[idx:], x)
494 }
495
496 func store_le16_idx_const(b []byte, idx int) {
497
498
499 binary.LittleEndian.PutUint16(b[idx:], 123)
500 }
501
502 func store_be64(b []byte, x uint64) {
503
504
505
506
507
508
509 binary.BigEndian.PutUint64(b, x)
510 }
511
512 func store_be64_idx(b []byte, x uint64, idx int) {
513
514
515
516
517
518
519 binary.BigEndian.PutUint64(b[idx:], x)
520 }
521
522 func store_be32(b []byte, x uint32) {
523
524
525
526
527
528
529 binary.BigEndian.PutUint32(b, x)
530 }
531
532 func store_be64_load(b, x *[8]byte) {
533
534
535 binary.BigEndian.PutUint64(b[:], binary.BigEndian.Uint64(x[:]))
536 }
537
538 func store_be32_load(b, x *[8]byte) {
539
540
541 binary.BigEndian.PutUint32(b[:], binary.BigEndian.Uint32(x[:]))
542 }
543
544 func store_be32_idx(b []byte, x uint32, idx int) {
545
546
547
548
549
550
551 binary.BigEndian.PutUint32(b[idx:], x)
552 }
553
554 func store_be16(b []byte, x uint16) {
555
556
557
558
559
560
561 binary.BigEndian.PutUint16(b, x)
562 }
563
564 func store_be16_idx(b []byte, x uint16, idx int) {
565
566
567
568
569
570
571 binary.BigEndian.PutUint16(b[idx:], x)
572 }
573
574 func store_le_byte_2(b []byte, val uint16) {
575 _ = b[2]
576
577
578
579
580
581 b[1], b[2] = byte(val), byte(val>>8)
582 }
583
584 func store_le_byte_2_inv(b []byte, val uint16) {
585 _ = b[2]
586
587
588
589
590 b[2], b[1] = byte(val>>8), byte(val)
591 }
592
593 func store_le_byte_4(b []byte, val uint32) {
594 _ = b[4]
595
596
597
598
599
600 b[1], b[2], b[3], b[4] = byte(val), byte(val>>8), byte(val>>16), byte(val>>24)
601 }
602
603 func store_le_byte_8(b []byte, val uint64) {
604 _ = b[8]
605
606
607
608
609 b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8] = byte(val), byte(val>>8), byte(val>>16), byte(val>>24), byte(val>>32), byte(val>>40), byte(val>>48), byte(val>>56)
610 }
611
612 func store_be_byte_2(b []byte, val uint16) {
613 _ = b[2]
614
615
616
617
618
619 b[1], b[2] = byte(val>>8), byte(val)
620 }
621
622 func store_be_byte_4(b []byte, val uint32) {
623 _ = b[4]
624
625
626
627
628
629 b[1], b[2], b[3], b[4] = byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
630 }
631
632 func store_be_byte_8(b []byte, val uint64) {
633 _ = b[8]
634
635
636
637
638
639 b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8] = byte(val>>56), byte(val>>48), byte(val>>40), byte(val>>32), byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
640 }
641
642 func store_le_byte_2_idx(b []byte, idx int, val uint16) {
643 _, _ = b[idx+0], b[idx+1]
644
645
646
647
648 b[idx+1], b[idx+0] = byte(val>>8), byte(val)
649 }
650
651 func store_le_byte_2_idx_inv(b []byte, idx int, val uint16) {
652 _, _ = b[idx+0], b[idx+1]
653
654
655
656 b[idx+0], b[idx+1] = byte(val), byte(val>>8)
657 }
658
659 func store_le_byte_4_idx(b []byte, idx int, val uint32) {
660 _, _, _, _ = b[idx+0], b[idx+1], b[idx+2], b[idx+3]
661
662
663
664 b[idx+3], b[idx+2], b[idx+1], b[idx+0] = byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
665 }
666
667 func store_be_byte_2_idx(b []byte, idx int, val uint16) {
668 _, _ = b[idx+0], b[idx+1]
669
670
671
672 b[idx+0], b[idx+1] = byte(val>>8), byte(val)
673 }
674
675 func store_be_byte_4_idx(b []byte, idx int, val uint32) {
676 _, _, _, _ = b[idx+0], b[idx+1], b[idx+2], b[idx+3]
677
678
679
680 b[idx+0], b[idx+1], b[idx+2], b[idx+3] = byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
681 }
682
683 func store_be_byte_2_idx2(b []byte, idx int, val uint16) {
684 _, _ = b[(idx<<1)+0], b[(idx<<1)+1]
685
686
687
688 b[(idx<<1)+0], b[(idx<<1)+1] = byte(val>>8), byte(val)
689 }
690
691 func store_le_byte_2_idx2(b []byte, idx int, val uint16) {
692 _, _ = b[(idx<<1)+0], b[(idx<<1)+1]
693
694
695
696 b[(idx<<1)+1], b[(idx<<1)+0] = byte(val>>8), byte(val)
697 }
698
699 func store_be_byte_4_idx4(b []byte, idx int, val uint32) {
700 _, _, _, _ = b[(idx<<2)+0], b[(idx<<2)+1], b[(idx<<2)+2], b[(idx<<2)+3]
701
702
703
704 b[(idx<<2)+0], b[(idx<<2)+1], b[(idx<<2)+2], b[(idx<<2)+3] = byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
705 }
706
707 func store_le_byte_4_idx4_inv(b []byte, idx int, val uint32) {
708 _, _, _, _ = b[(idx<<2)+0], b[(idx<<2)+1], b[(idx<<2)+2], b[(idx<<2)+3]
709
710
711
712 b[(idx<<2)+3], b[(idx<<2)+2], b[(idx<<2)+1], b[(idx<<2)+0] = byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
713 }
714
715
716
717
718
719
720
721 func zero_byte_2(b1, b2 []byte) {
722
723 _, _ = b1[1], b2[1]
724
725
726
727
728 b1[0], b1[1] = 0, 0
729
730
731
732
733 b2[1], b2[0] = 0, 0
734 }
735
736 func zero_byte_4(b1, b2 []byte) {
737 _, _ = b1[3], b2[3]
738
739
740
741
742 b1[0], b1[1], b1[2], b1[3] = 0, 0, 0, 0
743
744
745 b2[2], b2[3], b2[1], b2[0] = 0, 0, 0, 0
746 }
747
748 func zero_byte_8(b []byte) {
749 _ = b[7]
750 b[0], b[1], b[2], b[3] = 0, 0, 0, 0
751 b[4], b[5], b[6], b[7] = 0, 0, 0, 0
752 }
753
754 func zero_byte_16(b []byte) {
755 _ = b[15]
756 b[0], b[1], b[2], b[3] = 0, 0, 0, 0
757 b[4], b[5], b[6], b[7] = 0, 0, 0, 0
758 b[8], b[9], b[10], b[11] = 0, 0, 0, 0
759 b[12], b[13], b[14], b[15] = 0, 0, 0, 0
760 }
761
762 func zero_byte_30(a *[30]byte) {
763 *a = [30]byte{}
764 }
765
766 func zero_byte_39(a *[39]byte) {
767 *a = [39]byte{}
768 }
769
770 func zero_byte_2_idx(b []byte, idx int) {
771 _, _ = b[idx+0], b[idx+1]
772
773
774 b[idx+0], b[idx+1] = 0, 0
775 }
776
777 func zero_byte_2_idx2(b []byte, idx int) {
778 _, _ = b[(idx<<1)+0], b[(idx<<1)+1]
779
780
781 b[(idx<<1)+0], b[(idx<<1)+1] = 0, 0
782 }
783
784 func zero_uint16_2(h1, h2 []uint16) {
785 _, _ = h1[1], h2[1]
786
787
788
789
790 h1[0], h1[1] = 0, 0
791
792
793
794
795 h2[1], h2[0] = 0, 0
796 }
797
798 func zero_uint16_4(h1, h2 []uint16) {
799 _, _ = h1[3], h2[3]
800
801
802
803 h1[0], h1[1], h1[2], h1[3] = 0, 0, 0, 0
804
805
806 h2[2], h2[3], h2[1], h2[0] = 0, 0, 0, 0
807 }
808
809 func zero_uint16_8(h []uint16) {
810 _ = h[7]
811 h[0], h[1], h[2], h[3] = 0, 0, 0, 0
812 h[4], h[5], h[6], h[7] = 0, 0, 0, 0
813 }
814
815 func zero_uint32_2(w1, w2 []uint32) {
816 _, _ = w1[1], w2[1]
817
818
819
820 w1[0], w1[1] = 0, 0
821
822
823
824 w2[1], w2[0] = 0, 0
825 }
826
827 func zero_uint32_4(w1, w2 []uint32) {
828 _, _ = w1[3], w2[3]
829 w1[0], w1[1], w1[2], w1[3] = 0, 0, 0, 0
830 w2[2], w2[3], w2[1], w2[0] = 0, 0, 0, 0
831 }
832
833 func zero_uint64_2(d1, d2 []uint64) {
834 _, _ = d1[1], d2[1]
835 d1[0], d1[1] = 0, 0
836 d2[1], d2[0] = 0, 0
837 }
838
839 func loadstore(p, q *[4]uint8) {
840
841
842 x0, x1, x2, x3 := q[0], q[1], q[2], q[3]
843
844
845 p[0], p[1], p[2], p[3] = x0, x1, x2, x3
846 }
847
848 type S1 struct {
849 a, b int16
850 }
851
852 func loadstore2(p, q *S1) {
853
854
855 a, b := p.a, p.b
856
857
858 q.a, q.b = a, b
859 }
860
861 func wideStore(p *[8]uint64) {
862 if p == nil {
863 return
864 }
865
866
867
868 p[0] = 0
869
870
871 p[1] = 0
872 }
873
874 func wideStore2(p *[8]uint64, x, y uint64) {
875 if p == nil {
876 return
877 }
878
879
880 p[0] = x
881
882 p[1] = y
883 }
884
885 func store32le(p *struct{ a, b uint32 }, x uint64) {
886
887
888
889 p.a = uint32(x)
890
891
892
893 p.b = uint32(x >> 32)
894 }
895 func store32be(p *struct{ a, b uint32 }, x uint64) {
896
897
898 p.a = uint32(x >> 32)
899
900
901 p.b = uint32(x)
902 }
903 func store16le(p *struct{ a, b uint16 }, x uint32) {
904
905
906
907 p.a = uint16(x)
908
909
910
911 p.b = uint16(x >> 16)
912 }
913 func store16be(p *struct{ a, b uint16 }, x uint32) {
914
915
916 p.a = uint16(x >> 16)
917
918
919 p.b = uint16(x)
920 }
921
922 func storeBoolConst(p *struct{ a, b bool }) {
923
924
925 p.a = true
926 p.b = true
927 }
928 func issue66413(p *struct {
929 a byte
930 b bool
931 c bool
932 d int8
933 }) {
934
935
936 p.a = 31
937 p.b = false
938 p.c = true
939 p.d = 12
940 }
941
View as plain text