[x265] [PATCH 3 of 4] asm: fix bug in macro vpbroadcastd for case ymm, xmm
Dnyaneshwar Gorade
dnyaneshwar at multicorewareinc.com
Thu Aug 13 13:22:30 CEST 2015
Hi Min,
This still generates wrong code for case ymm, xmm (as %ifidni %2,xm will be
false always).
How about the below code ?
%macro vpbroadcastd 2-3 ;; incresed one argument for case ymm, xmm
%ifid %3 ; case vpbroadcastd ymm, ymm, xmm
vpbroadcastd %1, %3
%elifid %2
movd %1 %+ xmm, %2 ; case vpbroadcastd ymm, rN
vpbroadcastd %1, %1 %+ xmm
%else
vpbroadcastd %1, %2 ; case vpbroadcastd ymm, [memory addr]
%endif
%endmacro
Thanks,
Dnyaneshwar G
On Thu, Aug 13, 2015 at 8:52 AM, Min Chen <chenm003 at 163.com> wrote:
> # HG changeset patch
> # User Min Chen <chenm003 at 163.com>
> # Date 1439424913 25200
> # Node ID caf9562dc947f93e8ee237574575e9b67d494fc8
> # Parent 09846d1566428a73d70d2fcf2d50324c0dfbbb7f
> asm: fix bug in macro vpbroadcastd for case ymm,xmm
> ---
> source/common/x86/x86inc.asm | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff -r 09846d156642 -r caf9562dc947 source/common/x86/x86inc.asm
> --- a/source/common/x86/x86inc.asm Wed Aug 12 16:46:57 2015 -0700
> +++ b/source/common/x86/x86inc.asm Wed Aug 12 17:15:13 2015 -0700
> @@ -1486,10 +1486,12 @@
>
> ; workaround: vpbroadcastd with register, the yasm will generate wrong
> code
> %macro vpbroadcastd 2
> - %ifid %2
> + %ifidni %2,xm ; case ymm,xmm
> + vpbroadcastd %1, %2
> + %elifid %2 ; case ymm,rN
> movd %1 %+ xmm, %2
> vpbroadcastd %1, %1 %+ xmm
> %else
> - vpbroadcastd %1, %2
> + vpbroadcastd %1, %2 ; case ymm,[address]
> %endif
> %endmacro
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150813/da0fa314/attachment-0001.html>
More information about the x265-devel
mailing list