ref: 8ec5ff0eff128de60613f128a397292665c0d717
parent: 47daa4df3387c1529536243db80b81f3878cbf76
author: Henrik Gramner <gramner@twoorioles.com>
date: Mon Jun 8 20:38:10 EDT 2020
x86inc: Add template defines for EVEX broadcasts Broadcasting a memory operand is binary flag, you either broadcast or you don't, and there's only a single possible element size for any given instruction. The instruction syntax however requires the broadcast semanticts to be explicitly defined, which is an issue when using macros to template code for multiple register widhts. Add some helper defines to alleviate the issue.
--- a/src/ext/x86/x86inc.asm
+++ b/src/ext/x86/x86inc.asm
@@ -1,7 +1,7 @@
;*****************************************************************************
;* x86inc.asm: x264asm abstraction layer
;*****************************************************************************
-;* Copyright (C) 2005-2019 x264 project
+;* Copyright (C) 2005-2020 x264 project
;*
;* Authors: Loren Merritt <lorenm@u.washington.edu>
;* Henrik Gramner <henrik@gramner.com>
@@ -991,6 +991,8 @@
%if WIN64
AVX512_MM_PERMUTATION 6 ; Swap callee-saved registers with volatile registers
%endif
+ %xdefine bcstd 1to4
+ %xdefine bcstq 1to2
%endmacro
%macro INIT_YMM 0-1+
@@ -1004,6 +1006,8 @@
INIT_CPUFLAGS %1
DEFINE_MMREGS ymm
AVX512_MM_PERMUTATION
+ %xdefine bcstd 1to8
+ %xdefine bcstq 1to4
%endmacro
%macro INIT_ZMM 0-1+
@@ -1017,6 +1021,8 @@
INIT_CPUFLAGS %1
DEFINE_MMREGS zmm
AVX512_MM_PERMUTATION
+ %xdefine bcstd 1to16
+ %xdefine bcstq 1to8
%endmacro
INIT_XMM