2
! The contents of this file are subject to the Mozilla Public
3
! License Version 1.1 (the "License"); you may not use this file
4
! except in compliance with the License. You may obtain a copy of
5
! the License at http://www.mozilla.org/MPL/
7
! Software distributed under the License is distributed on an "AS
8
! IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
! implied. See the License for the specific language governing
10
! rights and limitations under the License.
12
! The Original Code is vis inline macros (64 bit). (vis_64.il 3.4)
14
! The Initial Developer of the Original Code is Sun Microsystems Inc.
15
! Portions created by Sun Microsystems Inc. are
16
! Copyright (C) 1998-2000 Sun Microsystems Inc. All Rights Reserved.
20
! Alternatively, the contents of this file may be used under the
21
! terms of the GNU General Public License Version 2 or later (the
22
! "GPL"), in which case the provisions of the GPL are applicable
23
! instead of those above. If you wish to allow use of your
24
! version of this file only under the terms of the GPL and not to
25
! allow others to use your version of this file under the MPL,
26
! indicate your decision by deleting the provisions above and
27
! replace them with the notice and other provisions required by
28
! the GPL. If you do not delete the provisions above, a recipient
29
! may use your version of this file under either the MPL or the
31
! $Id: vis_64.il,v 1.1 2000/09/29 23:38:05 nelsonb%netscape.com Exp $
33
! @(#)vis_64.il 3.4 00/03/02 SMI
35
! This file is to be used in place of vis.il in 64-bit builds.
37
!--------------------------------------------------------------------
38
! Pure edge handling instructions
40
! int vis_edge8(void */*frs1*/, void */*frs2*/);
46
! int vis_edge8l(void */*frs1*/, void */*frs2*/);
52
! int vis_edge16(void */*frs1*/, void */*frs2*/);
58
! int vis_edge16l(void */*frs1*/, void */*frs2*/);
60
.inline vis_edge16l,16
64
! int vis_edge32(void */*frs1*/, void */*frs2*/);
70
! int vis_edge32l(void */*frs1*/, void */*frs2*/);
72
.inline vis_edge32l,16
76
!--------------------------------------------------------------------
77
! Edge handling instructions with negative return values if cc set
79
! int vis_edge8cc(void */*frs1*/, void */*frs2*/);
81
.inline vis_edge8cc,16
88
! int vis_edge8lcc(void */*frs1*/, void */*frs2*/);
90
.inline vis_edge8lcc,16
97
! int vis_edge16cc(void */*frs1*/, void */*frs2*/);
99
.inline vis_edge16cc,16
106
! int vis_edge16lcc(void */*frs1*/, void */*frs2*/);
108
.inline vis_edge16lcc,16
115
! int vis_edge32cc(void */*frs1*/, void */*frs2*/);
117
.inline vis_edge32cc,16
124
! int vis_edge32lcc(void */*frs1*/, void */*frs2*/);
126
.inline vis_edge32lcc,16
133
!--------------------------------------------------------------------
134
! Alignment instructions
136
! void *vis_alignaddr(void */*rs1*/, int /*rs2*/);
138
.inline vis_alignaddr,12
139
alignaddr %o0,%o1,%o0
142
! void *vis_alignaddrl(void */*rs1*/, int /*rs2*/);
144
.inline vis_alignaddrl,12
145
alignaddrl %o0,%o1,%o0
148
! double vis_faligndata(double /*frs1*/, double /*frs2*/);
150
.inline vis_faligndata,16
151
faligndata %f0,%f2,%f0
154
!--------------------------------------------------------------------
155
! Partitioned comparison instructions
157
! int vis_fcmple16(double /*frs1*/, double /*frs2*/);
159
.inline vis_fcmple16,16
163
! int vis_fcmpne16(double /*frs1*/, double /*frs2*/);
165
.inline vis_fcmpne16,16
169
! int vis_fcmple32(double /*frs1*/, double /*frs2*/);
171
.inline vis_fcmple32,16
175
! int vis_fcmpne32(double /*frs1*/, double /*frs2*/);
177
.inline vis_fcmpne32,16
181
! int vis_fcmpgt16(double /*frs1*/, double /*frs2*/);
183
.inline vis_fcmpgt16,16
187
! int vis_fcmpeq16(double /*frs1*/, double /*frs2*/);
189
.inline vis_fcmpeq16,16
193
! int vis_fcmpgt32(double /*frs1*/, double /*frs2*/);
195
.inline vis_fcmpgt32,16
199
! int vis_fcmpeq32(double /*frs1*/, double /*frs2*/);
201
.inline vis_fcmpeq32,16
205
!--------------------------------------------------------------------
206
! Partitioned arithmetic
208
! double vis_fmul8x16(float /*frs1*/, double /*frs2*/);
210
.inline vis_fmul8x16,12
214
! double vis_fmul8x16_dummy(float /*frs1*/, int /*dummy*/, double /*frs2*/);
216
.inline vis_fmul8x16_dummy,16
220
! double vis_fmul8x16au(float /*frs1*/, float /*frs2*/);
222
.inline vis_fmul8x16au,8
223
fmul8x16au %f1,%f3,%f0
226
! double vis_fmul8x16al(float /*frs1*/, float /*frs2*/);
228
.inline vis_fmul8x16al,8
229
fmul8x16al %f1,%f3,%f0
232
! double vis_fmul8sux16(double /*frs1*/, double /*frs2*/);
234
.inline vis_fmul8sux16,16
235
fmul8sux16 %f0,%f2,%f0
238
! double vis_fmul8ulx16(double /*frs1*/, double /*frs2*/);
240
.inline vis_fmul8ulx16,16
241
fmul8ulx16 %f0,%f2,%f0
244
! double vis_fmuld8sux16(float /*frs1*/, float /*frs2*/);
246
.inline vis_fmuld8sux16,8
247
fmuld8sux16 %f1,%f3,%f0
250
! double vis_fmuld8ulx16(float /*frs1*/, float /*frs2*/);
252
.inline vis_fmuld8ulx16,8
253
fmuld8ulx16 %f1,%f3,%f0
256
! double vis_fpadd16(double /*frs1*/, double /*frs2*/);
258
.inline vis_fpadd16,16
262
! float vis_fpadd16s(float /*frs1*/, float /*frs2*/);
264
.inline vis_fpadd16s,8
268
! double vis_fpadd32(double /*frs1*/, double /*frs2*/);
270
.inline vis_fpadd32,16
274
! float vis_fpadd32s(float /*frs1*/, float /*frs2*/);
276
.inline vis_fpadd32s,8
280
! double vis_fpsub16(double /*frs1*/, double /*frs2*/);
282
.inline vis_fpsub16,16
286
! float vis_fpsub16s(float /*frs1*/, float /*frs2*/);
288
.inline vis_fpsub16s,8
292
! double vis_fpsub32(double /*frs1*/, double /*frs2*/);
294
.inline vis_fpsub32,16
298
! float vis_fpsub32s(float /*frs1*/, float /*frs2*/);
300
.inline vis_fpsub32s,8
304
!--------------------------------------------------------------------
307
! float vis_fpack16(double /*frs2*/);
309
.inline vis_fpack16,8
313
! double vis_fpack16_pair(double /*frs2*/, double /*frs2*/);
315
.inline vis_fpack16_pair,16
320
! void vis_st2_fpack16(double, double, double *)
322
.inline vis_st2_fpack16,24
329
! void vis_std_fpack16(double, double, double *)
331
.inline vis_std_fpack16,24
337
! void vis_st2_fpackfix(double, double, double *)
339
.inline vis_st2_fpackfix,24
346
! double vis_fpack16_to_hi(double /*frs1*/, double /*frs2*/);
348
.inline vis_fpack16_to_hi,16
352
! double vis_fpack16_to_lo(double /*frs1*/, double /*frs2*/);
354
.inline vis_fpack16_to_lo,16
356
fmovs %f3,%f1 /* without this, optimizer goes wrong */
360
! double vis_fpack32(double /*frs1*/, double /*frs2*/);
362
.inline vis_fpack32,16
366
! float vis_fpackfix(double /*frs2*/);
368
.inline vis_fpackfix,8
372
! double vis_fpackfix_pair(double /*frs2*/, double /*frs2*/);
374
.inline vis_fpackfix_pair,16
379
!--------------------------------------------------------------------
382
! double vis_pxldist64(double accum /*frd*/, double pxls1 /*frs1*/,
383
! double pxls2 /*frs2*/);
385
.inline vis_pxldist64,24
389
!--------------------------------------------------------------------
392
! double vis_fpmerge(float /*frs1*/, float /*frs2*/);
394
.inline vis_fpmerge,8
398
!--------------------------------------------------------------------
401
! double vis_fexpand(float /*frs2*/);
403
.inline vis_fexpand,4
407
! double vis_fexpand_hi(double /*frs2*/);
409
.inline vis_fexpand_hi,8
413
! double vis_fexpand_lo(double /*frs2*/);
415
.inline vis_fexpand_lo,8
419
!--------------------------------------------------------------------
420
! Bitwise logical operations
422
! double vis_fnor(double /*frs1*/, double /*frs2*/);
428
! float vis_fnors(float /*frs1*/, float /*frs2*/);
434
! double vis_fandnot(double /*frs1*/, double /*frs2*/);
436
.inline vis_fandnot,16
440
! float vis_fandnots(float /*frs1*/, float /*frs2*/);
442
.inline vis_fandnots,8
443
fandnot1s %f1,%f3,%f0
446
! double vis_fnot(double /*frs1*/);
452
! float vis_fnots(float /*frs1*/);
458
! double vis_fxor(double /*frs1*/, double /*frs2*/);
464
! float vis_fxors(float /*frs1*/, float /*frs2*/);
470
! double vis_fnand(double /*frs1*/, double /*frs2*/);
476
! float vis_fnands(float /*frs1*/, float /*frs2*/);
482
! double vis_fand(double /*frs1*/, double /*frs2*/);
488
! float vis_fands(float /*frs1*/, float /*frs2*/);
494
! double vis_fxnor(double /*frs1*/, double /*frs2*/);
500
! float vis_fxnors(float /*frs1*/, float /*frs2*/);
506
! double vis_fsrc(double /*frs1*/);
512
! float vis_fsrcs(float /*frs1*/);
518
! double vis_fornot(double /*frs1*/, double /*frs2*/);
520
.inline vis_fornot,16
524
! float vis_fornots(float /*frs1*/, float /*frs2*/);
526
.inline vis_fornots,8
530
! double vis_for(double /*frs1*/, double /*frs2*/);
536
! float vis_fors(float /*frs1*/, float /*frs2*/);
542
! double vis_fzero(/* void */)
548
! float vis_fzeros(/* void */)
554
! double vis_fone(/* void */)
560
! float vis_fones(/* void */)
566
!--------------------------------------------------------------------
567
! Partial store instructions
569
! vis_stdfa_ASI_PST8P(double frd, void *rs1, int rmask)
571
.inline vis_stdfa_ASI_PST8P,20
572
stda %f0,[%o1]%o2,0xc0 ! ASI_PST8_P
575
! vis_stdfa_ASI_PST8PL(double frd, void *rs1, int rmask)
577
.inline vis_stdfa_ASI_PST8PL,20
578
stda %f0,[%o1]%o2,0xc8 ! ASI_PST8_PL
581
! vis_stdfa_ASI_PST8P_int_pair(void *rs1, void *rs2, void *rs3, int rmask);
583
.inline vis_stdfa_ASI_PST8P_int_pair,28
586
stda %f4,[%o2]%o3,0xc0 ! ASI_PST8_P
589
! vis_stdfa_ASI_PST8S(double frd, void *rs1, int rmask)
591
.inline vis_stdfa_ASI_PST8S,20
592
stda %f0,[%o1]%o2,0xc1 ! ASI_PST8_S
595
! vis_stdfa_ASI_PST16P(double frd, void *rs1, int rmask)
597
.inline vis_stdfa_ASI_PST16P,20
598
stda %f0,[%o1]%o2,0xc2 ! ASI_PST16_P
601
! vis_stdfa_ASI_PST16S(double frd, void *rs1, int rmask)
603
.inline vis_stdfa_ASI_PST16S,20
604
stda %f0,[%o1]%o2,0xc3 ! ASI_PST16_S
607
! vis_stdfa_ASI_PST32P(double frd, void *rs1, int rmask)
609
.inline vis_stdfa_ASI_PST32P,20
610
stda %f0,[%o1]%o2,0xc4 ! ASI_PST32_P
613
! vis_stdfa_ASI_PST32S(double frd, void *rs1, int rmask)
615
.inline vis_stdfa_ASI_PST32S,20
616
stda %f0,[%o1]%o2,0xc5 ! ASI_PST32_S
619
!--------------------------------------------------------------------
620
! Short store instructions
622
! vis_stdfa_ASI_FL8P(double frd, void *rs1)
624
.inline vis_stdfa_ASI_FL8P,16
625
stda %f0,[%o1]0xd0 ! ASI_FL8_P
628
! vis_stdfa_ASI_FL8P_index(double frd, void *rs1, long index)
630
.inline vis_stdfa_ASI_FL8P_index,24
631
stda %f0,[%o1+%o2]0xd0 ! ASI_FL8_P
634
! vis_stdfa_ASI_FL8S(double frd, void *rs1)
636
.inline vis_stdfa_ASI_FL8S,16
637
stda %f0,[%o1]0xd1 ! ASI_FL8_S
640
! vis_stdfa_ASI_FL16P(double frd, void *rs1)
642
.inline vis_stdfa_ASI_FL16P,16
643
stda %f0,[%o1]0xd2 ! ASI_FL16_P
646
! vis_stdfa_ASI_FL16P_index(double frd, void *rs1, long index)
648
.inline vis_stdfa_ASI_FL16P_index,24
649
stda %f0,[%o1+%o2]0xd2 ! ASI_FL16_P
652
! vis_stdfa_ASI_FL16S(double frd, void *rs1)
654
.inline vis_stdfa_ASI_FL16S,16
655
stda %f0,[%o1]0xd3 ! ASI_FL16_S
658
! vis_stdfa_ASI_FL8PL(double frd, void *rs1)
660
.inline vis_stdfa_ASI_FL8PL,16
661
stda %f0,[%o1]0xd8 ! ASI_FL8_PL
664
! vis_stdfa_ASI_FL8SL(double frd, void *rs1)
666
.inline vis_stdfa_ASI_FL8SL,16
667
stda %f0,[%o1]0xd9 ! ASI_FL8_SL
670
! vis_stdfa_ASI_FL16PL(double frd, void *rs1)
672
.inline vis_stdfa_ASI_FL16PL,16
673
stda %f0,[%o1]0xda ! ASI_FL16_PL
676
! vis_stdfa_ASI_FL16SL(double frd, void *rs1)
678
.inline vis_stdfa_ASI_FL16SL,16
679
stda %f0,[%o1]0xdb ! ASI_FL16_SL
682
!--------------------------------------------------------------------
683
! Short load instructions
685
! double vis_lddfa_ASI_FL8P(void *rs1)
687
.inline vis_lddfa_ASI_FL8P,8
688
ldda [%o0]0xd0,%f4 ! ASI_FL8_P
689
fmovd %f4,%f0 ! Compiler can clean this up
692
! double vis_lddfa_ASI_FL8P_index(void *rs1, long index)
694
.inline vis_lddfa_ASI_FL8P_index,16
695
ldda [%o0+%o1]0xd0,%f4
699
! double vis_lddfa_ASI_FL8P_hi(void *rs1, unsigned int index)
701
.inline vis_lddfa_ASI_FL8P_hi,12
703
ldda [%o0+%o1]0xd0,%f4
707
! double vis_lddfa_ASI_FL8P_lo(void *rs1, unsigned int index)
709
.inline vis_lddfa_ASI_FL8P_lo,12
712
ldda [%o0+%o1]0xd0,%f4
716
! double vis_lddfa_ASI_FL8S(void *rs1)
718
.inline vis_lddfa_ASI_FL8S,8
719
ldda [%o0]0xd1,%f4 ! ASI_FL8_S
723
! double vis_lddfa_ASI_FL16P(void *rs1)
725
.inline vis_lddfa_ASI_FL16P,8
726
ldda [%o0]0xd2,%f4 ! ASI_FL16_P
730
! double vis_lddfa_ASI_FL16P_index(void *rs1, long index)
732
.inline vis_lddfa_ASI_FL16P_index,16
733
ldda [%o0+%o1]0xd2,%f4 ! ASI_FL16_P
737
! double vis_lddfa_ASI_FL16S(void *rs1)
739
.inline vis_lddfa_ASI_FL16S,8
740
ldda [%o0]0xd3,%f4 ! ASI_FL16_S
744
! double vis_lddfa_ASI_FL8PL(void *rs1)
746
.inline vis_lddfa_ASI_FL8PL,8
747
ldda [%o0]0xd8,%f4 ! ASI_FL8_PL
751
! double vis_lddfa_ASI_FL8PL_index(void *rs1, long index)
753
.inline vis_lddfa_ASI_FL8PL_index,16
754
ldda [%o0+%o1]0xd8,%f4 ! ASI_FL8_PL
758
! double vis_lddfa_ASI_FL8SL(void *rs1)
760
.inline vis_lddfa_ASI_FL8SL,8
761
ldda [%o0]0xd9,%f4 ! ASI_FL8_SL
765
! double vis_lddfa_ASI_FL16PL(void *rs1)
767
.inline vis_lddfa_ASI_FL16PL,8
768
ldda [%o0]0xda,%f4 ! ASI_FL16_PL
772
! double vis_lddfa_ASI_FL16PL_index(void *rs1, long index)
774
.inline vis_lddfa_ASI_FL16PL_index,16
775
ldda [%o0+%o1]0xda,%f4 ! ASI_FL16_PL
779
! double vis_lddfa_ASI_FL16SL(void *rs1)
781
.inline vis_lddfa_ASI_FL16SL,8
782
ldda [%o0]0xdb,%f4 ! ASI_FL16_SL
786
!--------------------------------------------------------------------
787
! Graphics status register
789
! unsigned int vis_read_gsr(void)
791
.inline vis_read_gsr,0
795
! void vis_write_gsr(unsigned int /* GSR */)
797
.inline vis_write_gsr,4
801
!--------------------------------------------------------------------
802
! Voxel texture mapping
804
! unsigned long vis_array8(unsigned long long /*rs1 */, int /*rs2*/)
806
.inline vis_array8,12
810
! unsigned long vis_array16(unsigned long long /*rs1*/, int /*rs2*/)
812
.inline vis_array16,12
816
! unsigned long vis_array32(unsigned long long /*rs1*/, int /*rs2*/)
818
.inline vis_array32,12
822
!--------------------------------------------------------------------
823
! Register aliasing and type casts
825
! float vis_read_hi(double /* frs1 */);
827
.inline vis_read_hi,8
831
! float vis_read_lo(double /* frs1 */);
833
.inline vis_read_lo,8
834
fmovs %f1,%f0 ! %f0 = low word (frs1); return %f0;
837
! double vis_write_hi(double /* frs1 */, float /* frs2 */);
839
.inline vis_write_hi,12
840
fmovs %f3,%f0 ! %f3 = float frs2; return %f0:f1;
843
! double vis_write_lo(double /* frs1 */, float /* frs2 */);
845
.inline vis_write_lo,12
846
fmovs %f3,%f1 ! %f3 = float frs2; return %f0:f1;
849
! double vis_freg_pair(float /* frs1 */, float /* frs2 */);
851
.inline vis_freg_pair,8
852
fmovs %f1,%f0 ! %f1 = float frs1; put in hi;
853
fmovs %f3,%f1 ! %f3 = float frs2; put in lo; return %f0:f1;
856
! float vis_to_float(unsigned int /*value*/);
858
.inline vis_to_float,4
863
! double vis_to_double(unsigned int /*value1*/, unsigned int /*value2*/);
865
.inline vis_to_double,8
872
! double vis_to_double_dup(unsigned int /*value*/);
874
.inline vis_to_double_dup,4
877
fmovs %f1,%f0 ! duplicate value
880
! double vis_ll_to_double(unsigned long long /*value*/);
882
.inline vis_ll_to_double,8
887
!--------------------------------------------------------------------
888
! Address space identifier (ASI) register
890
! unsigned int vis_read_asi(void)
892
.inline vis_read_asi,0
896
! void vis_write_asi(unsigned int /* ASI */)
898
.inline vis_write_asi,4
902
!--------------------------------------------------------------------
903
! Load/store from/into alternate space
905
! float vis_ldfa_ASI_REG(void *rs1)
907
.inline vis_ldfa_ASI_REG,8
909
fmovs %f4,%f0 ! Compiler can clean this up
912
! float vis_ldfa_ASI_P(void *rs1)
914
.inline vis_ldfa_ASI_P,8
915
lda [%o0]0x80,%f4 ! ASI_P
916
fmovs %f4,%f0 ! Compiler can clean this up
919
! float vis_ldfa_ASI_PL(void *rs1)
921
.inline vis_ldfa_ASI_PL,8
922
lda [%o0]0x88,%f4 ! ASI_PL
923
fmovs %f4,%f0 ! Compiler can clean this up
926
! double vis_lddfa_ASI_REG(void *rs1)
928
.inline vis_lddfa_ASI_REG,8
930
fmovd %f4,%f0 ! Compiler can clean this up
933
! double vis_lddfa_ASI_P(void *rs1)
935
.inline vis_lddfa_ASI_P,8
936
ldda [%o0]0x80,%f4 ! ASI_P
937
fmovd %f4,%f0 ! Compiler can clean this up
940
! double vis_lddfa_ASI_PL(void *rs1)
942
.inline vis_lddfa_ASI_PL,8
943
ldda [%o0]0x88,%f4 ! ASI_PL
944
fmovd %f4,%f0 ! Compiler can clean this up
947
! vis_stfa_ASI_REG(float frs, void *rs1)
949
.inline vis_stfa_ASI_REG,12
953
! vis_stfa_ASI_P(float frs, void *rs1)
955
.inline vis_stfa_ASI_P,12
956
sta %f1,[%o1]0x80 ! ASI_P
959
! vis_stfa_ASI_PL(float frs, void *rs1)
961
.inline vis_stfa_ASI_PL,12
962
sta %f1,[%o1]0x88 ! ASI_PL
965
! vis_stdfa_ASI_REG(double frd, void *rs1)
967
.inline vis_stdfa_ASI_REG,16
971
! vis_stdfa_ASI_P(double frd, void *rs1)
973
.inline vis_stdfa_ASI_P,16
974
stda %f0,[%o1]0x80 ! ASI_P
977
! vis_stdfa_ASI_PL(double frd, void *rs1)
979
.inline vis_stdfa_ASI_PL,16
980
stda %f0,[%o1]0x88 ! ASI_PL
983
! unsigned short vis_lduha_ASI_REG(void *rs1)
985
.inline vis_lduha_ASI_REG,8
986
lduha [%o0+0]%asi,%o0
989
! unsigned short vis_lduha_ASI_P(void *rs1)
991
.inline vis_lduha_ASI_P,8
992
lduha [%o0]0x80,%o0 ! ASI_P
995
! unsigned short vis_lduha_ASI_PL(void *rs1)
997
.inline vis_lduha_ASI_PL,8
998
lduha [%o0]0x88,%o0 ! ASI_PL
1001
! unsigned short vis_lduha_ASI_P_index(void *rs1, long index)
1003
.inline vis_lduha_ASI_P_index,16
1004
lduha [%o0+%o1]0x80,%o0 ! ASI_P
1007
! unsigned short vis_lduha_ASI_PL_index(void *rs1, long index)
1009
.inline vis_lduha_ASI_PL_index,16
1010
lduha [%o0+%o1]0x88,%o0 ! ASI_PL
1013
!--------------------------------------------------------------------
1016
! void vis_prefetch_read(void * /*address*/);
1018
.inline vis_prefetch_read,8
1022
! void vis_prefetch_write(void * /*address*/);
1024
.inline vis_prefetch_write,8