]> granicus.if.org Git - libvpx/commitdiff
Properly use GET_GOT/RESTORE_GOT when using GLOBAL().
authorRonald S. Bultje <rbultje@google.com>
Thu, 30 Jun 2011 21:04:27 +0000 (14:04 -0700)
committerRonald S. Bultje <rbultje@google.com>
Thu, 30 Jun 2011 21:04:27 +0000 (14:04 -0700)
This should fix binaries using PIC on x86-32. Also should
fix issue 343.

Change-Id: I591de3ad68c8a8bb16054bd8f987a75b4e2bad02

vp8/common/x86/recon_sse2.asm
vpx_ports/x86_abi_support.asm

index 00b74387c3f036619f06cf12291cf3bfa81a556e..0e23116ce6a34f5c7a5318882ecc7b562b4d034a 100644 (file)
@@ -593,7 +593,10 @@ sym(vp8_intra_pred_uv_ho_%1):
     push        rsi
     push        rdi
 %ifidn %1, ssse3
+%ifndef GET_GOT_SAVE_ARG
     push        rbx
+%endif
+    GET_GOT     rbx
 %endif
     ; end prolog
 
@@ -606,9 +609,9 @@ sym(vp8_intra_pred_uv_ho_%1):
     mov         rdi,        arg(0) ;dst;
     movsxd      rcx,        dword ptr arg(1) ;dst_stride
 %ifidn %1, ssse3
-    lea         rbx,        [rax*3]
     lea         rdx,        [rcx*3]
     movdqa      xmm2,       [GLOBAL(dc_00001111)]
+    lea         rbx,        [rax*3]
 %endif
     dec         rsi
 %ifidn %1, mmx2
@@ -656,7 +659,10 @@ vp8_intra_pred_uv_ho_%1_loop:
 
     ; begin epilog
 %ifidn %1, ssse3
+    RESTORE_GOT
+%ifndef GET_GOT_SAVE_ARG
     pop         rbx
+%endif
 %endif
     pop         rdi
     pop         rsi
index 37a3205b230604e28b1a445a7087c292ee9f2919..7382a913454916c4d00b127e1eb60b4df2550e7b 100644 (file)
 %if ABI_IS_32BIT
   %if CONFIG_PIC=1
   %ifidn __OUTPUT_FORMAT__,elf32
+    %define GET_GOT_SAVE_ARG 1
     %define WRT_PLT wrt ..plt
     %macro GET_GOT 1
       extern _GLOBAL_OFFSET_TABLE_
       %define RESTORE_GOT pop %1
     %endmacro
   %elifidn __OUTPUT_FORMAT__,macho32
+    %define GET_GOT_SAVE_ARG 1
     %macro GET_GOT 1
       push %1
       call %%get_got