This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH RESEND] x86: allow VEX et al encodings in 16-bit (protected) mode


On Tue, Jun 25, 2019 at 12:20 AM Jan Beulich <JBeulich@suse.com> wrote:
>
> >>> On 24.06.19 at 18:30, <hjl.tools@gmail.com> wrote:
> > On Mon, Jun 24, 2019 at 7:05 AM Jan Beulich <JBeulich@suse.com> wrote:
> >> --- a/gas/config/tc-i386.c
> >> +++ b/gas/config/tc-i386.c
> >> @@ -4387,9 +4387,9 @@ md_assemble (char *line)
> >>
> >>    if (is_any_vex_encoding (&i.tm))
> >>      {
> >> -      if (flag_code == CODE_16BIT)
> >> +      if (!cpu_arch_flags.bitfield.cpui286)
> >>         {
> >> -         as_bad (_("instruction `%s' isn't supported in 16-bit mode."),
> >> +         as_bad (_("instruction `%s' isn't supported outside of protected mode."),
> >>                   i.tm.name);
> >>           return;
> >>         }
> >
> > flag_code == CODE_16BIT is used to indicate 16-bit mode, in most cases, for real
> > mode.   If there are real use cases for VEX/EVEX insns in 16-bit protected mode,
> > should we add a directive or pseudo prefix to indicate protected mode encoding?
>
> Not sure - I'd leave that to you. All I want/need is to be able encode
> VEX/XOP/EVEX insns for 16-bit protected mode use. How about we go
> with this patch for now, and you further refine things to your liking
> subsequently?
>

Up to now, flag_code == CODE_16BIT disallows VEX/EVEX encoding.  I
think VEX/EVEX encoding should be allowed only under a new directive.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]