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 03/20] MIPS/GAS: Message capitalisation fixes (correction)


On Tue, 7 Dec 2010, Richard Sandiford wrote:

> > @@ -10005,7 +10005,7 @@ mips_ip (char *str, struct mips_cl_insn 
> >  		  && imm_expr.X_op == O_constant
> >  		  && (imm_expr.X_add_number < 0
> >  		      || imm_expr.X_add_number >= 0x10000))
> > -		as_bad (_("lui expression not in range 0..65535"));
> > +		as_bad (_("LUI expression not in range 0..65535"));
> >  	      s = expr_end;
> >  	      continue;
> 
> Things like this (picked just as an example, I realise there are others)
> introduce a different inconsistency: other messages give opcodes in
> lower case.

 Yes, I find that confusing as the mnemonics are not made prominent in the 
messages in any way.  In the case of such operations as AND or OR that may 
become particularly nasty (although I haven't checked if any such messages 
actually exist).  Of all the possibilities I found spelling out the 
mnemonics in the upper case the most natural and consistent with 
architecture manuals.  And the least questionable when at the beginning of 
a sentence.

> Patch is OK without the hunks that capitalise opcodes.  If you still
> want to do something about the messages that start with opcodes,
> please send that as a separate patch, rather than resending the
> whole thing.

 As much as you might wish to pull me into cleaning up the file, ;) I 
cannot commit to doing it now.  Maybe later.  We'll see.  This is what I 
have committed.  Thanks for the review.

2010-12-09  Maciej W. Rozycki  <macro@codesourcery.com>

	gas/
	* config/tc-mips.c (macro, mips_ip): Correct message
	capitalization.

	gas/testsuite/
	* gas/mips/at-2.l: Adjust according to message capitalization
	fixes.
	* gas/mips/illegal.l: Likewise.
	* gas/mips/jalr.l: Likewise.
	* gas/mips/octeon-ill.l: Likewise.
	* gas/mips/tls-ill.l: Likewise.

  Maciej

binutils-gas-mips-msgformat.diff
Index: binutils-fsf-trunk-quilt/gas/config/tc-mips.c
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/config/tc-mips.c	2010-12-09 02:34:51.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/config/tc-mips.c	2010-12-09 02:34:51.000000000 +0000
@@ -5592,7 +5592,7 @@ macro (struct mips_cl_insn *ip)
       if (offset_expr.X_op != O_symbol
 	  && offset_expr.X_op != O_constant)
 	{
-	  as_bad (_("expression too complex"));
+	  as_bad (_("Expression too complex"));
 	  offset_expr.X_op = O_constant;
 	}
 
@@ -5680,7 +5680,7 @@ macro (struct mips_cl_insn *ip)
 		  relax_switch ();
 		}
 	      if (!IS_SEXT_32BIT_NUM (offset_expr.X_add_number))
-		as_bad (_("offset too large"));
+		as_bad (_("Offset too large"));
 	      macro_build_lui (&offset_expr, tempreg);
 	      macro_build (&offset_expr, ADDRESS_ADDI_INSN, "t,r,j",
 			   tempreg, tempreg, BFD_RELOC_LO16);
