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

Min Chen chenm003 at 163.com
Fri Sep 5 21:20:03 CEST 2014


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1409944786 25200
# Node ID 27364e9f97e4005f94034505028d9562bfad981c
# Parent  795878af39730deb24e2ee0e585c625084bb031b
x86inc.asm: fix vpbroadcastd bug on Mac platform

diff -r 795878af3973 -r 27364e9f97e4 source/common/x86/x86inc.asm
--- a/source/common/x86/x86inc.asm	Fri Sep 05 16:03:44 2014 +0200
+++ b/source/common/x86/x86inc.asm	Fri Sep 05 12:19:46 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
+    vbroadcastsd %1, %2
+  %endif
+%endmacro



More information about the x265-devel mailing list