Subversion Repositories Kolibri OS

Rev

Rev 1979 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1979 Rev 2192
Line 290... Line 290...
290
       movhlps	 xmm1,xmm1
290
       movhlps	 xmm1,xmm1
291
       cvtps2pi  mm1,xmm1
291
       cvtps2pi  mm1,xmm1
292
       movq	 .dty12,mm0
292
       movq	 .dty12,mm0
293
       movq	 .dz12,mm1
293
       movq	 .dz12,mm1
294
;temporaly conversion to keep upside down
294
;----
295
;     fninit
-
 
296
;     fld      .dx12
-
 
297
;     fistp    .dx12
-
 
298
;     fld      dword .dz12
-
 
299
;     fistp    dword .dz12
-
 
300
;     fld      .dbx12
-
 
301
;     fistp    .dbx12
-
 
302
;     fld      dword .dby12
-
 
303
;     fistp    dword .dby12
-
 
304
;     fld      .dex12
-
 
305
;     fistp    .dex12
-
 
306
;     fld      dword .dey12
-
 
307
;     fistp    dword .dey12
-
 
308
;     fld      .dtx12
-
 
309
;     fistp    .dtx12
-
 
310
;     fld      dword .dty12
-
 
311
;     fistp    dword .dty12
-
 
312
;----
-
 
313
;       mov       ax,.z2
295
;       mov       ax,.z2
314
;       sub       ax,.z1
296
;       sub       ax,.z1
315
;       cwde
297
;       cwde
316
;       mov       bx,.x2
298
;       mov       bx,.x2
317
;       sub       bx,.x1
299
;       sub       bx,.x1
Line 516... Line 498...
516
       cvtps2pi  mm1,xmm1
498
       cvtps2pi  mm1,xmm1
517
       movq	 .dty13,mm0
499
       movq	 .dty13,mm0
518
       movq	 .dz13,mm1
500
       movq	 .dz13,mm1
519
 
501
 
Line 520... Line -...
520
;temporaly conversion to keep upside down
-
 
521
;     fninit
-
 
522
;     fld      .dx13
-
 
523
;     fistp    .dx13
-
 
524
;     fld      dword .dz13
-
 
525
;     fistp    dword .dz13
-
 
526
;     fld      .dbx13
-
 
527
;     fistp    .dbx13
-
 
528
;     fld      dword .dby13
-
 
529
;     fistp    dword .dby13
-
 
530
;     fld      .dex13
-
 
531
;     fistp    .dex13
-
 
532
;     fld      dword .dey13
-
 
533
;     fistp    dword .dey13
-
 
534
;     fld      .dtx13
-
 
535
;     fistp    .dtx13
-
 
536
;     fld      dword .dty13
-
 
537
;     fistp    dword .dty13
-
 
538
 
-
 
539
else
502
else
Line 540... Line 503...
540
 
503
 
541
       mov	ax,.x3
504
       mov	ax,.x3
542
       sub	ax,.x1
505
       sub	ax,.x1
Line 697... Line 660...
697
       movq	 .dty23,mm0
660
       movq	 .dty23,mm0
698
       movq	 .dz23,mm1
661
       movq	 .dz23,mm1
699
 
662
 
Line 700... Line -...
700
 
-
 
701
;temporaly conversion to keep upside down
-
 
702
;     fninit
-
 
703
;     fld      .dx23
-
 
704
;     fistp    .dx23
-
 
705
;     fld      dword .dz23
-
 
706
;     fistp    dword .dz23
-
 
707
;     fld      .dbx23
-
 
708
;     fistp    .dbx23
-
 
709
;     fld      dword .dby23
-
 
710
;     fistp    dword .dby23
-
 
711
;     fld      .dex23
-
 
712
;     fistp    .dex23
-
 
713
;     fld      dword .dey23
-
 
714
;     fistp    dword .dey23
-
 
715
;     fld      .dtx23
-
 
716
;     fistp    .dtx23
-
 
717
;     fld      dword .dty23
-
 
718
;     fistp    dword .dty23
663
 
719
else
664
else
720
       mov	ax,.x3
665
       mov	ax,.x3
721
       sub	ax,.x2
666
       sub	ax,.x2
722
       cwde
667
       cwde
Line 792... Line 737...
792
end if
737
end if
793
      ;  sub     esp,40
738
      ;  sub     esp,40
794
   .bt_dx23_done:
739
   .bt_dx23_done:
795
       sub	 esp,64
740
       sub	 esp,64
796
;if Ext>=SSE
741
 