@@ -6540,7 +6540,7 @@ macro (struct mips_cl_insn *ip)
 	  && NO_ISA_COP (mips_opts.arch)
 	  && (ip->insn_mo->pinfo2 & (INSN2_M_FP_S | INSN2_M_FP_D)) == 0)
 	{
-	  as_bad (_("opcode not supported on this processor: %s"),
+	  as_bad (_("Opcode not supported on this processor: %s"),
 		  mips_cpu_info_from_arch (mips_opts.arch)->name);
 	  break;
 	}
@@ -6563,7 +6563,7 @@ macro (struct mips_cl_insn *ip)
       if (offset_expr.X_op != O_constant
 	  && offset_expr.X_op != O_symbol)
 	{
-	  as_bad (_("expression too complex"));
+	  as_bad (_("Expression too complex"));
 	  offset_expr.X_op = O_constant;
 	}
 
@@ -7139,7 +7139,7 @@ macro (struct mips_cl_insn *ip)
       if (offset_expr.X_op != O_symbol
 	  && offset_expr.X_op != O_constant)
 	{
-	  as_bad (_("expression too complex"));
+	  as_bad (_("Expression too complex"));
 	  offset_expr.X_op = O_constant;
 	}
 
@@ -8010,7 +8010,7 @@ macro (struct mips_cl_insn *ip)
     ulh:
       used_at = 1;
       if (offset_expr.X_add_number >= 0x7fff)
-	as_bad (_("operand overflow"));
+	as_bad (_("Operand overflow"));
       if (!target_big_endian)
 	++offset_expr.X_add_number;
       macro_build (&offset_expr, s, "t,o(b)", AT, BFD_RELOC_LO16, breg);
@@ -8034,7 +8034,7 @@ macro (struct mips_cl_insn *ip)
       off = 3;
     ulw:
       if (offset_expr.X_add_number >= 0x8000 - off)
-	as_bad (_("operand overflow"));
+	as_bad (_("Operand overflow"));
       if (treg != breg)
 	tempreg = treg;
       else
@@ -8107,7 +8107,7 @@ macro (struct mips_cl_insn *ip)
     case M_USH:
       used_at = 1;
       if (offset_expr.X_add_number >= 0x7fff)
-	as_bad (_("operand overflow"));
+	as_bad (_("Operand overflow"));
       if (target_big_endian)
 	++offset_expr.X_add_number;
       macro_build (&offset_expr, "sb", "t,o(b)", treg, BFD_RELOC_LO16, breg);
@@ -8130,7 +8130,7 @@ macro (struct mips_cl_insn *ip)
       off = 3;
     usw:
       if (offset_expr.X_add_number >= 0x8000 - off)
-	as_bad (_("operand overflow"));
+	as_bad (_("Operand overflow"));
       if (!target_big_endian)
 	offset_expr.X_add_number += off;
       macro_build (&offset_expr, s, "t,o(b)", treg, BFD_RELOC_LO16, breg);
@@ -8692,7 +8692,7 @@ mips_ip (char *str, struct mips_cl_insn 
       /* If we did not find a '.', then we can quit now.  */
       if (*s != '.')
 	{
-	  insn_error = _("unrecognized opcode");
+	  insn_error = _("Unrecognized opcode");
 	  return;
 	}
 
@@ -8700,7 +8700,7 @@ mips_ip (char *str, struct mips_cl_insn 
       *s++ = '\0';
       if ((insn = (struct mips_opcode *) hash_find (op_hash, str)) == NULL)
 	{
-	  insn_error = _("unrecognized opcode");
+	  insn_error = _("Unrecognized opcode");
 	  return;
 	}
     }
@@ -9294,7 +9294,7 @@ mips_ip (char *str, struct mips_cl_insn 
 		  continue;
 
 		default:
-		  as_bad (_("Internal: bad mips opcode "
+		  as_bad (_("Internal error: bad mips opcode "
 			    "(unknown extension operand type `+%c'): %s %s"),
 			  *args, insn->name, insn->args);
 		  /* Further processing is fruitless.  */
@@ -9479,9 +9479,9 @@ mips_ip (char *str, struct mips_cl_insn 
 		  if (regno == AT && mips_opts.at)
 		    {
 		      if (mips_opts.at == ATREG)
-			as_warn (_("used $at without \".set noat\""));
+			as_warn (_("Used $at without \".set noat\""));
 		      else
-			as_warn (_("used $%u with \".set at=$%u\""),
+			as_warn (_("Used $%u with \".set at=$%u\""),
 				 regno, mips_opts.at);
 		    }
 		}
@@ -9508,13 +9508,13 @@ mips_ip (char *str, struct mips_cl_insn 
 		      if (regno == lastregno)
 			{
 			  insn_error
-			    = _("source and destination must be different");
+			    = _("Source and destination must be different");
 			  continue;
 			}
 		      if (regno == 31 && lastregno == 0xffffffff)
 			{
 			  insn_error
-			    = _("a destination register must be supplied");
+			    = _("A destination register must be supplied");
 			  continue;
 			}
 		    }
@@ -9967,7 +9967,7 @@ mips_ip (char *str, struct mips_cl_insn 
 			break;
 		      if (imm_expr.X_op == O_constant
 			  || imm_expr.X_op == O_big)
-			as_bad (_("expression out of range"));
+			as_bad (_("Expression out of range"));
 		    }
 		}
 	      s = expr_end;
@@ -10068,7 +10068,7 @@ mips_ip (char *str, struct mips_cl_insn 
 		c = 8; /* Invalid sel value.  */
 
 	      if (c > 7)
-		as_bad (_("invalid coprocessor sub-selection value (0-7)"));
+		as_bad (_("Invalid coprocessor sub-selection value (0-7)"));
 	      ip->insn_opcode |= c;
 	      continue;
 
@@ -10108,7 +10108,7 @@ mips_ip (char *str, struct mips_cl_insn 
 	      continue;
 
 	    default:
-	      as_bad (_("bad char = '%c'\n"), *args);
+	      as_bad (_("Bad char = '%c'\n"), *args);
 	      internalError ();
 	    }
 	  break;
@@ -10119,12 +10119,12 @@ mips_ip (char *str, struct mips_cl_insn 
 	{
 	  ++insn;
 	  s = argsStart;
-	  insn_error = _("illegal operands");
+	  insn_error = _("Illegal operands");
 	  continue;
 	}
       if (save_c)
 	*(--argsStart) = save_c;
-      insn_error = _("illegal operands");
+      insn_error = _("Illegal operands");
       return;
     }
 }
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/octeon-ill.l
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/octeon-ill.l	2010-12-09 02:34:46.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/octeon-ill.l	2010-12-09 02:34:51.000000000 +0000
@@ -15,25 +15,25 @@
 .*:27: Error: opcode not supported on this processor.*
 .*:28: Error: opcode not supported on this processor.*
 .*:29: Error: opcode not supported on this processor.*
-.*:30: Error: opcode not supported on this processor.*
-.*:31: Error: opcode not supported on this processor.*
+.*:30: Error: Opcode not supported on this processor.*
+.*:31: Error: Opcode not supported on this processor.*
 .*:32: Error: opcode not supported on this processor.*
 .*:33: Error: opcode not supported on this processor.*
 .*:34: Error: opcode not supported on this processor.*
 .*:35: Error: opcode not supported on this processor.*
-.*:36: Error: opcode not supported on this processor.*
-.*:37: Error: opcode not supported on this processor.*
+.*:36: Error: Opcode not supported on this processor.*
+.*:37: Error: Opcode not supported on this processor.*
 .*:39: Error: opcode not supported on this processor.*
-.*:40: Error: opcode not supported on this processor.*
-.*:41: Error: opcode not supported on this processor.*
-.*:42: Error: opcode not supported on this processor.*
-.*:43: Error: opcode not supported on this processor.*
-.*:45: Error: illegal operands `dmfc2 \$2,0x10000'
-.*:46: Error: illegal operands `dmtc2 \$2,0x12345'
-.*:47: Error: illegal operands `dmfc2 \$9,\$12'
-.*:48: Error: illegal operands `dmfc2 \$4,\$15,4'
-.*:49: Error: illegal operands `dmtc2 \$16,\$8'
-.*:50: Error: illegal operands `dmtc2 \$22,\$7,\$4'
+.*:40: Error: Opcode not supported on this processor.*
+.*:41: Error: Opcode not supported on this processor.*
+.*:42: Error: Opcode not supported on this processor.*
+.*:43: Error: Opcode not supported on this processor.*
+.*:45: Error: Illegal operands `dmfc2 \$2,0x10000'
+.*:46: Error: Illegal operands `dmtc2 \$2,0x12345'
+.*:47: Error: Illegal operands `dmfc2 \$9,\$12'
+.*:48: Error: Illegal operands `dmfc2 \$4,\$15,4'
+.*:49: Error: Illegal operands `dmtc2 \$16,\$8'
+.*:50: Error: Illegal operands `dmtc2 \$22,\$7,\$4'
 .*:52: Error: Improper size \(32\)
 .*:54: Error: Improper position \(32\)
 .*:55: Error: Improper size \(29\)
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/at-2.l
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/at-2.l	2010-12-09 02:34:46.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/at-2.l	2010-12-09 02:34:51.000000000 +0000
@@ -2,12 +2,12 @@
 .*\.s:4: Error: Macro used \$at after ".set noat"
 .*\.s:5: Error: Macro used \$at after ".set noat"
 .*\.s:6: Error: Macro used \$at after ".set noat"
-.*\.s:8: Warning: used \$at without ".set noat"
-.*\.s:8: Warning: used \$at without ".set noat"
-.*\.s:8: Warning: used \$at without ".set noat"
-.*\.s:13: Warning: used \$26 with ".set at=\$26"
-.*\.s:13: Warning: used \$26 with ".set at=\$26"
-.*\.s:13: Warning: used \$26 with ".set at=\$26"
-.*\.s:18: Warning: used \$27 with ".set at=\$27"
-.*\.s:18: Warning: used \$27 with ".set at=\$27"
-.*\.s:18: Warning: used \$27 with ".set at=\$27"
+.*\.s:8: Warning: Used \$at without ".set noat"
+.*\.s:8: Warning: Used \$at without ".set noat"
+.*\.s:8: Warning: Used \$at without ".set noat"
+.*\.s:13: Warning: Used \$26 with ".set at=\$26"
+.*\.s:13: Warning: Used \$26 with ".set at=\$26"
+.*\.s:13: Warning: Used \$26 with ".set at=\$26"
+.*\.s:18: Warning: Used \$27 with ".set at=\$27"
+.*\.s:18: Warning: Used \$27 with ".set at=\$27"
+.*\.s:18: Warning: Used \$27 with ".set at=\$27"
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/jalr.l
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/jalr.l	2010-12-09 02:34:46.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/jalr.l	2010-12-09 02:34:51.000000000 +0000
@@ -1,8 +1,7 @@
 .*: Assembler messages:
-.*:1: Error: illegal operands.*
-.*:2: Error: a destination register must be supplied.*
-.*:3: Error: source and destination must be different.*
-.*:10: Error: illegal operands.*
-.*:11: Error: a destination register must be supplied.*
-.*:12: Error: source and destination must be different.*
-
+.*:1: Error: Illegal operands.*
+.*:2: Error: A destination register must be supplied.*
+.*:3: Error: Source and destination must be different.*
+.*:10: Error: Illegal operands.*
+.*:11: Error: A destination register must be supplied.*
+.*:12: Error: Source and destination must be different.*
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/illegal.l
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/illegal.l	2010-12-09 02:34:46.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/illegal.l	2010-12-09 02:34:51.000000000 +0000
@@ -1,3 +1,3 @@
 .*: Assembler messages:
-.*:4: Error: illegal operands `move 1,2'
-.*:5: Error: illegal operands `c.eq.s 1,2'
+.*:4: Error: Illegal operands `move 1,2'
+.*:5: Error: Illegal operands `c.eq.s 1,2'
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/tls-ill.l
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/tls-ill.l	2010-12-09 02:34:46.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/tls-ill.l	2010-12-09 02:34:51.000000000 +0000
@@ -1,11 +1,11 @@
 .*: Assembler messages:
 .*:6: Error: bad expression
-.*:6: Error: illegal operands `addiu \$4,\$28,%dtprel\(tlsvar\)'
+.*:6: Error: Illegal operands `addiu \$4,\$28,%dtprel\(tlsvar\)'
 .*:7: Error: bad expression
-.*:7: Error: illegal operands `addiu \$4,\$28,%tprel\(tlsvar\)'
+.*:7: Error: Illegal operands `addiu \$4,\$28,%tprel\(tlsvar\)'
 .*:8: Error: bad expression
 .*:8: Error: missing '\)'
-.*:8: Error: illegal operands `addiu \$4,\$28,%lo\(%gottprel\(tlsvar\)\)'
+.*:8: Error: Illegal operands `addiu \$4,\$28,%lo\(%gottprel\(tlsvar\)\)'
 .*:9: Error: bad expression
 .*:9: Error: missing '\)'
-.*:9: Error: illegal operands `addiu \$4,\$28,%hi\(%gottprel\(tlsvar\)\)'
\ No newline at end of file
+.*:9: Error: Illegal operands `addiu \$4,\$28,%hi\(%gottprel\(tlsvar\)\)'


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