Skip to content

Commit 5a8727a

Browse files
committed
drop support for x86_32 PIC.
1 parent 6dd4c07 commit 5a8727a

File tree

11 files changed

+61
-146
lines changed

11 files changed

+61
-146
lines changed

common/x86/cabac-a.asm

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,13 @@ struc cb
6363
endstruc
6464

6565
%macro LOAD_GLOBAL 4
66-
%ifdef PIC64
66+
%ifdef PIC
6767
; this would be faster if the arrays were declared in asm, so that I didn't have to duplicate the lea
6868
lea r11, [%2 GLOBAL]
6969
%ifnidn %3, 0
7070
add r11, %3
7171
%endif
7272
movzx %1, byte [r11+%4]
73-
%elifdef PIC32
74-
%ifnidn %3, 0
75-
lea %1, [%3+%4]
76-
movzx %1, byte [%2+%1 GLOBAL]
77-
%else
78-
movzx %1, byte [%2+%3+%4 GLOBAL]
79-
%endif
8073
%else
8174
movzx %1, byte [%2+%3+%4]
8275
%endif
@@ -85,7 +78,6 @@ endstruc
8578
cglobal x264_cabac_encode_decision_asm, 0,7
8679
movifnidn t0d, r0m
8780
movifnidn t1d, r1m
88-
picgetgot t2
8981
mov t5d, [r0+cb.range]
9082
movzx t3d, byte [r0+cb.state+t1]
9183
mov t4d, t5d
@@ -95,22 +87,13 @@ cglobal x264_cabac_encode_decision_asm, 0,7
9587
sub t4d, t5d
9688
mov t6d, t3d
9789
shr t6d, 6
98-
%ifdef PIC32
99-
cmp t6d, r2m
100-
%else
10190
movifnidn t2d, r2m
10291
cmp t6d, t2d
103-
%endif
10492
mov t6d, [r0+cb.low]
10593
lea t7, [t6+t4]
10694
cmovne t4d, t5d
10795
cmovne t6d, t7d
108-
%ifdef PIC32
109-
mov t1, r2m
110-
LOAD_GLOBAL t3d, x264_cabac_transition, t1, t3*2
111-
%else
11296
LOAD_GLOBAL t3d, x264_cabac_transition, t2, t3*2
113-
%endif
11497
movifnidn t1d, r1m
11598
mov [r0+cb.state+t1], t3b
11699
.renorm:

common/x86/dct-32.asm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ global x264_add8x8_idct8_sse2 %+ .skip_prologue
378378
IDCT8_1D 0,1,2,3,4,5,6,7,r1
379379
SPILL r1, 6
380380
TRANSPOSE8x8W 0,1,2,3,4,5,6,7,[r1+0x60],[r1+0x40],1
381-
picgetgot edx
382381
paddw m0, [pw_32 GLOBAL]
383382
SPILL r1, 0
384383
IDCT8_1D 0,1,2,3,4,5,6,7,r1

common/x86/dct-a.asm

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ SECTION .text
4141
;-----------------------------------------------------------------------------
4242
; void x264_dct4x4dc_mmx( int16_t d[4][4] )
4343
;-----------------------------------------------------------------------------
44-
cglobal x264_dct4x4dc_mmx, 1,1,1
44+
cglobal x264_dct4x4dc_mmx, 1,1
4545
movq m0, [r0+ 0]
4646
movq m1, [r0+ 8]
4747
movq m2, [r0+16]
@@ -119,7 +119,7 @@ cglobal x264_sub4x4_dct_mmx, 3,3
119119
;-----------------------------------------------------------------------------
120120
; void x264_add4x4_idct_mmx( uint8_t *p_dst, int16_t dct[4][4] )
121121
;-----------------------------------------------------------------------------
122-
cglobal x264_add4x4_idct_mmx, 2,2,1
122+
cglobal x264_add4x4_idct_mmx, 2,2
123123
.skip_prologue:
124124
movq m0, [r1+ 0]
125125
movq m1, [r1+ 8]
@@ -155,7 +155,7 @@ cglobal x264_sub8x8_dct_sse2, 3,3
155155
movhps [r0+56], m3
156156
ret
157157

158-
cglobal x264_add8x8_idct_sse2, 2,2,1
158+
cglobal x264_add8x8_idct_sse2, 2,2
159159
.skip_prologue:
160160
call .8x4
161161
add r1, 64
@@ -197,7 +197,7 @@ cglobal %1, 3,3
197197
; void x264_add8x8_idct_mmx( uint8_t *pix, int16_t dct[4][4][4] )
198198
;-----------------------------------------------------------------------------
199199
%macro ADD_NxN_IDCT 6
200-
cglobal %1, 2,2,1
200+
cglobal %1, 2,2
201201
.skip_prologue:
202202
call %2
203203
add r0, %4-%5-%6*FDEC_STRIDE
@@ -268,7 +268,6 @@ cglobal x264_zigzag_sub_4x4_frame_ssse3, 3,3
268268
movd [r2+1*FDEC_STRIDE], xmm1
269269
movd [r2+2*FDEC_STRIDE], xmm2
270270
movd [r2+3*FDEC_STRIDE], xmm3
271-
picgetgot r1
272271
punpckldq xmm0, xmm1
273272
punpckldq xmm2, xmm3
274273
punpckldq xmm4, xmm5