797
;       movsx    eax,.x1
-
 
798
;       shl      eax,ROUND
-
 
799
;       cvtsi2ss xmm0,eax
-
 
800
;       movss    .cx1,xmm0
-
 
801
;       movss    .cx2,xmm0
-
 
802
;
-
 
803
;       movsx    ebx,word[.b_x1]
-
 
804
;       shl      ebx,ROUND
-
 
805
;       cvtsi2ss xmm0,ebx
-
 
806
;       movss    .cbx1,xmm0
-
 
807
;       movss    .cbx2,xmm0
-
 
808
;
-
 
809
;       movsx    ecx,word[.b_y1]
-
 
810
;       shl      ecx,ROUND
-
 
811
;       cvtsi2ss xmm0,ecx
-
 
812
;       movss    .cby1,xmm0
-
 
813
;       movss    .cby2,xmm0
-
 
814
 
-
 
815
;       movsx    edx,word[.e_x1]
-
 
816
;       shl      edx,ROUND
-
 
817
;       cvtsi2ss xmm0,edx
-
 
818
;       movss    .cex1,xmm0
-
 
819
;       movss    .cex2,xmm0
-
 
820
;
-
 
821
;       movsx    eax,word[.e_y1]
-
 
822
;       shl      eax,ROUND
-
 
823
;       cvtsi2ss xmm0,eax
-
 
824
;       movss    .cey1,xmm0
-
 
825
;       movss    .cey2,xmm0
-
 
826
;
-
 
827
 
-
 
828
;       movsx    ebx,.z1
-
 
829
;       shl      ebx,CATMULL_SHIFT
-
 
830
;       cvtsi2ss xmm0,ebx
-
 
831
;       movss    .cz1,xmm0
-
 
832
;       movss    .cz2,xmm0
-
 
833
;
-
 
834
;       movsx    ecx,word[.t_x1]
-
 
835
;       shl      ecx,ROUND
-
 
836
;       cvtsi2ss xmm0,ecx
-
 
837
;       movss    .ctx1,xmm0
-
 
838
;       movss    .ctx2,xmm0
-
 
839
 
-
 
840
;       movsx    edx,word[.t_y1]
-
 
841
;       shl      edx,ROUND
-
 
842
;       cvtsi2ss xmm0,edx
-
 
843
;       movss    .cty1,xmm0
-
 
844
;       movss    .cty2,xmm0
-
 
845
 
-
 
846
;else
-
 
847
 
-
 
Line 848... Line 742...
848
       movsx	eax,.x1
742
       movsx	eax,.x1
849
       shl	eax,ROUND
743
       shl	eax,ROUND
850
       mov	.cx1,eax
744
       mov	.cx1,eax
851
       mov	.cx2,eax
745
       mov	.cx2,eax
Line 900... Line 794...
900
       mov	.cty1,edx
794
       mov	.cty1,edx
901
       mov	.cty2,edx
795
       mov	.cty2,edx
902
      ; push     edx
796
      ; push     edx
903
      ; push     edx
797
      ; push     edx
904
;end if
798
 
905
 
-
 
Line 906... Line -...
906
       movsx	ecx,.y1
-
 
907
       cmp	cx,.y2
-
 
908
       jge	.loop12_done
-
 
909
  .loop12:
-
 
910
       call	.call_line
-
 
911
;if Ext >= SSE
799
;if Ext >= SSE2
912
;       movups  xmm0,.cby1
800
;       movups  xmm0,.cby1
913
;       movups  xmm1,.cty1
801
;       movups  xmm1,.cty1
914
;       movups  xmm2,.cby2
802
;       movups  xmm2,.cby2
915
;       movups  xmm3,.cty2
803
;       movups  xmm3,.cty2
916
;       movups  xmm4,.dby13
804
;       movups  xmm4,.dby13
917
;       movups  xmm5,.dty13
805
;       movups  xmm5,.dty13
918
;       movups  xmm6,.dby12
806
;       movups  xmm6,.dby12
919
;       movups  xmm7,.dty12
807
;       movups  xmm7,.dty12
920
;       addps   xmm0,xmm4
-
 
921
;       addps   xmm1,xmm5
-
 
922
;       addps   xmm2,xmm6
-
 
923
;       addps   xmm3,xmm7
-
 
924
;
-
 
925
;;       addps   xmm0,.dby12
-
 
926
;;       addps   xmm1,.dty12
-
 
927
;;       addps   xmm2,.dby13
-
 
928
;;       addps   xmm3,.dty13
-
 
