public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] x86: adjust diagnostic for bad 4-bit immediates
@ 2012-07-24 15:30 Jan Beulich
  2012-07-30 17:05 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2012-07-24 15:30 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 763 bytes --]

The current error message for bad imm4 operands wasn't really helpful,
and was pointing at the wrong operand in Intel mode. Since non-constant
operands are being taken care of by other means anyway, adjust it to
simply state that the constant doesn't fit.

2012-07-24  Jan Beulich <jbeulich@suse.com>

	* config/tc-i386-intel.c (match_template): Adjust error message
	for 'bad_imm4' case.

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4347,7 +4347,7 @@ check_reverse:
 	  err_msg = _("invalid instruction suffix");
 	  break;
 	case bad_imm4:
-	  err_msg = _("Imm4 isn't the first operand");
+	  err_msg = _("Constant doesn't fit in 4 bits");
 	  break;
 	case old_gcc_only:
 	  err_msg = _("only supported with old gcc");




[-- Attachment #2: binutils-mainline-x86-bad-imm4.patch --]
[-- Type: text/plain, Size: 757 bytes --]

The current error message for bad imm4 operands wasn't really helpful,
and was pointing at the wrong operand in Intel mode. Since non-constant
operands are being taken care of by other means anyway, adjust it to
simply state that the constant doesn't fit.

2012-07-24  Jan Beulich <jbeulich@suse.com>

	* config/tc-i386-intel.c (match_template): Adjust error message
	for 'bad_imm4' case.

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4347,7 +4347,7 @@ check_reverse:
 	  err_msg = _("invalid instruction suffix");
 	  break;
 	case bad_imm4:
-	  err_msg = _("Imm4 isn't the first operand");
+	  err_msg = _("Constant doesn't fit in 4 bits");
 	  break;
 	case old_gcc_only:
 	  err_msg = _("only supported with old gcc");

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

* Re: [PATCH] x86: adjust diagnostic for bad 4-bit immediates
  2012-07-24 15:30 [PATCH] x86: adjust diagnostic for bad 4-bit immediates Jan Beulich
@ 2012-07-30 17:05 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2012-07-30 17:05 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils

On Tue, Jul 24, 2012 at 8:30 AM, Jan Beulich <JBeulich@suse.com> wrote:
> The current error message for bad imm4 operands wasn't really helpful,
> and was pointing at the wrong operand in Intel mode. Since non-constant
> operands are being taken care of by other means anyway, adjust it to
> simply state that the constant doesn't fit.
>
> 2012-07-24  Jan Beulich <jbeulich@suse.com>
>
>         * config/tc-i386-intel.c (match_template): Adjust error message
>         for 'bad_imm4' case.
>
> --- a/gas/config/tc-i386.c
> +++ b/gas/config/tc-i386.c
> @@ -4347,7 +4347,7 @@ check_reverse:
>           err_msg = _("invalid instruction suffix");
>           break;
>         case bad_imm4:
> -         err_msg = _("Imm4 isn't the first operand");
> +         err_msg = _("Constant doesn't fit in 4 bits");
>           break;
>         case old_gcc_only:
>           err_msg = _("only supported with old gcc");
>

Error message starts with the lower case.  OK with
that change.

-- 
H.J.

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

end of thread, other threads:[~2012-07-30 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-24 15:30 [PATCH] x86: adjust diagnostic for bad 4-bit immediates Jan Beulich
2012-07-30 17:05 ` 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).