common/x86/deblock-a.asm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ cglobal x264_deblock_h_luma_sse2
373373
;-----------------------------------------------------------------------------
374374
; void x264_deblock_v8_luma_mmxext( uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0 )
375375
;-----------------------------------------------------------------------------
376-
cglobal x264_deblock_%2_luma_%1, 5,5,1
376+
cglobal x264_deblock_%2_luma_%1, 5,5
377377
lea r4, [r1*3]
378378
dec r2 ; alpha-1
379379
neg r4
@@ -609,7 +609,7 @@ DEBLOCK_LUMA sse2, v, 16
609609
;-----------------------------------------------------------------------------
610610
; void x264_deblock_v_luma_intra_sse2( uint8_t *pix, int stride, int alpha, int beta )
611611
;-----------------------------------------------------------------------------
612-
cglobal x264_deblock_%2_luma_intra_%1, 4,6,1
612+
cglobal x264_deblock_%2_luma_intra_%1, 4,6
613613
%ifndef ARCH_X86_64
614614
sub esp, 0x60
615615
%endif
@@ -813,7 +813,6 @@ chroma_inter_body_mmxext:
813813
movd m6, [r4] ; tc0
814814
punpcklbw m6, m6
815815
pand m7, m6
816-
picgetgot r4
817816
DEBLOCK_P0_Q0
818817
ret
819818

@@ -862,7 +861,6 @@ chroma_intra_body_mmxext:
862861
LOAD_MASK r2d, r3d
863862
movq m5, m1
864863
movq m6, m2
865-
picgetgot r2
866864
CHROMA_INTRA_P0 m1, m0, m3
867865
CHROMA_INTRA_P0 m2, m3, m0
868866
psubb m1, m5

common/x86/mc-a.asm

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -284,17 +284,9 @@ cglobal x264_pixel_avg2_w20_sse2, 6,7
284284
%macro INIT_SHIFT 2
285285
and eax, 7
286286
shl eax, 3
287-
%ifdef PIC32
288-
; both versions work, but picgetgot is slower than gpr->mmx is slower than mem->mmx
289-
mov r2, 64
290-
sub r2, eax
291-
movd %2, eax
292-
movd %1, r2
293-
%else
294287
movd %1, [sw_64 GLOBAL]
295288
movd %2, eax
296289
psubw %1, %2
297-
%endif
298290
%endmacro
299291

300292
%macro AVG_CACHELINE_CHECK 3 ; width, cacheline, instruction set
@@ -316,7 +308,7 @@ cglobal x264_pixel_avg2_w%1_cache%2_%3, 0,0
316308
INIT_SHIFT mm6, mm7
317309
mov eax, r4m
318310
INIT_SHIFT mm4, mm5
319-
PROLOGUE 6,6,0
311+
PROLOGUE 6,6
320312
and r2, ~7
321313
and r4, ~7
322314
sub r4, r2
@@ -510,7 +502,6 @@ COPY_W16_SSE2 x264_mc_copy_w16_aligned_sse2, movdqa
510502
%else
511503
SPLATW m4, r4m
512504
%endif
513-
picgetgot r4
514505
mova m5, [pw_64 GLOBAL]
515506
psubw m5, m4 ; weight_src
516507
mova m6, [pw_32 GLOBAL] ; rounding
@@ -530,7 +521,7 @@ INIT_MMX
530521
;-----------------------------------------------------------------------------
531522
; int x264_pixel_avg_weight_w16_mmxext( uint8_t *dst, int, uint8_t *src, int, int i_weight, int )
532523
;-----------------------------------------------------------------------------
533-
cglobal x264_pixel_avg_weight_4x4_mmxext, 4,4,1
524+
cglobal x264_pixel_avg_weight_4x4_mmxext, 4,4
534525
BIWEIGHT_START 0
535526
BIWEIGHT [r0 ], [r2 ]
536527
BIWEIGHT [r0+r1 ], [r2+r3 ]
@@ -671,7 +662,7 @@ cglobal x264_prefetch_ref_mmxext, 3,3
671662
; int width, int height )
672663
;-----------------------------------------------------------------------------
673664
%macro MC_CHROMA 1
674-
cglobal x264_mc_chroma_%1, 0,6,1
665+
cglobal x264_mc_chroma_%1, 0,6
675666
%if mmsize == 16
676667
cmp dword r6m, 4
677668
jle x264_mc_chroma_mmxext %+ .skip_prologue
@@ -833,7 +824,7 @@ INIT_XMM
833824
MC_CHROMA sse2
834825