929
;       movups  .cby1,xmm0
-
 
930
;       movups  .cty1,xmm1
-
 
931
;       movups  .cby2,xmm2
-
 
932
;       movups  .cty2,xmm3
-
 
933
;end if
808
;end if
-
 
809
       movsx	ecx,.y1
-
 
810
       cmp	cx,.y2
-
 
811
       jge	.loop12_done
-
 
812
  .loop12:
-
 
813
;if Ext >= SSE2
-
 
814
;       fxsave  [sse_repository]
-
 
815
;end if
-
 
816
       call	.call_line
-
 
817
if Ext >= SSE2
-
 
818
;       fxrstor [sse_repository]
-
 
819
       movups  xmm0,.cby1
-
 
820
       movups  xmm1,.cty1
-
 
821
       movups  xmm2,.cby2
-
 
822
       movups  xmm3,.cty2
-
 
823
       movups  xmm4,.dby13
-
 
824
       movups  xmm5,.dty13
-
 
825
       movups  xmm6,.dby12
-
 
826
       movups  xmm7,.dty12
-
 
827
       paddd   xmm0,xmm4
-
 
828
       paddd   xmm1,xmm5
-
 
829
       paddd   xmm2,xmm6
-
 
830
       paddd   xmm3,xmm7
-
 
831
       movups  .cby1,xmm0
-
 
832
       movups  .cty1,xmm1
-
 
833
       movups  .cby2,xmm2
-
 
834
       movups  .cty2,xmm3
-
 
835
end if
Line 934... Line 836...
934
 
836
 
935
if Ext >= MMX
837
if (Ext = MMX) | (Ext = SSE)
936
       movq	mm0,.cby2
838
       movq	mm0,.cby2
937
       movq	mm1,.cby1
839
       movq	mm1,.cby1
938
       movq	mm2,.cey2
840
       movq	mm2,.cey2
939
       movq	mm3,.cey1
841
       movq	mm3,.cey1
Line 1003... Line 905...
1003
       movsx	ecx,.y2
905
       movsx	ecx,.y2
1004
       cmp	cx,.y3
906
       cmp	cx,.y3
1005
       jge	.loop23_done
907
       jge	.loop23_done
Line 1006... Line -...
1006
 
-
 
Line 1007... Line 908...
1007
;if Ext < SSE
908
 
1008
 
909
 
1009
       movsx	eax,.z2
910
       movsx	eax,.z2
Line 1036... Line 937...
1036
 
937
 
Line 1037... Line 938...
1037
       movzx	ebx,word[.t_y2]
938
       movzx	ebx,word[.t_y2]
1038
       shl	ebx,ROUND
939
       shl	ebx,ROUND
1039
       mov	.cty2,ebx
940
       mov	.cty2,ebx
1040
;else
-
 
1041
;       movsx    eax,.z2
-
 
1042
;       shl      eax,CATMULL_SHIFT
-
 
1043
;       cvtsi2ss xmm0,eax
-
 
1044
;       movss    .cz2,xmm0
-
 
1045
;
-
 
1046
;       movsx    ebx,.x2
-
 
1047
;       shl      ebx,ROUND
-
 
1048
;       cvtsi2ss xmm1,ebx
-
 
1049
;       movss    .cx2,xmm1
-
 
1050
;
-
 
1051
;       movzx    edx,word[.b_x2]
-
 
1052
;       shl      edx,ROUND
-
 
1053
;       cvtsi2ss xmm2,edx
-
 
1054
;       movss    .cbx2,xmm2
-
 
1055
;
-
 
1056
;       movzx    eax,word[.b_y2]
-
 
1057
;       shl      eax,ROUND
-
 
1058
;       cvtsi2ss xmm0,eax
-
 
1059
;       movss    .cby2,xmm0
-
 
1060
;
-
 
1061
;       movzx    ebx,word[.e_x2]
-
 
1062
;       shl      ebx,ROUND
-
 
1063
;       cvtsi2ss xmm1,ebx
-
 
1064
;       movss    .cex2,xmm1
-
 
1065
;
-
 
1066
;       movzx    edx,word[.e_y2]
-
 
1067
;       shl      edx,ROUND
-
 
1068
;       cvtsi2ss xmm2,edx
-
 
1069
;       movss    .cey2,xmm2
-
 
1070
;
-
 
1071
;       movzx    eax,word[.t_x2]
-
 
1072
;       shl      eax,ROUND
-
 
1073
;       cvtsi2ss xmm0,eax
-
 
