[PATCH] x86: fix EVEX no-broadcast disassembly when W=1

Jan Beulich jbeulich@suse.com
Mon Sep 7 11:57:10 GMT 2026


On 07.09.2026 12:52, Shenoy, Rohan Radhesh wrote:
>> Additionally for the VMOVDQU64 form you add to the testcase, a broader criteria
>> should apply: Broadcast is never valid when the memory operand is the
>> destination. That would then cover the store form of e.g.
>> VMOVDQU8 as well. As the existing comment says so, there must be something
>> wrong with the condition used. And indeed ins->obufp may point somewhere into
>> ins->op_out[0], but never at its start.
> 
> So do we move this condition out and to the start of the function when we know ins->obufp points to the start of op_out?
> 
> /* Handles EVEX other than APX EVEX-promoted instructions.  */
> if (ins->vex.evex && ins->evex_type == evex_default)
>   {
>         /* Broadcast can only ever be valid for memory sources.  */
>         if (ins->vex.b && ins->evex_type == evex_default
>             && ins->obufp == ins->op_out[0])
>                 ins->vex.no_broadcast = true;
> 
>         /* Zeroing-masking is invalid for memory destinations. Set the flag
>         uniformly, as the consumer will inspect it only for the destination
>         operand.  */
>         if (ins->vex.zeroing)
>                 ins->illegal_masking = true;
> 
> ...like here?

Yes, looks like this may be a good move. Without the then redundant part of
the condition, of course.

Jan


More information about the Binutils mailing list