1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
|
!
! This Source Code Form is subject to the terms of the Mozilla Public
! License, v. 2.0. If a copy of the MPL was not distributed with this
! file, You can obtain one at http://mozilla.org/MPL/2.0/.
! This file is to be used in place of vis.il in 64-bit builds.
!--------------------------------------------------------------------
! Pure edge handling instructions
!
! int vis_edge8(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge8,16
edge8 %o0,%o1,%o0
.end
!
! int vis_edge8l(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge8l,16
edge8l %o0,%o1,%o0
.end
!
! int vis_edge16(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge16,16
edge16 %o0,%o1,%o0
.end
!
! int vis_edge16l(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge16l,16
edge16l %o0,%o1,%o0
.end
!
! int vis_edge32(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge32,16
edge32 %o0,%o1,%o0
.end
!
! int vis_edge32l(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge32l,16
edge32l %o0,%o1,%o0
.end
!--------------------------------------------------------------------
! Edge handling instructions with negative return values if cc set
!
! int vis_edge8cc(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge8cc,16
edge8 %o0,%o1,%o0
mov 0,%o1
movgu %xcc,-1024,%o1
or %o1,%o0,%o0
.end
!
! int vis_edge8lcc(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge8lcc,16
edge8l %o0,%o1,%o0
mov 0,%o1
movgu %xcc,-1024,%o1
or %o1,%o0,%o0
.end
!
! int vis_edge16cc(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge16cc,16
edge16 %o0,%o1,%o0
mov 0,%o1
movgu %xcc,-1024,%o1
or %o1,%o0,%o0
.end
!
! int vis_edge16lcc(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge16lcc,16
edge16l %o0,%o1,%o0
mov 0,%o1
movgu %xcc,-1024,%o1
or %o1,%o0,%o0
.end
!
! int vis_edge32cc(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge32cc,16
edge32 %o0,%o1,%o0
mov 0,%o1
movgu %xcc,-1024,%o1
or %o1,%o0,%o0
.end
!
! int vis_edge32lcc(void */*frs1*/, void */*frs2*/);
!
.inline vis_edge32lcc,16
edge32l %o0,%o1,%o0
mov 0,%o1
movgu %xcc,-1024,%o1
or %o1,%o0,%o0
.end
!--------------------------------------------------------------------
! Alignment instructions
!
! void *vis_alignaddr(void */*rs1*/, int /*rs2*/);
!
.inline vis_alignaddr,12
alignaddr %o0,%o1,%o0
.end
!
! void *vis_alignaddrl(void */*rs1*/, int /*rs2*/);
!
.inline vis_alignaddrl,12
alignaddrl %o0,%o1,%o0
.end
!
! double vis_faligndata(double /*frs1*/, double /*frs2*/);
!
.inline vis_faligndata,16
faligndata %f0,%f2,%f0
.end
!--------------------------------------------------------------------
! Partitioned comparison instructions
!
! int vis_fcmple16(double /*frs1*/, double /*frs2*/);
!
.inline vis_fcmple16,16
fcmple16 %f0,%f2,%o0
.end
!
! int vis_fcmpne16(double /*frs1*/, double /*frs2*/);
!
.inline vis_fcmpne16,16
fcmpne16 %f0,%f2,%o0
.end
!
! int vis_fcmple32(double /*frs1*/, double /*frs2*/);
!
.inline vis_fcmple32,16
fcmple32 %f0,%f2,%o0
.end
!
! int vis_fcmpne32(double /*frs1*/, double /*frs2*/);
!
.inline vis_fcmpne32,16
fcmpne32 %f0,%f2,%o0
.end
!
! int vis_fcmpgt16(double /*frs1*/, double /*frs2*/);
!
.inline vis_fcmpgt16,16
fcmpgt16 %f0,%f2,%o0
.end
!
! int vis_fcmpeq16(double /*frs1*/, double /*frs2*/);
!
.inline vis_fcmpeq16,16
fcmpeq16 %f0,%f2,%o0
.end
!
! int vis_fcmpgt32(double /*frs1*/, double /*frs2*/);
!
.inline vis_fcmpgt32,16
fcmpgt32 %f0,%f2,%o0
.end
!
! int vis_fcmpeq32(double /*frs1*/, double /*frs2*/);
!
.inline vis_fcmpeq32,16
fcmpeq32 %f0,%f2,%o0
.end
!--------------------------------------------------------------------
! Partitioned arithmetic
!
! double vis_fmul8x16(float /*frs1*/, double /*frs2*/);
!
.inline vis_fmul8x16,12
fmul8x16 %f1,%f2,%f0
.end
!
! double vis_fmul8x16_dummy(float /*frs1*/, int /*dummy*/, double /*frs2*/);
!
.inline vis_fmul8x16_dummy,16
fmul8x16 %f1,%f4,%f0
.end
!
! double vis_fmul8x16au(float /*frs1*/, float /*frs2*/);
!
.inline vis_fmul8x16au,8
fmul8x16au %f1,%f3,%f0
.end
!
! double vis_fmul8x16al(float /*frs1*/, float /*frs2*/);
!
.inline vis_fmul8x16al,8
fmul8x16al %f1,%f3,%f0
.end
!
! double vis_fmul8sux16(double /*frs1*/, double /*frs2*/);
!
.inline vis_fmul8sux16,16
fmul8sux16 %f0,%f2,%f0
.end
!
! double vis_fmul8ulx16(double /*frs1*/, double /*frs2*/);
!
.inline vis_fmul8ulx16,16
fmul8ulx16 %f0,%f2,%f0
.end
!
! double vis_fmuld8sux16(float /*frs1*/, float /*frs2*/);
!
.inline vis_fmuld8sux16,8
fmuld8sux16 %f1,%f3,%f0
.end
!
! double vis_fmuld8ulx16(float /*frs1*/, float /*frs2*/);
!
.inline vis_fmuld8ulx16,8
fmuld8ulx16 %f1,%f3,%f0
.end
!
! double vis_fpadd16(double /*frs1*/, double /*frs2*/);
!
.inline vis_fpadd16,16
fpadd16 %f0,%f2,%f0
.end
!
! float vis_fpadd16s(float /*frs1*/, float /*frs2*/);
!
.inline vis_fpadd16s,8
fpadd16s %f1,%f3,%f0
.end
!
! double vis_fpadd32(double /*frs1*/, double /*frs2*/);
!
.inline vis_fpadd32,16
fpadd32 %f0,%f2,%f0
.end
!
! float vis_fpadd32s(float /*frs1*/, float /*frs2*/);
!
.inline vis_fpadd32s,8
fpadd32s %f1,%f3,%f0
.end
!
! double vis_fpsub16(double /*frs1*/, double /*frs2*/);
!
.inline vis_fpsub16,16
fpsub16 %f0,%f2,%f0
.end
!
! float vis_fpsub16s(float /*frs1*/, float /*frs2*/);
!
.inline vis_fpsub16s,8
fpsub16s %f1,%f3,%f0
.end
!
! double vis_fpsub32(double /*frs1*/, double /*frs2*/);
!
.inline vis_fpsub32,16
fpsub32 %f0,%f2,%f0
.end
!
! float vis_fpsub32s(float /*frs1*/, float /*frs2*/);
!
.inline vis_fpsub32s,8
fpsub32s %f1,%f3,%f0
.end
!--------------------------------------------------------------------
! Pixel packing
!
! float vis_fpack16(double /*frs2*/);
!
.inline vis_fpack16,8
fpack16 %f0,%f0
.end
!
! double vis_fpack16_pair(double /*frs2*/, double /*frs2*/);
!
.inline vis_fpack16_pair,16
fpack16 %f0,%f0
fpack16 %f2,%f1
.end
!
! void vis_st2_fpack16(double, double, double *)
!
.inline vis_st2_fpack16,24
fpack16 %f0,%f0
fpack16 %f2,%f1
st %f0,[%o2+0]
st %f1,[%o2+4]
.end
!
! void vis_std_fpack16(double, double, double *)
!
.inline vis_std_fpack16,24
fpack16 %f0,%f0
fpack16 %f2,%f1
std %f0,[%o2]
.end
!
! void vis_st2_fpackfix(double, double, double *)
!
.inline vis_st2_fpackfix,24
fpackfix %f0,%f0
fpackfix %f2,%f1
st %f0,[%o2+0]
st %f1,[%o2+4]
.end
!
! double vis_fpack16_to_hi(double /*frs1*/, double /*frs2*/);
!
.inline vis_fpack16_to_hi,16
fpack16 %f2,%f0
.end
! double vis_fpack16_to_lo(double /*frs1*/, double /*frs2*/);
!
.inline vis_fpack16_to_lo,16
fpack16 %f2,%f3
fmovs %f3,%f1 /* without this, optimizer goes wrong */
.end
!
! double vis_fpack32(double /*frs1*/, double /*frs2*/);
!
.inline vis_fpack32,16
fpack32 %f0,%f2,%f0
.end
!
! float vis_fpackfix(double /*frs2*/);
!
.inline vis_fpackfix,8
fpackfix %f0,%f0
.end
!
! double vis_fpackfix_pair(double /*frs2*/, double /*frs2*/);
!
.inline vis_fpackfix_pair,16
fpackfix %f0,%f0
fpackfix %f2,%f1
.end
!--------------------------------------------------------------------
! Motion estimation
!
! double vis_pxldist64(double accum /*frd*/, double pxls1 /*frs1*/,
! double pxls2 /*frs2*/);
!
.inline vis_pxldist64,24
pdist %f2,%f4,%f0
.end
!--------------------------------------------------------------------
! Channel merging
!
! double vis_fpmerge(float /*frs1*/, float /*frs2*/);
!
.inline vis_fpmerge,8
fpmerge %f1,%f3,%f0
.end
!--------------------------------------------------------------------
! Pixel expansion
!
! double vis_fexpand(float /*frs2*/);
!
.inline vis_fexpand,4
fexpand %f1,%f0
.end
! double vis_fexpand_hi(double /*frs2*/);
!
.inline vis_fexpand_hi,8
fexpand %f0,%f0
.end
! double vis_fexpand_lo(double /*frs2*/);
!
.inline vis_fexpand_lo,8
fexpand %f1,%f0
.end
!--------------------------------------------------------------------
! Bitwise logical operations
!
! double vis_fnor(double /*frs1*/, double /*frs2*/);
!
.inline vis_fnor,16
fnor %f0,%f2,%f0
.end
!
! float vis_fnors(float /*frs1*/, float /*frs2*/);
!
.inline vis_fnors,8
fnors %f1,%f3,%f0
.end
!
! double vis_fandnot(double /*frs1*/, double /*frs2*/);
!
.inline vis_fandnot,16
fandnot1 %f0,%f2,%f0
.end
!
! float vis_fandnots(float /*frs1*/, float /*frs2*/);
!
.inline vis_fandnots,8
fandnot1s %f1,%f3,%f0
.end
!
! double vis_fnot(double /*frs1*/);
!
.inline vis_fnot,8
fnot1 %f0,%f0
.end
!
! float vis_fnots(float /*frs1*/);
!
.inline vis_fnots,4
fnot1s %f1,%f0
.end
!
! double vis_fxor(double /*frs1*/, double /*frs2*/);
!
.inline vis_fxor,16
fxor %f0,%f2,%f0
.end
!
! float vis_fxors(float /*frs1*/, float /*frs2*/);
!
.inline vis_fxors,8
fxors %f1,%f3,%f0
.end
!
! double vis_fnand(double /*frs1*/, double /*frs2*/);
!
.inline vis_fnand,16
fnand %f0,%f2,%f0
.end
!
! float vis_fnands(float /*frs1*/, float /*frs2*/);
!
.inline vis_fnands,8
fnands %f1,%f3,%f0
.end
!
! double vis_fand(double /*frs1*/, double /*frs2*/);
!
.inline vis_fand,16
fand %f0,%f2,%f0
.end
!
! float vis_fands(float /*frs1*/, float /*frs2*/);
!
.inline vis_fands,8
fands %f1,%f3,%f0
.end
!
! double vis_fxnor(double /*frs1*/, double /*frs2*/);
!
.inline vis_fxnor,16
fxnor %f0,%f2,%f0
.end
!
! float vis_fxnors(float /*frs1*/, float /*frs2*/);
!
.inline vis_fxnors,8
fxnors %f1,%f3,%f0
.end
!
! double vis_fsrc(double /*frs1*/);
!
.inline vis_fsrc,8
fsrc1 %f0,%f0
.end
!
! float vis_fsrcs(float /*frs1*/);
!
.inline vis_fsrcs,4
fsrc1s %f1,%f0
.end
!
! double vis_fornot(double /*frs1*/, double /*frs2*/);
!
.inline vis_fornot,16
fornot1 %f0,%f2,%f0
.end
!
! float vis_fornots(float /*frs1*/, float /*frs2*/);
!
.inline vis_fornots,8
fornot1s %f1,%f3,%f0
.end
!
! double vis_for(double /*frs1*/, double /*frs2*/);
!
.inline vis_for,16
for %f0,%f2,%f0
.end
!
! float vis_fors(float /*frs1*/, float /*frs2*/);
!
.inline vis_fors,8
fors %f1,%f3,%f0
.end
!
! double vis_fzero(/* void */)
!
.inline vis_fzero,0
fzero %f0
.end
!
! float vis_fzeros(/* void */)
!
.inline vis_fzeros,0
fzeros %f0
.end
!
! double vis_fone(/* void */)
!
.inline vis_fone,0
fone %f0
.end
!
! float vis_fones(/* void */)
!
.inline vis_fones,0
fones %f0
.end
!--------------------------------------------------------------------
! Partial store instructions
!
! vis_stdfa_ASI_PST8P(double frd, void *rs1, int rmask)
!
.inline vis_stdfa_ASI_PST8P,20
stda %f0,[%o1]%o2,0xc0 ! ASI_PST8_P
.end
!
! vis_stdfa_ASI_PST8PL(double frd, void *rs1, int rmask)
!
.inline vis_stdfa_ASI_PST8PL,20
stda %f0,[%o1]%o2,0xc8 ! ASI_PST8_PL
.end
!
! vis_stdfa_ASI_PST8P_int_pair(void *rs1, void *rs2, void *rs3, int rmask);
!
.inline vis_stdfa_ASI_PST8P_int_pair,28
ld [%o0],%f4
ld [%o1],%f5
stda %f4,[%o2]%o3,0xc0 ! ASI_PST8_P
.end
!
! vis_stdfa_ASI_PST8S(double frd, void *rs1, int rmask)
!
.inline vis_stdfa_ASI_PST8S,20
stda %f0,[%o1]%o2,0xc1 ! ASI_PST8_S
.end
!
! vis_stdfa_ASI_PST16P(double frd, void *rs1, int rmask)
!
.inline vis_stdfa_ASI_PST16P,20
stda %f0,[%o1]%o2,0xc2 ! ASI_PST16_P
.end
!
! vis_stdfa_ASI_PST16S(double frd, void *rs1, int rmask)
!
.inline vis_stdfa_ASI_PST16S,20
stda %f0,[%o1]%o2,0xc3 ! ASI_PST16_S
.end
!
! vis_stdfa_ASI_PST32P(double frd, void *rs1, int rmask)
!
.inline vis_stdfa_ASI_PST32P,20
stda %f0,[%o1]%o2,0xc4 ! ASI_PST32_P
.end
!
! vis_stdfa_ASI_PST32S(double frd, void *rs1, int rmask)
!
.inline vis_stdfa_ASI_PST32S,20
stda %f0,[%o1]%o2,0xc5 ! ASI_PST32_S
.end
!--------------------------------------------------------------------
! Short store instructions
!
! vis_stdfa_ASI_FL8P(double frd, void *rs1)
!
.inline vis_stdfa_ASI_FL8P,16
stda %f0,[%o1]0xd0 ! ASI_FL8_P
.end
!
! vis_stdfa_ASI_FL8P_index(double frd, void *rs1, long index)
!
.inline vis_stdfa_ASI_FL8P_index,24
stda %f0,[%o1+%o2]0xd0 ! ASI_FL8_P
.end
!
! vis_stdfa_ASI_FL8S(double frd, void *rs1)
!
.inline vis_stdfa_ASI_FL8S,16
stda %f0,[%o1]0xd1 ! ASI_FL8_S
.end
!
! vis_stdfa_ASI_FL16P(double frd, void *rs1)
!
.inline vis_stdfa_ASI_FL16P,16
stda %f0,[%o1]0xd2 ! ASI_FL16_P
.end
!
! vis_stdfa_ASI_FL16P_index(double frd, void *rs1, long index)
!
.inline vis_stdfa_ASI_FL16P_index,24
stda %f0,[%o1+%o2]0xd2 ! ASI_FL16_P
.end
!
! vis_stdfa_ASI_FL16S(double frd, void *rs1)
!
.inline vis_stdfa_ASI_FL16S,16
stda %f0,[%o1]0xd3 ! ASI_FL16_S
.end
!
! vis_stdfa_ASI_FL8PL(double frd, void *rs1)
!
.inline vis_stdfa_ASI_FL8PL,16
stda %f0,[%o1]0xd8 ! ASI_FL8_PL
.end
!
! vis_stdfa_ASI_FL8SL(double frd, void *rs1)
!
.inline vis_stdfa_ASI_FL8SL,16
stda %f0,[%o1]0xd9 ! ASI_FL8_SL
.end
!
! vis_stdfa_ASI_FL16PL(double frd, void *rs1)
!
.inline vis_stdfa_ASI_FL16PL,16
stda %f0,[%o1]0xda ! ASI_FL16_PL
.end
!
! vis_stdfa_ASI_FL16SL(double frd, void *rs1)
!
.inline vis_stdfa_ASI_FL16SL,16
stda %f0,[%o1]0xdb ! ASI_FL16_SL
.end
!--------------------------------------------------------------------
! Short load instructions
!
! double vis_lddfa_ASI_FL8P(void *rs1)
!
.inline vis_lddfa_ASI_FL8P,8
ldda [%o0]0xd0,%f4 ! ASI_FL8_P
fmovd %f4,%f0 ! Compiler can clean this up
.end
!
! double vis_lddfa_ASI_FL8P_index(void *rs1, long index)
!
.inline vis_lddfa_ASI_FL8P_index,16
ldda [%o0+%o1]0xd0,%f4
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL8P_hi(void *rs1, unsigned int index)
!
.inline vis_lddfa_ASI_FL8P_hi,12
sra %o1,16,%o1
ldda [%o0+%o1]0xd0,%f4
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL8P_lo(void *rs1, unsigned int index)
!
.inline vis_lddfa_ASI_FL8P_lo,12
sll %o1,16,%o1
sra %o1,16,%o1
ldda [%o0+%o1]0xd0,%f4
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL8S(void *rs1)
!
.inline vis_lddfa_ASI_FL8S,8
ldda [%o0]0xd1,%f4 ! ASI_FL8_S
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL16P(void *rs1)
!
.inline vis_lddfa_ASI_FL16P,8
ldda [%o0]0xd2,%f4 ! ASI_FL16_P
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL16P_index(void *rs1, long index)
!
.inline vis_lddfa_ASI_FL16P_index,16
ldda [%o0+%o1]0xd2,%f4 ! ASI_FL16_P
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL16S(void *rs1)
!
.inline vis_lddfa_ASI_FL16S,8
ldda [%o0]0xd3,%f4 ! ASI_FL16_S
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL8PL(void *rs1)
!
.inline vis_lddfa_ASI_FL8PL,8
ldda [%o0]0xd8,%f4 ! ASI_FL8_PL
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL8PL_index(void *rs1, long index)
!
.inline vis_lddfa_ASI_FL8PL_index,16
ldda [%o0+%o1]0xd8,%f4 ! ASI_FL8_PL
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL8SL(void *rs1)
!
.inline vis_lddfa_ASI_FL8SL,8
ldda [%o0]0xd9,%f4 ! ASI_FL8_SL
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL16PL(void *rs1)
!
.inline vis_lddfa_ASI_FL16PL,8
ldda [%o0]0xda,%f4 ! ASI_FL16_PL
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL16PL_index(void *rs1, long index)
!
.inline vis_lddfa_ASI_FL16PL_index,16
ldda [%o0+%o1]0xda,%f4 ! ASI_FL16_PL
fmovd %f4,%f0
.end
!
! double vis_lddfa_ASI_FL16SL(void *rs1)
!
.inline vis_lddfa_ASI_FL16SL,8
ldda [%o0]0xdb,%f4 ! ASI_FL16_SL
fmovd %f4,%f0
.end
!--------------------------------------------------------------------
! Graphics status register
!
! unsigned int vis_read_gsr(void)
!
.inline vis_read_gsr,0
rd %gsr,%o0
.end
!
! void vis_write_gsr(unsigned int /* GSR */)
!
.inline vis_write_gsr,4
wr %g0,%o0,%gsr
.end
!--------------------------------------------------------------------
! Voxel texture mapping
!
! unsigned long vis_array8(unsigned long long /*rs1 */, int /*rs2*/)
!
.inline vis_array8,12
array8 %o0,%o1,%o0
.end
!
! unsigned long vis_array16(unsigned long long /*rs1*/, int /*rs2*/)
!
.inline vis_array16,12
array16 %o0,%o1,%o0
.end
!
! unsigned long vis_array32(unsigned long long /*rs1*/, int /*rs2*/)
!
.inline vis_array32,12
array32 %o0,%o1,%o0
.end
!--------------------------------------------------------------------
! Register aliasing and type casts
!
! float vis_read_hi(double /* frs1 */);
!
.inline vis_read_hi,8
fmovs %f0,%f0
.end
!
! float vis_read_lo(double /* frs1 */);
!
.inline vis_read_lo,8
fmovs %f1,%f0 ! %f0 = low word (frs1); return %f0;
.end
!
! double vis_write_hi(double /* frs1 */, float /* frs2 */);
!
.inline vis_write_hi,12
fmovs %f3,%f0 ! %f3 = float frs2; return %f0:f1;
.end
!
! double vis_write_lo(double /* frs1 */, float /* frs2 */);
!
.inline vis_write_lo,12
fmovs %f3,%f1 ! %f3 = float frs2; return %f0:f1;
.end
!
! double vis_freg_pair(float /* frs1 */, float /* frs2 */);
!
.inline vis_freg_pair,8
fmovs %f1,%f0 ! %f1 = float frs1; put in hi;
fmovs %f3,%f1 ! %f3 = float frs2; put in lo; return %f0:f1;
.end
!
! float vis_to_float(unsigned int /*value*/);
!
.inline vis_to_float,4
st %o0,[%sp+2183]
ld [%sp+2183],%f0
.end
!
! double vis_to_double(unsigned int /*value1*/, unsigned int /*value2*/);
!
.inline vis_to_double,8
st %o0,[%sp+2183]
ld [%sp+2183],%f0
st %o1,[%sp+2183]
ld [%sp+2183],%f1
.end
!
! double vis_to_double_dup(unsigned int /*value*/);
!
.inline vis_to_double_dup,4
st %o0,[%sp+2183]
ld [%sp+2183],%f1
fmovs %f1,%f0 ! duplicate value
.end
!
! double vis_ll_to_double(unsigned long long /*value*/);
!
.inline vis_ll_to_double,8
stx %o0,[%sp+2183]
ldd [%sp+2183],%f0
.end
!--------------------------------------------------------------------
! Address space identifier (ASI) register
!
! unsigned int vis_read_asi(void)
!
.inline vis_read_asi,0
rd %asi,%o0
.end
!
! void vis_write_asi(unsigned int /* ASI */)
!
.inline vis_write_asi,4
wr %g0,%o0,%asi
.end
!--------------------------------------------------------------------
! Load/store from/into alternate space
!
! float vis_ldfa_ASI_REG(void *rs1)
!
.inline vis_ldfa_ASI_REG,8
lda [%o0+0]%asi,%f4
fmovs %f4,%f0 ! Compiler can clean this up
.end
!
! float vis_ldfa_ASI_P(void *rs1)
!
.inline vis_ldfa_ASI_P,8
lda [%o0]0x80,%f4 ! ASI_P
fmovs %f4,%f0 ! Compiler can clean this up
.end
!
! float vis_ldfa_ASI_PL(void *rs1)
!
.inline vis_ldfa_ASI_PL,8
lda [%o0]0x88,%f4 ! ASI_PL
fmovs %f4,%f0 ! Compiler can clean this up
.end
!
! double vis_lddfa_ASI_REG(void *rs1)
!
.inline vis_lddfa_ASI_REG,8
ldda [%o0+0]%asi,%f4
fmovd %f4,%f0 ! Compiler can clean this up
.end
!
! double vis_lddfa_ASI_P(void *rs1)
!
.inline vis_lddfa_ASI_P,8
ldda [%o0]0x80,%f4 ! ASI_P
fmovd %f4,%f0 ! Compiler can clean this up
.end
!
! double vis_lddfa_ASI_PL(void *rs1)
!
.inline vis_lddfa_ASI_PL,8
ldda [%o0]0x88,%f4 ! ASI_PL
fmovd %f4,%f0 ! Compiler can clean this up
.end
!
! vis_stfa_ASI_REG(float frs, void *rs1)
!
.inline vis_stfa_ASI_REG,12
sta %f1,[%o1+0]%asi
.end
!
! vis_stfa_ASI_P(float frs, void *rs1)
!
.inline vis_stfa_ASI_P,12
sta %f1,[%o1]0x80 ! ASI_P
.end
!
! vis_stfa_ASI_PL(float frs, void *rs1)
!
.inline vis_stfa_ASI_PL,12
sta %f1,[%o1]0x88 ! ASI_PL
.end
!
! vis_stdfa_ASI_REG(double frd, void *rs1)
!
.inline vis_stdfa_ASI_REG,16
stda %f0,[%o1+0]%asi
.end
!
! vis_stdfa_ASI_P(double frd, void *rs1)
!
.inline vis_stdfa_ASI_P,16
stda %f0,[%o1]0x80 ! ASI_P
.end
!
! vis_stdfa_ASI_PL(double frd, void *rs1)
!
.inline vis_stdfa_ASI_PL,16
stda %f0,[%o1]0x88 ! ASI_PL
.end
!
! unsigned short vis_lduha_ASI_REG(void *rs1)
!
.inline vis_lduha_ASI_REG,8
lduha [%o0+0]%asi,%o0
.end
!
! unsigned short vis_lduha_ASI_P(void *rs1)
!
.inline vis_lduha_ASI_P,8
lduha [%o0]0x80,%o0 ! ASI_P
.end
!
! unsigned short vis_lduha_ASI_PL(void *rs1)
!
.inline vis_lduha_ASI_PL,8
lduha [%o0]0x88,%o0 ! ASI_PL
.end
!
! unsigned short vis_lduha_ASI_P_index(void *rs1, long index)
!
.inline vis_lduha_ASI_P_index,16
lduha [%o0+%o1]0x80,%o0 ! ASI_P
.end
!
! unsigned short vis_lduha_ASI_PL_index(void *rs1, long index)
!
.inline vis_lduha_ASI_PL_index,16
lduha [%o0+%o1]0x88,%o0 ! ASI_PL
.end
!--------------------------------------------------------------------
! Prefetch
!
! void vis_prefetch_read(void * /*address*/);
!
.inline vis_prefetch_read,8
prefetch [%o0+0],0
.end
!
! void vis_prefetch_write(void * /*address*/);
!
.inline vis_prefetch_write,8
prefetch [%o0+0],2
.end
|