1074
;       movss    .ctx2,xmm0
-
 
1075
;
-
 
1076
;       movzx    ebx,word[.t_y2]
-
 
1077
;       shl      ebx,ROUND
-
 
1078
;       cvtsi2ss xmm1,ebx
-
 
1079
;       movss    .cty2,xmm1
-
 
1080
 
-
 
1081
;end if
-
 
1082
 
-
 
1083
     .loop23:
-
 
1084
       call	.call_line
-
 
1085
 
-
 
1086
;if Ext >= SSE
941
;if Ext >= SSE2
1087
 
-
 
1088
;       movups  xmm0,.cby1
942
;       movups  xmm0,.cby1
1089
;       movups  xmm1,.cty1
943
;       movups  xmm1,.cty1
1090
;       movups  xmm2,.cby2
944
;       movups  xmm2,.cby2
1091
;       movups  xmm3,.cty2
945
;       movups  xmm3,.cty2
1092
;       movups  xmm4,.dby13
946
;       movups  xmm4,.dby13
1093
;       movups  xmm5,.dty13
947
;       movups  xmm5,.dty13
1094
;       movups  xmm6,.dby23
948
;       movups  xmm6,.dby23
1095
;       movups  xmm7,.dty23
949
;       movups  xmm7,.dty23
1096
;       addps   xmm0,xmm4
-
 
1097
;       addps   xmm1,xmm5
-
 
1098
;       addps   xmm2,xmm6
-
 
1099
;       addps   xmm3,xmm7
-
 
1100
; ;      addps   xmm0,.dby13
-
 
1101
; ;      addps   xmm1,.dty13
-
 
1102
; ;      addps   xmm2,.dby23
-
 
1103
; ;      addps   xmm3,.dty23
-
 
1104
;       movups  .cby1,xmm0
-
 
1105
;       movups  .cty1,xmm1
-
 
1106
;       movups  .cby2,xmm2
-
 
1107
;       movups  .cty2,xmm3
-
 
1108
;
-
 
1109
;end if
950
;end if
-
 
951
     .loop23:
-
 
952
;if Ext >= SSE2
-
 
953
;       fxsave  [sse_repository]
-
 
954
;end if
-
 
955
       call	.call_line
-
 
956
 
1110
if Ext >= MMX
957
if Ext >= SSE2
-
 
958
;       fxrstor [sse_repository]
-
 
959
       movups  xmm0,.cby1
-
 
960
       movups  xmm1,.cty1
-
 
961
       movups  xmm2,.cby2
-
 
962
       movups  xmm3,.cty2
-
 
963
       movups  xmm4,.dby13
-
 
964
       movups  xmm5,.dty13
-
 
965
       movups  xmm6,.dby23
-
 
966
       movups  xmm7,.dty23
-
 
967
       paddd   xmm0,xmm4
-
 
968
       paddd   xmm1,xmm5
-
 
969
       paddd   xmm2,xmm6
-
 
970
       paddd   xmm3,xmm7
-
 
971
       movups  .cby1,xmm0
-
 
972
       movups  .cty1,xmm1
-
 
973
       movups  .cby2,xmm2
-
 
974
       movups  .cty2,xmm3
-
 
975
;
-
 
976
end if
-
 
977
if (Ext = MMX) | (Ext = SSE)
1111
       movq	mm0,.cby2
978
       movq	mm0,.cby2
1112
       movq	mm1,.cby1
979
       movq	mm1,.cby1
1113
       movq	mm2,.cey2
980
       movq	mm2,.cey2
1114
       movq	mm3,.cey1
981
       movq	mm3,.cey1
1115
       movq	mm4,.cty1
982
       movq	mm4,.cty1
Line 1178... Line 1045...
1178
       mov	esp,ebp
1045
       mov	esp,ebp
1179
ret   50
1046
ret   50
Line 1180... Line 1047...
1180
 
1047
 
1181
.call_line:
-
 
1182
;if Ext >= SSE
-
 
1183
;       pushad
-
 
1184
;       push     .tex_ptr
-
 
1185
;       fninit
-
 
1186
;       fld      dword .cty1
-
 
1187
;       fistp    dword [esp-4]
-
 
1188
;       sub      esp,4
-
 
1189
;;       push     dword .cty1
-
 
1190
;       fld      .ctx1
-
 
1191
;       fistp    dword [esp-4]
-
 
1192
;       sub      esp,4
-
 
1193
;;       push     .ctx1
-
 
1194
;       fld      dword .cz1
-
 
