History

Merge pull request #2677 from saamas/x86-32-picasm-improvements

X86_32_PICASM improvements

ruil2 committed 9 years ago

Commit c4636c32 parents 3b37280 f711d0a18 files · +774 −2821Browse files

Showing the changes to codec/decoder (1 of 18 files). Show all

Unified · Split

codec/decoder/core/x86/intra_pred.asm+63−317
@@ -49,7 +49,11 @@ · 48 unmodified lines
4949 ; Local Data (Read Only)
5050 ;*******************************************************************************
5151
52+%ifdef X86_32_PICASM
53+SECTION .text align=16
54+%else
5255 SECTION .rodata align=16
56+%endif
5357
5458 align 16
5559 sse2_plane_inc_minus dw -7, -6, -5, -4, -3, -2, -1, 0
@@ -132,40 +136,14 @@ sse2_wd_0x02: times 8 dw 0x02 · 76 unmodified lines
132136 %macro COPY_16_TIMES 2
133137 movdqa %2, [%1-16]
134138 psrldq %2, 15
135−%ifdef X86_32_PICASM
136− push r5
137− mov r5, esp
138− and esp, 0xfffffff0
139− push 0x01010101 ;mmx_01bytes
140− push 0x01010101
141− push 0x01010101
142− push 0x01010101
143− pmuludq %2, [esp]
144− mov esp, r5
145− pop r5
146−%else
147− pmuludq %2, [mmx_01bytes]
148−%endif
139+ pmuludq %2, [pic(mmx_01bytes)]
149140 pshufd %2, %2, 0
150141 %endmacro
151142
152143 %macro COPY_16_TIMESS 3
153144 movdqa %2, [%1+%3-16]
154145 psrldq %2, 15
155−%ifdef X86_32_PICASM
156− push r5
157− mov r5, esp
158− and esp, 0xfffffff0
159− push 0x01010101 ;mmx_01bytes
160− push 0x01010101
161− push 0x01010101
162− push 0x01010101
163− pmuludq %2, [esp]
164− mov esp, r5
165− pop r5
166−%else
167− pmuludq %2, [mmx_01bytes]
168−%endif
146+ pmuludq %2, [pic(mmx_01bytes)]
169147 pshufd %2, %2, 0
170148 %endmacro
171149
@@ -203,52 +181,26 @@ SECTION .text · 31 unmodified lines
203181 ;*******************************************************************************
204182 WELS_EXTERN WelsDecoderI4x4LumaPredH_sse2
205183 %assign push_num 0
184+ INIT_X86_32_PIC r3
206185 LOAD_2_PARA
207186 SIGN_EXTENSION r1, r1d
208−%ifdef X86_32_PICASM
209− push r3
210− mov r3, esp
211− and esp, 0xfffffff0
212− push 0x01010101 ;mmx_01bytes
213− push 0x01010101
214− push 0x01010101
215− push 0x01010101
216−%endif
217187
218188 movzx r2, byte [r0-1]
219189 movd xmm0, r2d
220−%ifdef X86_32_PICASM
221− pmuludq xmm0, [esp]
222−%else
223− pmuludq xmm0, [mmx_01bytes]
224−%endif
190+ pmuludq xmm0, [pic(mmx_01bytes)]
225191
226192 movzx r2, byte [r0+r1-1]
227193 movd xmm1, r2d
228−%ifdef X86_32_PICASM
229− pmuludq xmm1, [esp]
230−%else
231− pmuludq xmm1, [mmx_01bytes]
232−%endif
194+ pmuludq xmm1, [pic(mmx_01bytes)]
233195
234196 lea r0, [r0+r1]
235197 movzx r2, byte [r0+r1-1]
236198 movd xmm2, r2d
237−%ifdef X86_32_PICASM
238− pmuludq xmm2, [esp]
239−%else
240− pmuludq xmm2, [mmx_01bytes]
241−%endif
199+ pmuludq xmm2, [pic(mmx_01bytes)]
242200
243201 movzx r2, byte [r0+2*r1-1]
244202 movd xmm3, r2d
245−%ifdef X86_32_PICASM
246− pmuludq xmm3, [esp]
247− mov esp, r3
248− pop r3
249−%else
250− pmuludq xmm3, [mmx_01bytes]
251−%endif
203+ pmuludq xmm3, [pic(mmx_01bytes)]
252204
253205 sub r0, r1
254206 movd [r0], xmm0
@@ -257,6 +209,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredH_sse2 · 2 unmodified lines
257209 movd [r0], xmm2
258210 movd [r0+r1], xmm3
259211
212+ DEINIT_X86_32_PIC
260213 ret
261214
262215 ;*******************************************************************************
@@ -266,6 +219,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredPlane_sse2 · 3 unmodified lines
266219 push r3
267220 push r4
268221 %assign push_num 2
222+ INIT_X86_32_PIC r5
269223 LOAD_2_PARA
270224 PUSH_XMM 8
271225 SIGN_EXTENSION r1, r1d
@@ -276,37 +230,11 @@ WELS_EXTERN WelsDecoderI16x16LumaPredPlane_sse2 · 4 unmodified lines
276230 ;for H
277231 pxor xmm7, xmm7
278232 movq xmm0, [r0]
279−%ifdef X86_32_PICASM
280− push r0
281− mov r0, esp
282− and esp, 0xfffffff0
283− push 0x00010002
284− push 0x00030004
285− push 0x00050006
286− push 0x00070008
287− movdqa xmm5, [esp]
288− mov esp, r0
289− pop r0
290−%else
291− movdqa xmm5, [sse2_plane_dec]
292−%endif
233+ movdqa xmm5, [pic(sse2_plane_dec)]
293234 punpcklbw xmm0, xmm7
294235 pmullw xmm0, xmm5
295236 movq xmm1, [r0 + 9]
296−%ifdef X86_32_PICASM
297− push r0
298− mov r0, esp
299− and esp, 0xfffffff0
300− push 0x00080007 ;sse2_plane_inc
301− push 0x00060005
302− push 0x00040003
303− push 0x00020001
304− movdqa xmm6, [esp]
305− mov esp, r0
306− pop r0
307−%else
308− movdqa xmm6, [sse2_plane_inc]
309−%endif
237+ movdqa xmm6, [pic(sse2_plane_inc)]
310238 punpcklbw xmm1, xmm7
311239 pmullw xmm1, xmm6
312240 psubw xmm1, xmm0
@@ -361,19 +289,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredPlane_sse2 · 48 unmodified lines
361289 SSE2_Copy8Times xmm0, r3d ; xmm0 = s,s,s,s,s,s,s,s
362290
363291 xor r2, r2
364−%ifdef X86_32_PICASM
365− mov r2, esp
366− and esp, 0xfffffff0
367− push 0x0000ffff ;sse2_plane_inc_minus
368− push 0xfffefffd
369− push 0xfffcfffb
370− push 0xfffafff9
371− movdqa xmm5, [esp]
372− mov esp, r2
373− xor r2, r2
374−%else
375− movdqa xmm5, [sse2_plane_inc_minus]
376−%endif
292+ movdqa xmm5, [pic(sse2_plane_inc_minus)]
377293
378294 get_i16x16_luma_pred_plane_sse2_1:
379295 movdqa xmm2, xmm1
@@ -393,6 +309,7 @@ get_i16x16_luma_pred_plane_sse2_1: · 13 unmodified lines
393309 jnz get_i16x16_luma_pred_plane_sse2_1
394310
395311 POP_XMM
312+ DEINIT_X86_32_PIC
396313 pop r4
397314 pop r3
398315 ret
@@ -414,6 +331,7 @@ get_i16x16_luma_pred_plane_sse2_1: · 15 unmodified lines
414331
415332 WELS_EXTERN WelsDecoderI16x16LumaPredH_sse2
416333 %assign push_num 0
334+ INIT_X86_32_PIC_NOPRESERVE r2
417335 LOAD_2_PARA
418336 SIGN_EXTENSION r1, r1d
419337
@@ -430,6 +348,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredH_sse2 · 10 unmodified lines
430348 SSE2_PRED_H_16X16_TWO_LINE_DEC r0, r1
431349 SSE2_PRED_H_16X16_TWO_LINE_DEC r0, r1
432350
351+ DEINIT_X86_32_PIC
433352 ret
434353
435354 ;*******************************************************************************
@@ -477,6 +396,7 @@ WELS_EXTERN WelsDecoderIChromaPredPlane_sse2 · 41 unmodified lines
477396 push r3
478397 push r4
479398 %assign push_num 2
399+ INIT_X86_32_PIC r5
480400 LOAD_2_PARA
481401 PUSH_XMM 8
482402 SIGN_EXTENSION r1, r1d
@@ -486,30 +406,11 @@ WELS_EXTERN WelsDecoderIChromaPredPlane_sse2 · 3 unmodified lines
486406
487407 pxor mm7, mm7
488408 movq mm0, [r0]
489−%ifdef X86_32_PICASM
490− push r5
491− mov r5, esp
492− and esp, 0xfffffff0
493− push 0x00010002 ;sse2_plane_dec_c
494− push 0x00030004
495− push 0x00040003 ;sse2_plane_inc_c
496− push 0x00020001
497− push 0x00040003 ;
498− push 0x00020001
499− push 0x0000ffff
500− push 0xfffefffd
501− movq mm5, [esp+24]
502−%else
503− movq mm5, [sse2_plane_dec_c]
504−%endif
409+ movq mm5, [pic(sse2_plane_dec_c)]
505410 punpcklbw mm0, mm7
506411 pmullw mm0, mm5
507412 movq mm1, [r0 + 5]
508−%ifdef X86_32_PICASM
509− movq mm6, [esp+16]
510−%else
511− movq mm6, [sse2_plane_inc_c]
512−%endif
413+ movq mm6, [pic(sse2_plane_inc_c)]
513414 punpcklbw mm1, mm7
514415 pmullw mm1, mm6
515416 psubw mm1, mm0
@@ -561,13 +462,7 @@ WELS_EXTERN WelsDecoderIChromaPredPlane_sse2 · 45 unmodified lines
561462 SSE2_Copy8Times xmm0, r3d ; xmm0 = s,s,s,s,s,s,s,s
562463
563464 xor r2, r2
564−%ifdef X86_32_PICASM
565− movdqa xmm5, [esp]
566− mov esp, r5
567− pop r5
568−%else
569− movdqa xmm5, [sse2_plane_mul_b_c]
570−%endif
465+ movdqa xmm5, [pic(sse2_plane_mul_b_c)]
571466
572467 get_i_chroma_pred_plane_sse2_1:
573468 movdqa xmm2, xmm1
@@ -583,6 +478,7 @@ get_i_chroma_pred_plane_sse2_1: · 9 unmodified lines
583478 jnz get_i_chroma_pred_plane_sse2_1
584479
585480 POP_XMM
481+ DEINIT_X86_32_PIC
586482 pop r4
587483 pop r3
588484 WELSEMMS
@@ -602,6 +498,7 @@ get_i_chroma_pred_plane_sse2_1: · 13 unmodified lines
602498 ;*******************************************************************************
603499 WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx
604500 %assign push_num 0
501+ INIT_X86_32_PIC r3
605502 LOAD_2_PARA
606503 SIGN_EXTENSION r1, r1d
607504 mov r2, r0
@@ -629,20 +526,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx · 21 unmodified lines
629526 movq mm4,mm3 ;mm4[8]=[3],mm4[7]=[2],mm4[6]=[1],mm4[5]=[0],mm4[4]=[6],mm4[3]=[11],mm4[2]=[16],mm4[1]=[21]
630527 pavgb mm3,mm1 ;mm3=([11]+[21]+1)/2
631528 pxor mm1,mm4 ;find odd value in the lowest bit of each byte
632−%ifdef X86_32_PICASM
633− push r0
634− mov r0, esp
635− and esp, 0xfffffff0
636− push 0x01010101
637− push 0x01010101
638− push 0x01010101
639− push 0x01010101
640− pand mm1,[esp] ;set the odd bit
641− mov esp, r0
642− pop r0
643−%else
644− pand mm1,[mmx_01bytes] ;set the odd bit
645−%endif
529+ pand mm1,[pic(mmx_01bytes)] ;set the odd bit
646530 psubusb mm3,mm1 ;decrease 1 from odd bytes
647531 pavgb mm2,mm3 ;mm2=(([11]+[21]+1)/2+1+[16])/2
648532
@@ -655,6 +539,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx · 6 unmodified lines
655539 movd [r0+r1],mm2
656540 psrlq mm2,8
657541 movd [r0],mm2
542+ DEINIT_X86_32_PIC
658543 WELSEMMS
659544 ret
660545
@@ -667,20 +552,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx · 6 unmodified lines
667552 movq %1, [%3-8]
668553 psrlq %1, 38h
669554
670−%ifdef X86_32_PICASM
671− push r0
672− mov r0, esp
673− and esp, 0xfffffff0
674− push 0x01010101
675− push 0x01010101
676− push 0x01010101
677− push 0x01010101
678− pmullw %1, [esp]
679− mov esp, r0
680− pop r0
681−%else
682− pmullw %1, [mmx_01bytes]
683−%endif
555+ pmullw %1, [pic(mmx_01bytes)]
684556 pshufw %1, %1, 0
685557 movq [%4], %1
686558 %endmacro
@@ -689,26 +561,14 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx · 2 unmodified lines
689561 movq %1, [%3+r1-8]
690562 psrlq %1, 38h
691563
692−%ifdef X86_32_PICASM
693− push r0
694− mov r0, esp
695− and esp, 0xfffffff0
696− push 0x01010101
697− push 0x01010101
698− push 0x01010101
699− push 0x01010101
700− pmullw %1, [esp]
701− mov esp, r0
702− pop r0
703−%else
704− pmullw %1, [mmx_01bytes]
705−%endif
564+ pmullw %1, [pic(mmx_01bytes)]
706565 pshufw %1, %1, 0
707566 movq [%4], %1
708567 %endmacro
709568
710569 WELS_EXTERN WelsDecoderIChromaPredH_mmx
711570 %assign push_num 0
571+ INIT_X86_32_PIC r3
712572 LOAD_2_PARA
713573 SIGN_EXTENSION r1, r1d
714574 mov r2, r0
@@ -716,20 +576,7 @@ WELS_EXTERN WelsDecoderIChromaPredH_mmx · 1 unmodified line
716576 movq mm0, [r2-8]
717577 psrlq mm0, 38h
718578
719−%ifdef X86_32_PICASM
720− push r0
721− mov r0, esp
722− and esp, 0xfffffff0
723− push 0x01010101
724− push 0x01010101
725− push 0x01010101
726− push 0x01010101
727− pmullw mm0, [esp]
728− mov esp, r0
729− pop r0
730−%else
731− pmullw mm0, [mmx_01bytes]
732−%endif
579+ pmullw mm0, [pic(mmx_01bytes)]
733580 pshufw mm0, mm0, 0
734581 movq [r0], mm0
735582
@@ -753,6 +600,7 @@ WELS_EXTERN WelsDecoderIChromaPredH_mmx · 17 unmodified lines
753600 lea r0, [r0+2*r1]
754601 MMX_PRED_H_8X8_ONE_LINEE mm0, mm1, r2, r0+r1
755602
603+ DEINIT_X86_32_PIC
756604 WELSEMMS
757605 ret
758606
@@ -816,6 +664,7 @@ WELS_EXTERN WelsDecoderIChromaPredV_mmx · 57 unmodified lines
816664 ;*******************************************************************************
817665 WELS_EXTERN WelsDecoderI4x4LumaPredHD_mmx
818666 %assign push_num 0
667+ INIT_X86_32_PIC r3
819668 LOAD_2_PARA
820669 SIGN_EXTENSION r1, r1d
821670 mov r2, r0
@@ -841,18 +690,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHD_mmx · 19 unmodified lines
841690 pavgb mm1, mm0
842691
843692 pxor mm4, mm0 ; find odd value in the lowest bit of each byte
844−%ifdef X86_32_PICASM
845− push r0
846− mov r0, esp
847− and esp, 0xfffffff0
848− push 0x01010101
849− push 0x01010101
850− pand mm4, [esp]
851− mov esp, r0
852− pop r0
853−%else
854− pand mm4, [mmx_01bytes] ; set the odd bit
855−%endif
693+ pand mm4, [pic(mmx_01bytes)] ; set the odd bit
856694 psubusb mm1, mm4 ; decrease 1 from odd bytes
857695
858696 pavgb mm2, mm1 ; mm2 = [xx xx d c b f h j]
@@ -876,6 +714,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHD_mmx · 17 unmodified lines
876714 movd [r0+2*r1], mm3
877715 psrlq mm3, 10h
878716 movd [r0+r1], mm3
717+ DEINIT_X86_32_PIC
879718 WELSEMMS
880719 ret
881720
@@ -909,6 +748,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHD_mmx · 27 unmodified lines
909748 ;*******************************************************************************
910749 WELS_EXTERN WelsDecoderI4x4LumaPredHU_mmx
911750 %assign push_num 0
751+ INIT_X86_32_PIC r3
912752 LOAD_2_PARA
913753 SIGN_EXTENSION r1, r1d
914754 mov r2, r0
@@ -937,18 +777,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHU_mmx · 22 unmodified lines
937777 pavgb mm2, mm0
938778
939779 pxor mm5, mm0 ; find odd value in the lowest bit of each byte
940−%ifdef X86_32_PICASM
941− push r0
942− mov r0, esp
943− and esp, 0xfffffff0
944− push 0x01010101
945− push 0x01010101
946− pand mm5, [esp] ; set the odd bit
947− mov esp, r0
948− pop r0
949−%else
950− pand mm5, [mmx_01bytes] ; set the odd bit
951−%endif
780+ pand mm5, [pic(mmx_01bytes)] ; set the odd bit
952781 psubusb mm2, mm5 ; decrease 1 from odd bytes
953782
954783 pavgb mm2, mm3 ; mm2 = [f d b xx xx xx xx xx]
@@ -970,6 +799,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHU_mmx · 15 unmodified lines
970799 movd [r0+r1], mm1
971800 psrlq mm1, 10h
972801 movd [r0+2*r1], mm1
802+ DEINIT_X86_32_PIC
973803 WELSEMMS
974804 ret
975805
@@ -1005,6 +835,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHU_mmx · 29 unmodified lines
1005835 ;*******************************************************************************
1006836 WELS_EXTERN WelsDecoderI4x4LumaPredVR_mmx
1007837 %assign push_num 0
838+ INIT_X86_32_PIC r3
1008839 LOAD_2_PARA
1009840 SIGN_EXTENSION r1, r1d
1010841 mov r2, r0
@@ -1030,18 +861,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredVR_mmx · 19 unmodified lines
1030861 pavgb mm2, mm0
1031862
1032863 pxor mm3, mm0 ; find odd value in the lowest bit of each byte
1033−%ifdef X86_32_PICASM
1034− push r0
1035− mov r0, esp
1036− and esp, 0xfffffff0
1037− push 0x01010101
1038− push 0x01010101
1039− pand mm3, [esp] ; set the odd bit
1040− mov esp, r0
1041− pop r0
1042−%else
1043− pand mm3, [mmx_01bytes] ; set the odd bit
1044−%endif
864+ pand mm3, [pic(mmx_01bytes)] ; set the odd bit
1045865 psubusb mm2, mm3 ; decrease 1 from odd bytes
1046866
1047867 movq mm3, mm0
@@ -1071,6 +891,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredVR_mmx · 23 unmodified lines
1071891 pxor mm5, mm2 ; mm5 = [xx xx xx xx g f e j]
1072892 lea r0, [r0+2*r1]
1073893 movd [r0+r1], mm5
894+ DEINIT_X86_32_PIC
1074895 WELSEMMS
1075896 ret
1076897
@@ -1102,6 +923,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredVR_mmx · 25 unmodified lines
1102923 ;*******************************************************************************
1103924 WELS_EXTERN WelsDecoderI4x4LumaPredDDL_mmx
1104925 %assign push_num 0
926+ INIT_X86_32_PIC r3
1105927 LOAD_2_PARA
1106928 SIGN_EXTENSION r1, r1d
1107929 mov r2, r0
@@ -1121,18 +943,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDL_mmx · 13 unmodified lines
1121943 movq mm3, mm1
1122944 pavgb mm1, mm2
1123945 pxor mm3, mm2 ; find odd value in the lowest bit of each byte
1124−%ifdef X86_32_PICASM
1125− push r0
1126− mov r0, esp
1127− and esp, 0xfffffff0
1128− push 0x01010101
1129− push 0x01010101
1130− pand mm3, [esp] ; set the odd bit
1131− mov esp, r0
1132− pop r0
1133−%else
1134− pand mm3, [mmx_01bytes] ; set the odd bit
1135−%endif
946+ pand mm3, [pic(mmx_01bytes)] ; set the odd bit
1136947 psubusb mm1, mm3 ; decrease 1 from odd bytes
1137948
1138949 pavgb mm0, mm1 ; mm0 = [g f e d c b a xx]
@@ -1146,6 +957,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDL_mmx · 7 unmodified lines
1146957 psrlq mm0, 8h
1147958 lea r0, [r0+2*r1]
1148959 movd [r0+r1], mm0
960+ DEINIT_X86_32_PIC
1149961 WELSEMMS
1150962 ret
1151963
@@ -1181,6 +993,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDL_mmx · 29 unmodified lines
1181993 ;*******************************************************************************
1182994 WELS_EXTERN WelsDecoderI4x4LumaPredVL_mmx
1183995 %assign push_num 0
996+ INIT_X86_32_PIC r3
1184997 LOAD_2_PARA
1185998 SIGN_EXTENSION r1, r1d
1186999 mov r2, r0
@@ -1199,18 +1012,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredVL_mmx · 12 unmodified lines
11991012 movq mm4, mm2
12001013 pavgb mm2, mm0
12011014 pxor mm4, mm0 ; find odd value in the lowest bit of each byte
1202−%ifdef X86_32_PICASM
1203− push r0
1204− mov r0, esp
1205− and esp, 0xfffffff0
1206− push 0x01010101
1207− push 0x01010101
1208− pand mm4, [esp] ; set the odd bit
1209− mov esp, r0
1210− pop r0
1211−%else
1212− pand mm4, [mmx_01bytes] ; set the odd bit
1213−%endif
1015+ pand mm4, [pic(mmx_01bytes)] ; set the odd bit
12141016 psubusb mm2, mm4 ; decrease 1 from odd bytes
12151017
12161018 pavgb mm2, mm1 ; mm2 = [xx xx xx j h g f e]
@@ -1223,6 +1025,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredVL_mmx · 6 unmodified lines
12231025 psrlq mm2, 8h
12241026 lea r0, [r0+2*r1]
12251027 movd [r0+r1], mm2
1028+ DEINIT_X86_32_PIC
12261029 WELSEMMS
12271030 ret
12281031
@@ -1234,6 +1037,7 @@ WELS_EXTERN WelsDecoderIChromaPredDc_sse2 · 5 unmodified lines
12341037 push r3
12351038 push r4
12361039 %assign push_num 2
1040+ INIT_X86_32_PIC r5
12371041 LOAD_2_PARA
12381042 SIGN_EXTENSION r1, r1d
12391043 mov r4, r0
@@ -1275,18 +1079,7 @@ WELS_EXTERN WelsDecoderIChromaPredDc_sse2 · 35 unmodified lines
12751079 movq mm1, mm2
12761080 paddq mm1, mm0; ; sum1 = mm3, sum2 = mm0, sum3 = mm2, sum4 = mm1
12771081
1278−%ifdef X86_32_PICASM
1279− push r0
1280− mov r0, esp
1281− and esp, 0xfffffff0
1282− push 0x00000000
1283− push 0x00000002
1284− movq mm4, [esp]
1285− mov esp, r0
1286− pop r0
1287−%else
1288− movq mm4, [mmx_0x02]
1289−%endif
1082+ movq mm4, [pic(mmx_0x02)]
12901083
12911084 paddq mm0, mm4
12921085 psrlq mm0, 0x02
@@ -1302,30 +1095,13 @@ WELS_EXTERN WelsDecoderIChromaPredDc_sse2 · 9 unmodified lines
13021095 paddq mm1, mm4
13031096 psrlq mm1, 0x03
13041097
1305−%ifdef X86_32_PICASM
1306− push r5
1307− mov r5, esp
1308− and esp, 0xfffffff0
1309− push 0x01010101
1310− push 0x01010101
1311− pmuludq mm0, [esp]
1312− pmuludq mm3, [esp]
1313−%else
1314− pmuludq mm0, [mmx_01bytes]
1315− pmuludq mm3, [mmx_01bytes]
1316−%endif
1098+ pmuludq mm0, [pic(mmx_01bytes)]
1099+ pmuludq mm3, [pic(mmx_01bytes)]
13171100 psllq mm0, 0x20
13181101 pxor mm0, mm3 ; mm0 = m_up
13191102
1320−%ifdef X86_32_PICASM
1321− pmuludq mm2, [esp]
1322− pmuludq mm1, [esp]
1323− mov esp, r5
1324− pop r5
1325−%else
1326− pmuludq mm2, [mmx_01bytes]
1327− pmuludq mm1, [mmx_01bytes]
1328−%endif
1103+ pmuludq mm2, [pic(mmx_01bytes)]
1104+ pmuludq mm1, [pic(mmx_01bytes)]
13291105 psllq mm1, 0x20
13301106 pxor mm1, mm2 ; mm2 = m_down
13311107
@@ -1342,6 +1118,7 @@ WELS_EXTERN WelsDecoderIChromaPredDc_sse2 · 10 unmodified lines
13421118 lea r4, [r4+2*r1]
13431119 movq [r4+r1], mm1
13441120
1121+ DEINIT_X86_32_PIC
13451122 pop r4
13461123 pop r3
13471124 WELSEMMS
@@ -1357,6 +1134,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredDc_sse2 · 9 unmodified lines
13571134 push r3
13581135 push r4
13591136 %assign push_num 2
1137+ INIT_X86_32_PIC r5
13601138 LOAD_2_PARA
13611139 SIGN_EXTENSION r1, r1d
13621140 mov r4, r0
@@ -1385,20 +1163,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredDc_sse2 · 22 unmodified lines
13851163 movd xmm1, r2d
13861164 paddw xmm0, xmm1
13871165 psrld xmm0, 0x05
1388−%ifdef X86_32_PICASM
1389− push r0
1390− mov r0, esp
1391− and esp, 0xfffffff0
1392− push 0x01010101
1393− push 0x01010101
1394− push 0x01010101
1395− push 0x01010101
1396− pmuludq xmm0, [esp]
1397− mov esp, r0
1398− pop r0
1399−%else
1400− pmuludq xmm0, [mmx_01bytes]
1401−%endif
1166+ pmuludq xmm0, [pic(mmx_01bytes)]
14021167 pshufd xmm0, xmm0, 0
14031168
14041169 movdqa [r4], xmm0
@@ -1432,6 +1197,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredDc_sse2 · 27 unmodified lines
14321197
14331198 movdqa [r4+r1], xmm0
14341199
1200+ DEINIT_X86_32_PIC
14351201 pop r4
14361202 pop r3
14371203
@@ -1518,24 +1284,12 @@ WELS_EXTERN WelsDecoderI16x16LumaPredDcTop_sse2 · 80 unmodified lines
15181284 ;*******************************************************************************
15191285 WELS_EXTERN WelsDecoderI16x16LumaPredDcNA_sse2
15201286 %assign push_num 0
1287+ INIT_X86_32_PIC r3
15211288 LOAD_2_PARA
15221289 SIGN_EXTENSION r1, r1d
15231290 lea r2, [2*r1+r1] ; 3*kiStride
15241291
1525−%ifdef X86_32_PICASM
1526− push r0
1527− mov r0, esp
1528− and esp, 0xfffffff0
1529− push 0x80808080
1530− push 0x80808080
1531− push 0x80808080
1532− push 0x80808080
1533− movdqa xmm0, [esp]
1534− mov esp, r0
1535− pop r0
1536−%else
1537− movdqa xmm0, [sse2_dc_0x80]
1538−%endif
1292+ movdqa xmm0, [pic(sse2_dc_0x80)]
15391293 movdqa xmm1, xmm0
15401294 movdqa [r0], xmm0
15411295 movdqa [r0+r1], xmm1
@@ -1557,6 +1311,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredDcNA_sse2 · 15 unmodified lines
15571311 movdqa [r0+2*r1], xmm0
15581312 movdqa [r0+r2], xmm1
15591313
1314+ DEINIT_X86_32_PIC
15601315 ret
15611316
15621317 ;*******************************************************************************
@@ -1680,21 +1435,11 @@ WELS_EXTERN WelsDecoderIChromaPredDcTop_sse2 · 117 unmodified lines
16801435 ;*******************************************************************************
16811436 WELS_EXTERN WelsDecoderIChromaPredDcNA_mmx
16821437 %assign push_num 0
1438+ INIT_X86_32_PIC r3
16831439 LOAD_2_PARA
16841440 SIGN_EXTENSION r1, r1d
16851441 lea r2, [2*r1+r1]
1686−%ifdef X86_32_PICASM
1687− push r0
1688− mov r0, esp
1689− and esp, 0xfffffff0
1690− push 0x80808080
1691− push 0x80808080
1692− movq mm0, [esp]
1693− mov esp, r0
1694− pop r0
1695−%else
1696− movq mm0, [sse2_dc_0x80]
1697−%endif
1442+ movq mm0, [pic(sse2_dc_0x80)]
16981443 movq mm1, mm0
16991444 movq [r0], mm0
17001445 movq [r0+r1], mm1
@@ -1705,6 +1450,7 @@ WELS_EXTERN WelsDecoderIChromaPredDcNA_mmx · 4 unmodified lines
17051450 movq [r0+r1], mm1
17061451 movq [r0+2*r1], mm0
17071452 movq [r0+r2], mm1
1453+ DEINIT_X86_32_PIC
17081454 emms
17091455 ret
17101456

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t