From: "Cui, Lili" <lili.cui@intel.com>
To: "Beulich, Jan" <JBeulich@suse.com>
Cc: "Lu, Hongjiu" <hongjiu.lu@intel.com>,
"ccoutant@gmail.com" <ccoutant@gmail.com>,
"binutils@sourceware.org" <binutils@sourceware.org>
Subject: RE: [PATCH] Support APX PUSHP/POPP
Date: Wed, 29 Nov 2023 13:02:42 +0000 [thread overview]
Message-ID: <SJ0PR11MB56004DC8E300D64DC75127A29E83A@SJ0PR11MB5600.namprd11.prod.outlook.com> (raw)
In-Reply-To: <3482ec71-fb14-43a0-b132-776439f1f282@suse.com>
> On 29.11.2023 11:38, Cui, Lili wrote:
> >>>>>>> --- a/gas/config/tc-i386.c
> >>>>>>> +++ b/gas/config/tc-i386.c
> >>>>>>> @@ -8715,6 +8715,13 @@ process_operands (void)
> >>>>>>> i.tm.operands++;
> >>>>>>> }
> >>>>>>>
> >>>>>>> + /* PUSHP/POPP requires rex2.w == 1. */ if (i.tm.mnem_off ==
> >>>>>>> + MN_pushp || i.tm.mnem_off == MN_popp)
> >>>>>>> + {
> >>>>>>> + i.rex2_encoding = true;
> >>>>>>> + i.rex |= REX_W;
> >>>>>>> + }
> >>>>>>
> >>>>>> Well, I'm sorry for not considering JMPABS earlier on, but with
> >>>>>> that also needing dealing with, I think I view my alternative
> >>>>>> suggestion as
> >>>> preferable.
> >>>>>> That'll scale better when also considering that down the road
> >>>>>> further such insns may appear. Whether it's actually
> >>>>>> OperandConstraint that we leverage here is secondary (it's not
> >>>>>> ideal because there's nothing
> >>>> operand related here).
> >>>>>> I'd be perfectly okay with some other attribute being suitably
> >>>>>> overloaded, whereas I continue to think that introducing new
> >>>>>> attributes should preferably be limited to either cases where
> >>>>>> more than just two or three templates use them or cases where
> >>>>>> otherwise it's impossible to avoid ambiguities. From earlier
> >>>>>> changes of mine the underlying reason ought to be pretty clear:
> >>>>>> Each new attribute consumes storage, and with thousands of
> >>>>>> templates growth of storage requirements should be balanced with
> >>>>>> how frequently an attribute is actually going to have a non-zero
> >>>>>> value. For example, with
> >>>>>> is_evex_encoding() gone a brief inspection suggests that it might
> >>>>>> be possible to overload Masking (or maybe Broadcast): They're
> >>>>>> applicable to EVEX templates only, and the class of insns we're
> >>>>>> discussing here is never going to be EVEX (or VEX). IOW not much
> >>>>>> different from the overloading of StaticRounding. Such an
> >>>>>> overload may then well be named Rex2 (as you had it, and
> >>>>>> considering its intended use also for
> >>>> JMPABS, plus taking into consideration that REX2.W will be set
> >>>> simply because of the absence of NoRex64).
> >>>>>>
> >>>>>
> >>>>> Haha, StaticRounding is really special, I tried "#define Rex2Req
> >>>>> Masking" and
> >>>> found that it will be used in i386-gen.c to identify EVEX
> >>>> (Broadcast...), then I tried VexW and SIB found that they are all
> >>>> used without precheck whether it was an vex instruction. Finally I
> >>>> wanted to re-use StaticRounding and found out that hulin already
> >>>> uses it
> >> for legacy insns.
> >>>>
> >>>> Hmm, I'm sorry for the trouble. I'm inclined to say
> >>>> OperandConstraint with a new #define it is then.
>
> Did you miss this before ...
>
> >>>> Once everything's in I could then
> >>>> still see whether I can
> >>>> (reasonably) make e.g. Masking work here.
> >>>>
> >>>
> >>> Then I will create a new attribute Rex2 for it.
>
> ... saying this and ...
>
> >> ???
> >>
> >
> > I can't use "#define Rex2Req Masking" instead of creating a new bitfile for
> Rex2Req, then I have to create a new bitfile for Rex2Req , or you want to use
> i.tm.mnem_off to handle it? both are ok to me.
>
> ... this? IOW something along the lines of
>
> #define Rex2 OperandConstraint=REX2
>
> (REX2 may be too short a name for the necessary new #define).
>
> And as indicated I'd subsequently see about reusing Masking (or some other
> of the EVEX-only attributes) anyway.
>
Oh, I didn't understand OperandConstraint correctly. REX2 conflict with "pseudopfx: rex2:REX2:APX_F", I changed it to REX2_PREFIX( or, REX_REQ ?).
#define Rex2 OperandConstraint=REX2_PREFIX
Thanks,
Lili.
next prev parent reply other threads:[~2023-11-29 13:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 12:31 Cui, Lili
2023-11-27 12:56 ` Jan Beulich
2023-11-27 13:45 ` Cui, Lili
2023-11-27 14:06 ` Jan Beulich
2023-11-28 2:32 ` Cui, Lili
2023-11-28 8:34 ` Jan Beulich
2023-11-28 13:14 ` Cui, Lili
2023-11-28 13:54 ` Jan Beulich
2023-11-29 3:08 ` Cui, Lili
2023-11-29 8:29 ` Jan Beulich
2023-11-29 10:38 ` Cui, Lili
2023-11-29 11:01 ` Jan Beulich
2023-11-29 13:02 ` Cui, Lili [this message]
2023-11-30 9:02 ` Jan Beulich
2023-11-30 11:19 ` Cui, Lili
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR11MB56004DC8E300D64DC75127A29E83A@SJ0PR11MB5600.namprd11.prod.outlook.com \
--to=lili.cui@intel.com \
--cc=JBeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=ccoutant@gmail.com \
--cc=hongjiu.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).