1195
;       fistp    dword [esp-4]
-
 
1196
;       sub      esp,4
-
 
1197
;    ;   push     dwod .cz1
-
 
1198
;       fld      dword .cty2
-
 
1199
;       fistp    dword [esp-4]
-
 
1200
;       sub      esp,4
-
 
1201
;    ;   push     .cty2
-
 
1202
;       fld      .ctx2
-
 
1203
;       fistp    dword [esp-4]
-
 
1204
;       sub      esp,4
-
 
1205
;  ;     push     dword .ctx2
-
 
1206
;       fld      dword .cz2
-
 
1207
;       fistp    dword [esp-4]
-
 
1208
;       sub      esp,4
-
 
1209
;;       push     dword .cz2
-
 
1210
;
-
 
1211
;       push     .z_buff
-
 
1212
;       push     .t_emap
-
 
1213
;       push     .t_bmap
-
 
1214
;--------------------------------------
-
 
1215
;       fld      dword .cey2
-
 
1216
;       fistp    dword [esp-4]
-
 
1217
;       sub      esp,4
-
 
1218
;;       push     dword .cey2
-
 
1219
;
-
 
1220
;       fld      .cex2
-
 
1221
;       fistp    dword [esp-4]
-
 
1222
;       sub      esp,4
-
 
1223
;;       push     .cex2
-
 
1224
;
-
 
1225
;       fld      dword .cby2
-
 
1226
;       fistp    dword [esp-4]
-
 
1227
;       sub      esp,4
-
 
1228
; ;      push     dword .cby2
-
 
1229
 
-
 
1230
;       fld      .cbx2
-
 
1231
;       fistp    dword [esp-4]
-
 
1232
;       sub      esp,4
-
 
1233
 ;      push     .cbx2
-
 
1234
;------------------------------------
-
 
1235
;       fld      dword .cey1
-
 
1236
;       fistp    dword [esp-4]
-
 
1237
;       sub      esp,4
-
 
1238
;;       push     dword .cey1
-
 
1239
;       fld      .cex1
-
 
1240
;       fistp    dword [esp-4]
-
 
1241
;       sub      esp,4
-
 
1242
;    ;   push     .cex1
-
 
1243
;       fld      dword .cby1
-
 
1244
;       fistp    dword [esp-4]
-
 
1245
;       sub      esp,4
-
 
1246
;;       push     dword .cby1
-
 
1247
;       fld      .cbx1
-
 
1248
;       fistp    dword [esp-4]
-
 
1249
;       sub      esp,4
-
 
1250
;;      push     .cbx1
-
 
Line 1251... Line -...
1251
;       push     ecx
-
 
1252
 
-
 
1253
;       fld      .cx1
-
 
1254
;       fistp    dword [esp-4]
-
 
1255
;       mov      eax,[esp-4]
-
 
1256
;       sar      eax,ROUND
-
 
1257
;       fld      .cx2
-
 
1258
;       fistp    dword [esp-4]
-
 
1259
;       mov      ebx,[esp-4]
-
 
1260
;       sar      ebx,ROUND
-
 
1261
 
-
 
1262
;       call     bump_tex_line_z
-
 
1263
;
-
 
1264
;       popad
1048
.call_line:
1265
;else
1049
 
1266
       pushad
1050
       pushad
1267
       push	.tex_ptr
1051
       push	.tex_ptr
1268
       push	dword .cty1
1052
       push	dword .cty1
Line 1279... Line 1063...
1279
       push	dword .cby2
1063
       push	dword .cby2
1280
       push	.cbx2
1064
       push	.cbx2
1281
       push	dword .cey1
1065
       push	dword .cey1
1282
       push	.cex1
1066
       push	.cex1
1283
       push	dword .cby1
1067
;if Ext >= SSE2
-
 
1068
;       sub      esp,8
-
 
1069
;       shufps   xmm0,xmm0,10110100b
-
 
1070
;       movhps   [esp],xmm0 ;================================
-
 
1071
;else
-
 
1072
 
-
 
1073
       push	dword .cby1
1284
       push	.cbx1
1074
       push	.cbx1
1285
       push	ecx
1075
;end if
-
 
1076
 
-
 
1077
       push	ecx
1286
 
1078
 
Line 1287... Line 1079...
1287
       mov	eax,.cx1
1079
       mov	eax,.cx1
1288
       sar	eax,ROUND
1080
       sar	eax,ROUND
1289
       mov	ebx,.cx2
1081
       mov	ebx,.cx2