%if ABI_IS_32BIT
%if CONFIG_PIC=1
%ifidn __OUTPUT_FORMAT__,elf32
+ %define GET_GOT_DEFINED 1
%define GET_GOT_SAVE_ARG 1
%define WRT_PLT wrt ..plt
%macro GET_GOT 1
%define RESTORE_GOT pop %1
%endmacro
%elifidn __OUTPUT_FORMAT__,macho32
+ %define GET_GOT_DEFINED 1
%define GET_GOT_SAVE_ARG 1
%macro GET_GOT 1
push %1
%undef RESTORE_GOT
%define RESTORE_GOT pop %1
%endmacro
+ %else
+ %define GET_GOT_DEFINED 0
%endif
%endif
%define sec_str sec_stridemp
; Store bilin_filter and pw_8 location in stack
- GET_GOT eax
+ %if GET_GOT_DEFINED == 1
+ GET_GOT eax
+ add esp, 4 ; restore esp
+ %endif
lea ecx, [GLOBAL(bilin_filter_m)]
mov g_bilin_filterm, ecx
lea ecx, [GLOBAL(pw_8)]
mov g_pw_8m, ecx
- RESTORE_GOT ; restore esp
LOAD_IF_USED 0, 1 ; load eax, ecx back
%else
cglobal highbd_sub_pixel_variance%1xh, 7, 7, 13, src, src_stride, \
%define block_height heightd
; Store bilin_filter and pw_8 location in stack
- GET_GOT eax
+ %if GET_GOT_DEFINED == 1
+ GET_GOT eax
+ add esp, 4 ; restore esp
+ %endif
lea ecx, [GLOBAL(bilin_filter_m)]
mov g_bilin_filterm, ecx
lea ecx, [GLOBAL(pw_8)]
mov g_pw_8m, ecx
- RESTORE_GOT ; restore esp
LOAD_IF_USED 0, 1 ; load eax, ecx back
%endif
%else
%define sec_str sec_stridemp
;Store bilin_filter and pw_8 location in stack
- GET_GOT eax
+ %if GET_GOT_DEFINED == 1
+ GET_GOT eax
+ add esp, 4 ; restore esp
+ %endif
lea ecx, [GLOBAL(bilin_filter_m)]
mov g_bilin_filterm, ecx
lea ecx, [GLOBAL(pw_8)]
mov g_pw_8m, ecx
- RESTORE_GOT ; restore esp
LOAD_IF_USED 0, 1 ; load eax, ecx back
%else
cglobal sub_pixel_variance%1xh, 7, 7, 13, src, src_stride, x_offset, \
%define block_height heightd
;Store bilin_filter and pw_8 location in stack
- GET_GOT eax
+ %if GET_GOT_DEFINED == 1
+ GET_GOT eax
+ add esp, 4 ; restore esp
+ %endif
lea ecx, [GLOBAL(bilin_filter_m)]
mov g_bilin_filterm, ecx
lea ecx, [GLOBAL(pw_8)]
mov g_pw_8m, ecx
- RESTORE_GOT ; restore esp
LOAD_IF_USED 0, 1 ; load eax, ecx back
%endif
%else