<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div>the macro for yasm workaround only, so we'd better keep origin instruction format.<br></div><div></div><div id="divNeteaseMailCard"></div><div><br></div>At 2015-08-13 19:22:30,"Dnyaneshwar Gorade" <dnyaneshwar@multicorewareinc.com> wrote:<br> <blockquote id="isReplyContent" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div dir="ltr"><div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: small;"><div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: small;">Hi Min,<br><br>This still generates wrong code for case ymm, xmm (as %ifidni %2,xm will be false always).<br></div><div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: small;">How about the below code ?<br><br>%macro vpbroadcastd 2-3 ;; incresed one argument for case ymm, xmm<br> %ifid %3 ; case vpbroadcastd ymm, ymm, xmm<br> vpbroadcastd %1, %3<br> %elifid %2<br> movd %1 %+ xmm, %2 ; case vpbroadcastd ymm, rN<br> vpbroadcastd %1, %1 %+ xmm<br> %else<br> vpbroadcastd %1, %2 ; case vpbroadcastd ymm, [memory addr]<br> %endif<br>%endmacro<br></div><div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: small;"><br><br></div><div class="gmail_default" style="font-family: trebuchet ms,sans-serif; font-size: small;">Thanks,<br></div>Dnyaneshwar G</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 13, 2015 at 8:52 AM, Min Chen <span dir="ltr"><<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"># HG changeset patch<br>
# User Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
# Date 1439424913 25200<br>
# Node ID caf9562dc947f93e8ee237574575e9b67d494fc8<br>
# Parent 09846d1566428a73d70d2fcf2d50324c0dfbbb7f<br>
asm: fix bug in macro vpbroadcastd for case ymm,xmm<br>
---<br>
source/common/x86/x86inc.asm | 6 ++++--<br>
1 files changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff -r 09846d156642 -r caf9562dc947 source/common/x86/x86inc.asm<br>
--- a/source/common/x86/x86inc.asm Wed Aug 12 16:46:57 2015 -0700<br>
+++ b/source/common/x86/x86inc.asm Wed Aug 12 17:15:13 2015 -0700<br>
@@ -1486,10 +1486,12 @@<br>
<br>
; workaround: vpbroadcastd with register, the yasm will generate wrong code<br>
%macro vpbroadcastd 2<br>
- %ifid %2<br>
+ %ifidni %2,xm ; case ymm,xmm<br>
+ vpbroadcastd %1, %2<br>
+ %elifid %2 ; case ymm,rN<br>
movd %1 %+ xmm, %2<br>
vpbroadcastd %1, %1 %+ xmm<br>
%else<br>
- vpbroadcastd %1, %2<br>
+ vpbroadcastd %1, %2 ; case ymm,[address]<br>
%endif<br>
%endmacro<br>
<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank" rel="noreferrer">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div>
</blockquote></div>