[PATCH 3/7] x86: move / quiesce pre-386 non-16-bit warning

Jan Beulich jbeulich@suse.com
Fri Aug 19 06:13:27 GMT 2022

On 18.08.2022 17:30, H.J. Lu wrote:
> On Thu, Aug 18, 2022 at 12:21 AM Jan Beulich <jbeulich@suse.com> wrote:
>> On 17.08.2022 21:21, H.J. Lu wrote:
>>> On Tue, Aug 16, 2022 at 12:31 AM Jan Beulich <jbeulich@suse.com> wrote:
>>>> Emitting this warning for every insn, including ones having actual
>>>> errors, is annoying. Introduce a boolean variable to emit the warning
>>>> just once on the first insn after .arch may have changed the things, and
>>>> move the warning to output_insn(). (I didn't want to go as far as
>>>> checking whether the .arch actually turned off the i386 bit, but doing
>>>> so would be an option.)
>>>> ---
>>>> Otoh I wonder whether switching to a pre-386 architecture shouldn't
>>>> automatically move to CODE_16BIT: Us emitting operand- or address-size
>>>> prefixes violates the architecture specification. Alternatively we
>>>> could outright reject such .arch directives when not already in 16-bit
>>>> mode.
>> Mind me asking - no opinion here?
> We shouldn't change the current behavior to avoid any surprises.

And continue to emit non-working code. Recall that the warning message
talks of only "addressing mode", which even I initially took to mean
what it say, and hence being entirely bogus to emit for insns without
memory operand (or anything else susceptible to address size setting).

I did actually try to find better wording for the warning, but
couldn't come up with anything halfway sensible and not overly long.


More information about the Binutils mailing list