[x265] [PATCH] x86inc.asm: fix vpbroadcastd bug on Mac platform

Min Chen chenm003 at 163.com
Sat Sep 6 01:48:10 CEST 2014


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1409960883 25200
# Node ID 8abcfdeeea2eab2e11da59002dad42dcf16aeab8
# Parent  e0db7914e7020a6a6454fbf1d3ce793efa2209a1
x86inc.asm: fix vpbroadcastd bug on Mac platform

diff -r e0db7914e702 -r 8abcfdeeea2e source/common/x86/x86inc.asm
--- a/source/common/x86/x86inc.asm	Fri Sep 05 16:47:42 2014 -0700
+++ b/source/common/x86/x86inc.asm	Fri Sep 05 16:48:03 2014 -0700
@@ -888,6 +888,8 @@
     %define ymmmm%1   mm%1
     %define ymmxmm%1 xmm%1
     %define ymmymm%1 ymm%1
+    %define ymm%1xmm xmm%1
+    %define xmm%1ymm ymm%1
     %define xm%1 xmm %+ m%1
     %define ym%1 ymm %+ m%1
 %endmacro
@@ -1480,3 +1482,13 @@
 %endif
 %endmacro
 %endif
+
+; workaround: vpbroadcastd with register, the yasm will generate wrong code
+%macro vpbroadcastd 2
+  %ifid %2
+    movd         %1 %+ xmm, %2
+    vpbroadcastd %1, %1 %+ xmm
+  %else
+    vpbroadcastd %1, %2
+  %endif
+%endmacro



More information about the x265-devel mailing list