$OpenBSD: patch-common_x86_trellis-64_asm,v 1.1 2018/09/16 06:37:15 ajacoutot Exp $

x86: Always use PIC in x86-64 asm

Index: common/x86/trellis-64.asm
--- common/x86/trellis-64.asm.orig
+++ common/x86/trellis-64.asm
@@ -202,7 +202,6 @@ cglobal %1, 4,15,9
     paddd      m6, m6
     %define unquant_mf m6
 %endif
-%ifdef PIC
 %if dc == 0
     mov unquant_mfm, unquant_mfq
 %endif
@@ -212,9 +211,6 @@ cglobal %1, 4,15,9
     ; (Any address in .text would work, this one was just convenient.)
     lea r0, [$$]
     %define GLOBAL +r0-$$
-%else
-    %define GLOBAL
-%endif
 
     TRELLIS_LOOP 0 ; node_ctx 0..3
     TRELLIS_LOOP 1 ; node_ctx 1..7
@@ -304,12 +300,8 @@ cglobal %1, 4,15,9
     mov    r10, cabac_state_sigm
 %if num_coefs == 64
     mov    r6d, b_interlacedm
-%ifdef PIC
     add    r6d, iid
     movzx  r6d, byte [significant_coeff_flag_offset_8x8 + r6 GLOBAL]
-%else
-    movzx  r6d, byte [significant_coeff_flag_offset_8x8 + r6 + iiq]
-%endif
     movzx  r10, byte [r10 + r6]
 %elif num_coefs == 8
     movzx  r13, byte [coeff_flag_offset_chroma_422_dc + iiq GLOBAL]
@@ -408,12 +400,8 @@ cglobal %1, 4,15,9
 %if dc
     pmuludq m0, unquant_mf
 %else
-%ifdef PIC
     mov    r10, unquant_mfm
     LOAD_DUP m3, [r10 + zigzagiq*4]
-%else
-    LOAD_DUP m3, [unquant_mfq + zigzagiq*4]
-%endif
     pmuludq m0, m3
 %endif
     paddd   m0, [pq_128]
