[PATCH 03/20] MIPS/GAS: Message capitalisation fixes (correction)

Maciej W. Rozycki macro@codesourcery.com
Fri Dec 3 13:20:00 GMT 2010


Hi,

 [Sent with the correct patch now, thanks!]

 Here is an extensive, though not exhaustive change to macro() and 
mips_ip() to correct capitalisation missing from some messages.  The GAS 
test suite is adjusted accordingly.

2010-12-03  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.

 OK to apply?

  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-01 21:05:49.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/config/tc-mips.c	2010-12-01 21:05:49.000000000 +0000
@@ -5556,10 +5556,10 @@ macro (struct mips_cl_insn *ip)
 	 zero, we then add a base register to it.  */
 
       if (dbl && HAVE_32BIT_GPRS)
-	as_warn (_("dla used to load 32-bit register"));
+	as_warn (_("DLA used to load 32-bit register"));
 
       if (!dbl && HAVE_64BIT_OBJECTS)
-	as_warn (_("la used to load 64-bit address"));
+	as_warn (_("LA used to load 64-bit address"));
 
       if (offset_expr.X_op == O_constant
 	  && offset_expr.X_add_number >= -0x8000
@@ -5583,7 +5583,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;
 	}
 
@@ -5671,7 +5671,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);
@@ -6531,7 +6531,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;
 	}
@@ -6554,7 +6554,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;
 	}
 
@@ -7130,7 +7130,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;
 	}
 
@@ -8001,7 +8001,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);
@@ -8025,7 +8025,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
@@ -8098,7 +8098,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);
@@ -8121,7 +8121,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);
@@ -8683,7 +8683,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;
 	}
 
@@ -8691,7 +8691,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;
 	}
     }
@@ -9285,7 +9285,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.  */
@@ -9470,9 +9470,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);
 		    }
 		}
@@ -9499,13 +9499,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;
 			}
 		    }
@@ -9958,7 +9958,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;
@@ -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;
 
@@ -10059,7 +10059,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;
 
@@ -10099,7 +10099,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;
@@ -10110,12 +10110,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-01 21:05:40.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/octeon-ill.l	2010-12-01 21:05:49.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-01 21:05:40.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/at-2.l	2010-12-01 21:05:49.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-01 21:05:40.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/jalr.l	2010-12-01 21:05:49.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-01 21:05:40.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/illegal.l	2010-12-01 21:05:49.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-01 21:05:40.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/tls-ill.l	2010-12-01 21:05:49.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\)\)'



More information about the Binutils mailing list