From: Jan Beulich <jbeulich@suse.com>
To: "Cui, Lili" <lili.cui@intel.com>
Cc: "Lu, Hongjiu" <hongjiu.lu@intel.com>,
"binutils@sourceware.org" <binutils@sourceware.org>
Subject: Re: [PATCH] Clean reg class and base_reg for input output operand (%dx).
Date: Thu, 7 Dec 2023 09:51:27 +0100 [thread overview]
Message-ID: <a9580366-f3a5-43da-a459-33f57d8da22f@suse.com> (raw)
In-Reply-To: <SJ0PR11MB5600B453D3B8F42D413B31BD9E8BA@SJ0PR11MB5600.namprd11.prod.outlook.com>
On 07.12.2023 09:48, Cui, Lili wrote:
>> On 06.12.2023 14:12, Cui, Lili wrote:
>>> --- a/gas/config/tc-i386.c
>>> +++ b/gas/config/tc-i386.c
>>> @@ -13016,6 +13016,8 @@ i386_att_operand (char *operand_string)
>>> && !operand_type_check (i.types[this_operand], disp))
>>> {
>>> i.types[this_operand] = i.base_reg->reg_type;
>>> + i.types[this_operand].bitfield.class = 0;
>>> + i.base_reg = NULL;
>>
>> I agree with the latter, but I don't understand the former. The more that in
>> earlier discussion on the APX subthread I clearly indicated what I think needs
>> doing here.
>>
>
> The original issue was that we encountered a segment fault when accessing i.op[op].regs->reg_flags, and since the input was (%dx), we treat it as memory, so I think we need to clean up i.types[this_operand]. bitfield.class = 0 and leave i.base_reg there, it means i.base_reg does not need to be cleaned.
As said before - what is missing as far as I understand it is the updating
of i.op[].regs in the code above. That ought to be (much) preferred over
invalidating .class (and thus perhaps causing new latent issues).
Jan
next prev parent reply other threads:[~2023-12-07 8:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 13:12 Cui, Lili
2023-12-07 7:11 ` Jan Beulich
2023-12-07 8:48 ` Cui, Lili
2023-12-07 8:51 ` Jan Beulich [this message]
2023-12-12 7:51 ` Cui, Lili
2023-12-12 8:15 ` Jan Beulich
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=a9580366-f3a5-43da-a459-33f57d8da22f@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=hongjiu.lu@intel.com \
--cc=lili.cui@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).