[PATCH v2] x86: Remove the restriction for size of the mask register in AVX10
Jan Beulich
jbeulich@suse.com
Mon Dec 18 08:55:53 GMT 2023
On 18.12.2023 04:26, Haochen Jiang wrote:
> This is the v2 patch to remove the restiction for the size of the mask register
> in AVX10.
>
> Changes in v2: Remove attribute Vsz in opcode_modifier since it is no longer
> used. But I suppose we still need a similar enum in gas to check encoding is
> right.
Indeed. Change is almost okay in this shape:
> --- a/gas/config/tc-i386.c
> +++ b/gas/config/tc-i386.c
> @@ -823,6 +823,11 @@ static unsigned int sse2avx;
> static unsigned int use_unaligned_vector_move;
>
> /* Maximum permitted vector size. */
> +static enum {
> + VSZ128 = 0,
> + VSZ256,
> + VSZ512,
> +} Vsz;
Looks like this static variable is unused?
> #define VSZ_DEFAULT VSZ512
> static unsigned int vector_size = VSZ_DEFAULT;
And this variable would then better be of the new enum type? Albeit ...
> @@ -6967,12 +6972,10 @@ VEX_check_encoding (const insn_template *t)
>
> /* Vector size restrictions. */
> if ((vector_size < VSZ512
> - && (t->opcode_modifier.evex == EVEX512
> - || t->opcode_modifier.vsz >= VSZ512))
> + && t->opcode_modifier.evex == EVEX512)
> || (vector_size < VSZ256
> && (t->opcode_modifier.evex == EVEX256
> - || t->opcode_modifier.vex == VEX256
> - || t->opcode_modifier.vsz >= VSZ256)))
> + || t->opcode_modifier.vex == VEX256)))
> {
... the use of < here makes me wonder whether an enum is really the
best thing to use. Maybe better to stick to #define-s?
Jan
More information about the Binutils
mailing list