835826
INIT_MMX
836-
cglobal x264_mc_chroma_ssse3, 0,6,1
827+
cglobal x264_mc_chroma_ssse3, 0,6
837828
MC_CHROMA_START
838829
and r4d, 7
839830
and r5d, 7

common/x86/mc-a2.asm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ INIT_MMX
111111
;-----------------------------------------------------------------------------
112112
; void x264_hpel_filter_v_mmxext( uint8_t *dst, uint8_t *src, int16_t *buf, int stride, int width );
113113
;-----------------------------------------------------------------------------
114-
cglobal x264_hpel_filter_v_%1, 5,6,1
114+
cglobal x264_hpel_filter_v_%1, 5,6
115115
lea r5, [r1+r3]
116116
sub r1, r3
117117
sub r1, r3
@@ -148,7 +148,7 @@ HPEL_V mmxext
148148
;-----------------------------------------------------------------------------
149149
; void x264_hpel_filter_c_mmxext( uint8_t *dst, int16_t *buf, int width );
150150
;-----------------------------------------------------------------------------
151-
cglobal x264_hpel_filter_c_mmxext, 3,3,1
151+
cglobal x264_hpel_filter_c_mmxext, 3,3
152152
add r0, r2
153153
lea r1, [r1+r2*2]
154154
neg r2
@@ -177,7 +177,7 @@ cglobal x264_hpel_filter_c_mmxext, 3,3,1
177177
;-----------------------------------------------------------------------------
178178
; void x264_hpel_filter_h_mmxext( uint8_t *dst, uint8_t *src, int width );
179179
;-----------------------------------------------------------------------------
180-
cglobal x264_hpel_filter_h_mmxext, 3,3,1
180+
cglobal x264_hpel_filter_h_mmxext, 3,3
181181
add r0, r2
182182
add r1, r2
183183
neg r2
@@ -224,7 +224,7 @@ INIT_XMM
224224
;-----------------------------------------------------------------------------
225225
; void x264_hpel_filter_c_sse2( uint8_t *dst, int16_t *buf, int width );
226226
;-----------------------------------------------------------------------------
227-
cglobal x264_hpel_filter_c_%1, 3,3,1
227+
cglobal x264_hpel_filter_c_%1, 3,3
228228
add r0, r2
229229
lea r1, [r1+r2*2]
230230
neg r2
@@ -267,7 +267,7 @@ cglobal x264_hpel_filter_c_%1, 3,3,1
267267
;-----------------------------------------------------------------------------
268268
; void x264_hpel_filter_h_sse2( uint8_t *dst, uint8_t *src, int width );
269269
;-----------------------------------------------------------------------------
270-
cglobal x264_hpel_filter_h_sse2, 3,3,1
270+
cglobal x264_hpel_filter_h_sse2, 3,3
271271
add r0, r2
272272
add r1, r2
273273
neg r2

common/x86/pixel-a.asm

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ SATD_W4 mmxext
481481
%endmacro
482482

483483
%macro SATD_END_SSE2 0
484-
picgetgot ebx
485484
psrlw m6, 1
486485
HADDW m6, m7
487486
movd eax, m6
@@ -643,7 +642,6 @@ cglobal x264_pixel_sa8d_8x8_%1, 4,7
643642
paddusw m0, m7
644643
paddusw m5, m4
645644
pavgw m0, m5
646-
picgetgot ebx
647645
HADDW m0, m7
648646
movd eax, m0
649647
mov ecx, eax ; preserve rounding for 16x16
@@ -1220,7 +1218,6 @@ cglobal x264_pixel_ssim_4x4x2_core_sse2, 4,4
12201218
%endrep
12211219
; PHADDW m1, m2
12221220
; PHADDD m3, m4
1223-
picgetgot eax
12241221
movdqa m7, [pw_1 GLOBAL]
12251222
pshufd m5, m3, 0xb1
12261223
pmaddwd m1, m7
@@ -1267,7 +1264,6 @@ cglobal x264_pixel_ssim_end4_sse2, 3,3
12671264
paddd m1, m2
12681265
paddd m2, m3
12691266
paddd m3, m4
1270-
picgetgot r1
12711267
movdqa m5, [ssim_c1 GLOBAL]
12721268
movdqa m6, [ssim_c2 GLOBAL]
12731269
TRANSPOSE4x4D 0, 1, 2, 3, 4
@@ -1298,8 +1294,8 @@ cglobal x264_pixel_ssim_end4_sse2, 3,3
12981294
cmp r2d, 4
12991295
je .skip ; faster only if this is the common case; remove branch if we use ssim on a macroblock level
13001296
neg r2
1301-
%ifdef PIC64
1302-
lea r3, [mask_ff + 16 GLOBAL]
1297+
%ifdef PIC
1298+
lea r3, [mask_ff + 16 GLOBAL]
13031299
movdqu m1, [r3 + r2*4]
13041300
%else
13051301
movdqu m1, [mask_ff + r2*4 + 16 GLOBAL]

0 commit comments

Comments
 (0)