[PATCH] x86: add missing APX logic to cpu_flags_match()

Cui, Lili lili.cui@intel.com
Wed Jan 10 01:44:36 GMT 2024


> 
> On 09.01.2024 12:00, Cui, Lili wrote:
> >> Subject: Re: [PATCH] x86: add missing APX logic to cpu_flags_match()
> >>
> >> On 09.01.2024 06:36, Cui, Lili wrote:
> >>> By the way, I have a question about " t->cpu_any", is it specific to
> >>> dual
> >> VEX/EVEX templates?
> >>
> >> No. And I think it's used elsewhere already - see e.g. SFENCE.
> >>
> > Oh, I get it. "any" means that any cpuid supports this instruction. It should
> be cleared for APX (Daul VEX/EVEX). IOW, "any" doesn't work with
> "cpuid&(cpuid|APX_F)".
> 
> Well, in a way it does, as outlined in a comment: <cpuid>&(APX_F)
> (all.<cpuid>=true, any.apx_f=true, all other bits of any clear) simply is the same
> as <cpuid>&APX_F (all.<cpuid>=true + all.apx_f=true). The crucial part here is
> that "any" may not have any other bits set then (after the purging of the one
> <cpuid> one).
> And it was only while making the change that I noticed that doing things the
> way the patch is now doing them is overall more neat (with the same
> functional effect). As mentioned, we may still want to consider to simplify (or
> even purge) APX_F() as a result.
> 

Yes, agree.

Thanks,
Lili.


More information about the Binutils mailing list