From 71379b87df55413d40736d2288a8d0bde76f2af9 Mon Sep 17 00:00:00 2001 From: John Stark Date: Fri, 21 Nov 2014 21:11:26 +0100 Subject: [PATCH] Changes to assembler for NASM on mac. fixes non-Apple nasm part of issue #755 Change-Id: I11955d270c4ee55e3c00e99f568de01b95e7ea9a --- third_party/x86inc/x86inc.asm | 12 ++++++++++-- vp9/common/x86/vp9_subpixel_8t_ssse3.asm | 4 ++-- vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm | 8 ++++---- vp9/encoder/x86/vp9_subpel_variance.asm | 4 ++-- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/third_party/x86inc/x86inc.asm b/third_party/x86inc/x86inc.asm index 99453a998..8e75a4b19 100644 --- a/third_party/x86inc/x86inc.asm +++ b/third_party/x86inc/x86inc.asm @@ -617,9 +617,17 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14 %elifidn __OUTPUT_FORMAT__,elf64 global %1:function hidden %elifidn __OUTPUT_FORMAT__,macho32 - global %1:private_extern + %ifdef __NASM_VER__ + global %1 + %else + global %1:private_extern + %endif %elifidn __OUTPUT_FORMAT__,macho64 - global %1:private_extern + %ifdef __NASM_VER__ + global %1 + %else + global %1:private_extern + %endif %else global %1 %endif diff --git a/vp9/common/x86/vp9_subpixel_8t_ssse3.asm b/vp9/common/x86/vp9_subpixel_8t_ssse3.asm index fd781d4bc..cf0704b3e 100644 --- a/vp9/common/x86/vp9_subpixel_8t_ssse3.asm +++ b/vp9/common/x86/vp9_subpixel_8t_ssse3.asm @@ -18,7 +18,7 @@ mov rcx, 0x0400040 movdqa xmm4, [rdx] ;load filters - movd xmm5, rcx + movq xmm5, rcx packsswb xmm4, xmm4 pshuflw xmm0, xmm4, 0b ;k0_k1 pshuflw xmm1, xmm4, 01010101b ;k2_k3 @@ -661,7 +661,7 @@ sym(vp9_filter_block1d16_v8_avg_ssse3): mov rcx, 0x0400040 movdqa xmm4, [rdx] ;load filters - movd xmm5, rcx + movq xmm5, rcx packsswb xmm4, xmm4 pshuflw xmm0, xmm4, 0b ;k0_k1 pshuflw xmm1, xmm4, 01010101b ;k2_k3 diff --git a/vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm b/vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm index 508e1d4f5..f5f05e799 100644 --- a/vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm +++ b/vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm @@ -122,8 +122,8 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \ pcmpgtw m7, m6, m0 ; m7 = c[i] >= zbin pcmpgtw m12, m11, m0 ; m12 = c[i] >= zbin %ifidn %1, b_32x32 - pmovmskb r6, m7 - pmovmskb r2, m12 + pmovmskb r6d, m7 + pmovmskb r2d, m12 or r6, r2 jz .skip_iter %endif @@ -308,8 +308,8 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \ %ifidn %1, fp_32x32 pcmpgtw m7, m6, m0 pcmpgtw m12, m11, m0 - pmovmskb r6, m7 - pmovmskb r2, m12 + pmovmskb r6d, m7 + pmovmskb r2d, m12 or r6, r2 jz .skip_iter diff --git a/vp9/encoder/x86/vp9_subpel_variance.asm b/vp9/encoder/x86/vp9_subpel_variance.asm index 1a9e4e8b6..06b8b034a 100644 --- a/vp9/encoder/x86/vp9_subpel_variance.asm +++ b/vp9/encoder/x86/vp9_subpel_variance.asm @@ -101,7 +101,7 @@ SECTION .text pshufd m4, m6, 0x1 movd [r1], m7 ; store sse paddd m6, m4 - movd rax, m6 ; store sum as return value + movd raxd, m6 ; store sum as return value %else ; mmsize == 8 pshufw m4, m6, 0xe pshufw m3, m7, 0xe @@ -113,7 +113,7 @@ SECTION .text movd [r1], m7 ; store sse pshufw m4, m6, 0xe paddd m6, m4 - movd rax, m6 ; store sum as return value + movd raxd, m6 ; store sum as return value %endif RET %endmacro -- 2.40.0