public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* x86: correct operand type checks
@ 2017-12-14  8:43 Jan Beulich
  2017-12-14 12:12 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2017-12-14  8:43 UTC (permalink / raw)
  To: binutils; +Cc: H.J. Lu

Again these look to be typos: No template currently allows for any two
(or all three) of RegXMM, RegYMM, and RegZMM in a single operand. Quite
clearly ! are missing, after the addition of which the checks for the
first and (if present) second operands also fully match up.

gas/
2017-12-14  Jan Beulich  <jbeulich@suse.com>

	* config/tc-i386.c (match_template): Add missing ! to
	reg{x,y,z}mm checks in q- and l-suffix handling.

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4968,9 +4968,9 @@ match_template (char mnem_suffix)
 	       && !operand_types[0].bitfield.regymm
 	       && !operand_types[0].bitfield.regzmm)
 	      || (!operand_types[t->operands > 1].bitfield.regmmx
-		  && operand_types[t->operands > 1].bitfield.regxmm
-		  && operand_types[t->operands > 1].bitfield.regymm
-		  && operand_types[t->operands > 1].bitfield.regzmm))
+		  && !operand_types[t->operands > 1].bitfield.regxmm
+		  && !operand_types[t->operands > 1].bitfield.regymm
+		  && !operand_types[t->operands > 1].bitfield.regzmm))
 	  && (t->base_opcode != 0x0fc7
 	      || t->extension_opcode != 1 /* cmpxchg8b */))
 	continue;
@@ -4985,7 +4985,7 @@ match_template (char mnem_suffix)
 	       && ((!operand_types[0].bitfield.regmmx
 		    && !operand_types[0].bitfield.regxmm)
 		   || (!operand_types[t->operands > 1].bitfield.regmmx
-		       && operand_types[t->operands > 1].bitfield.regxmm)))
+		       && !operand_types[t->operands > 1].bitfield.regxmm)))
 	continue;
 
       /* Do not verify operands when there are none.  */



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: x86: correct operand type checks
  2017-12-14  8:43 x86: correct operand type checks Jan Beulich
@ 2017-12-14 12:12 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2017-12-14 12:12 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Binutils

On Thu, Dec 14, 2017 at 12:43 AM, Jan Beulich <JBeulich@suse.com> wrote:
> Again these look to be typos: No template currently allows for any two
> (or all three) of RegXMM, RegYMM, and RegZMM in a single operand. Quite
> clearly ! are missing, after the addition of which the checks for the
> first and (if present) second operands also fully match up.
>
> gas/
> 2017-12-14  Jan Beulich  <jbeulich@suse.com>
>
>         * config/tc-i386.c (match_template): Add missing ! to
>         reg{x,y,z}mm checks in q- and l-suffix handling.
>
> --- a/gas/config/tc-i386.c
> +++ b/gas/config/tc-i386.c
> @@ -4968,9 +4968,9 @@ match_template (char mnem_suffix)
>                && !operand_types[0].bitfield.regymm
>                && !operand_types[0].bitfield.regzmm)
>               || (!operand_types[t->operands > 1].bitfield.regmmx
> -                 && operand_types[t->operands > 1].bitfield.regxmm
> -                 && operand_types[t->operands > 1].bitfield.regymm
> -                 && operand_types[t->operands > 1].bitfield.regzmm))
> +                 && !operand_types[t->operands > 1].bitfield.regxmm
> +                 && !operand_types[t->operands > 1].bitfield.regymm
> +                 && !operand_types[t->operands > 1].bitfield.regzmm))
>           && (t->base_opcode != 0x0fc7
>               || t->extension_opcode != 1 /* cmpxchg8b */))
>         continue;
> @@ -4985,7 +4985,7 @@ match_template (char mnem_suffix)
>                && ((!operand_types[0].bitfield.regmmx
>                     && !operand_types[0].bitfield.regxmm)
>                    || (!operand_types[t->operands > 1].bitfield.regmmx
> -                      && operand_types[t->operands > 1].bitfield.regxmm)))
> +                      && !operand_types[t->operands > 1].bitfield.regxmm)))
>         continue;
>
>        /* Do not verify operands when there are none.  */
>
>
>

OK.

Thanks.

-- 
H.J.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-14 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14  8:43 x86: correct operand type checks Jan Beulich
2017-12-14 12:12 ` H.J. Lu

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).