[x265-commits] [x265] asm: pull in pengvado's header patch to speed up yasm com...

Steve Borho steve at borho.org
Sat Feb 1 23:40:40 CET 2014


details:   http://hg.videolan.org/x265/rev/15f1f927bcfe
branches:  
changeset: 5972:15f1f927bcfe
user:      Steve Borho <steve at borho.org>
date:      Sat Feb 01 16:02:44 2014 -0600
description:
asm: pull in pengvado's header patch to speed up yasm compiles
Subject: [x265] x86inc.asm: allow x64 output format

details:   http://hg.videolan.org/x265/rev/683361fd76c2
branches:  
changeset: 5973:683361fd76c2
user:      Steve Borho <steve at borho.org>
date:      Sat Feb 01 16:04:31 2014 -0600
description:
x86inc.asm: allow x64 output format

x264 commit 3361d59a0a83d
Subject: [x265] x86inc: Make ym# behave the same way as xm#

details:   http://hg.videolan.org/x265/rev/81f2c587a0a7
branches:  
changeset: 5974:81f2c587a0a7
user:      Steve Borho <steve at borho.org>
date:      Sat Feb 01 16:05:21 2014 -0600
description:
x86inc: Make ym# behave the same way as xm#

x264 commit 0997c288be10
Subject: [x265] cmake: prevent warnings from recent builds of cmake

details:   http://hg.videolan.org/x265/rev/bb33ab0f4ef9
branches:  
changeset: 5975:bb33ab0f4ef9
user:      Steve Borho <steve at borho.org>
date:      Sat Feb 01 16:39:12 2014 -0600
description:
cmake: prevent warnings from recent builds of cmake

cmake really should ignore cmake_policy(SET foo) if foo is not yet supported,
so every cmake user doesn't have to check the exact version which introduced
that backward compatibility option.. but...

diffstat:

 source/CMakeLists.txt        |   4 +++
 source/common/x86/x86inc.asm |  58 ++++++++++++++++++++++---------------------
 2 files changed, 34 insertions(+), 28 deletions(-)

diffs (138 lines):

diff -r 33929c36a646 -r bb33ab0f4ef9 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Wed Jan 29 23:28:15 2014 +0900
+++ b/source/CMakeLists.txt	Sat Feb 01 16:39:12 2014 -0600
@@ -5,6 +5,10 @@ if(NOT CMAKE_BUILD_TYPE)
         "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel."
         FORCE)
 endif()
+message(STATUS "cmake version ${CMAKE_VERSION}")
+if(NOT CMAKE_VERSION VERSION_LESS "2.8.12.20131121")
+    cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang
+endif()
 
 project (x265)
 cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
diff -r 33929c36a646 -r bb33ab0f4ef9 source/common/x86/x86inc.asm
--- a/source/common/x86/x86inc.asm	Wed Jan 29 23:28:15 2014 +0900
+++ b/source/common/x86/x86inc.asm	Sat Feb 01 16:39:12 2014 -0600
@@ -1,7 +1,7 @@
 ;*****************************************************************************
 ;* x86inc.asm: x264asm abstraction layer
 ;*****************************************************************************
-;* Copyright (C) 2005-2013 x264 project
+;* Copyright (C) 2005-2014 x264 project
 ;*
 ;* Authors: Loren Merritt <lorenm at u.washington.edu>
 ;*          Anton Mitrofanov <BugMaster at narod.ru>
@@ -49,6 +49,8 @@
         %define WIN64  1
     %elifidn __OUTPUT_FORMAT__,win64
         %define WIN64  1
+    %elifidn __OUTPUT_FORMAT__,x64
+        %define WIN64  1
     %else
         %define UNIX64 1
     %endif
@@ -776,9 +778,9 @@ SECTION .note.GNU-stack noalloc noexec n
 %endmacro
 
 ; Merge mmx and sse*
-; m# is a simd regsiter of the currently selected size
-; xm# is the corresponding xmmreg (if selcted xmm or ymm size), or mmreg (if selected mmx)
-; ym# is the corresponding ymmreg (if selcted xmm or ymm size), or mmreg (if selected mmx)
+; m# is a simd register of the currently selected size
+; xm# is the corresponding xmm register if mmsize >= 16, otherwise the same as m#
+; ym# is the corresponding ymm register if mmsize >= 32, otherwise the same as m#
 ; (All 3 remain in sync through SWAP.)
 
 %macro CAT_XDEFINE 3
@@ -864,7 +866,7 @@ INIT_XMM
     %define xmmxmm%1 xmm%1
     %define xmmymm%1 xmm%1
     %define ymmmm%1   mm%1
-    %define ymmxmm%1 ymm%1
+    %define ymmxmm%1 xmm%1
     %define ymmymm%1 ymm%1
     %define xm%1 xmm %+ m%1
     %define ym%1 ymm %+ m%1
@@ -1030,25 +1032,25 @@ INIT_XMM
 ;%5+: operands
 %macro RUN_AVX_INSTR 5-8+
     %ifnum sizeof%6
-        %assign %%sizeofreg sizeof%6
+        %assign __sizeofreg sizeof%6
     %elifnum sizeof%5
-        %assign %%sizeofreg sizeof%5
+        %assign __sizeofreg sizeof%5
     %else
-        %assign %%sizeofreg mmsize
+        %assign __sizeofreg mmsize
     %endif
-    %assign %%emulate_avx 0
-    %if avx_enabled && %%sizeofreg >= 16
-        %xdefine %%instr v%1
+    %assign __emulate_avx 0
+    %if avx_enabled && __sizeofreg >= 16
+        %xdefine __instr v%1
     %else
-        %xdefine %%instr %1
+        %xdefine __instr %1
         %if %0 >= 7+%3
-            %assign %%emulate_avx 1
+            %assign __emulate_avx 1
         %endif
     %endif
 
-    %if %%emulate_avx
-        %xdefine %%src1 %6
-        %xdefine %%src2 %7
+    %if __emulate_avx
+        %xdefine __src1 %6
+        %xdefine __src2 %7
         %ifnidn %5, %6
             %if %0 >= 8
                 CHECK_AVX_INSTR_EMU {%1 %5, %6, %7, %8}, %5, %7, %8
@@ -1060,31 +1062,31 @@ INIT_XMM
                     ; 3-operand AVX instructions with a memory arg can only have it in src2,
                     ; whereas SSE emulation prefers to have it in src1 (i.e. the mov).
                     ; So, if the instruction is commutative with a memory arg, swap them.
-                    %xdefine %%src1 %7
-                    %xdefine %%src2 %6
+                    %xdefine __src1 %7
+                    %xdefine __src2 %6
                 %endif
             %endif
-            %if %%sizeofreg == 8
-                MOVQ %5, %%src1
+            %if __sizeofreg == 8
+                MOVQ %5, __src1
             %elif %2
-                MOVAPS %5, %%src1
+                MOVAPS %5, __src1
             %else
-                MOVDQA %5, %%src1
+                MOVDQA %5, __src1
             %endif
         %endif
         %if %0 >= 8
-            %1 %5, %%src2, %8
+            %1 %5, __src2, %8
         %else
-            %1 %5, %%src2
+            %1 %5, __src2
         %endif
     %elif %0 >= 8
-        %%instr %5, %6, %7, %8
+        __instr %5, %6, %7, %8
     %elif %0 == 7
-        %%instr %5, %6, %7
+        __instr %5, %6, %7
     %elif %0 == 6
-        %%instr %5, %6
+        __instr %5, %6
     %else
-        %%instr %5
+        __instr %5
     %endif
 %endmacro
 


More information about the x265-commits mailing list