summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorPhilipp Thomas <pthomas@suse.de>2002-02-17 14:23:53 +0000
committerPhilipp Thomas <pthomas@gcc.gnu.org>2002-02-17 14:23:53 +0000
commita52453cc4295af6f62d1e59faac80056c426a400 (patch)
tree03fe05fc78e4acec8f41d3b93c5865ae3c456739 /gcc/config
parent1c11abc46fe2ef296d8726ee1e0c98359de6f961 (diff)
downloadgcc-a52453cc4295af6f62d1e59faac80056c426a400.tar.gz
final.c (output_operand_lossage): Changed to accept printf style arguments.
2002-02-17 Philipp Thomas <pthomas@suse.de> * final.c (output_operand_lossage): Changed to accept printf style arguments. Change calls where necessary. * output.h (output_operand_lossage): Change declaration accordingly. Update copyright. * config/arc/arc.c config/fr30/fr30.c config/m32r/m32r.c config/m88k/m88k.c : Adapt all calls to output_operand_lossage. Update copyright date where necessary. * config/i386/i386.c (print_operand): Likewise. Remove use of sprintf. * config/cris/cris.c (cris_operand_lossage): Likewise. Rename parameter so that exgettext recognizes it as translatable message. (LOSE_AND_RETURN): Rename parameter to msgid. * po/gcc.pot: Regenerate. From-SVN: r49820
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arc/arc.c10
-rw-r--r--gcc/config/cris/cris.c10
-rw-r--r--gcc/config/fr30/fr30.c14
-rw-r--r--gcc/config/i386/i386.c6
-rw-r--r--gcc/config/m32r/m32r.c16
-rw-r--r--gcc/config/m88k/m88k.c34
6 files changed, 43 insertions, 47 deletions
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 6a31b6cef89..d3adb744e15 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on the Argonaut ARC cpu.
- Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001
+ Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1706,7 +1706,7 @@ arc_print_operand (file, x, code)
fputc (']', file);
}
else
- output_operand_lossage ("invalid operand to %R code");
+ output_operand_lossage ("invalid operand to %%R code");
return;
case 'S' :
if ((GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FLAG (x))
@@ -1738,7 +1738,7 @@ arc_print_operand (file, x, code)
(long)(code == 'L' ? INTVAL (first) : INTVAL (second)));
}
else
- output_operand_lossage ("invalid operand to %H/%L code");
+ output_operand_lossage ("invalid operand to %%H/%%L code");
return;
case 'A' :
{
@@ -1762,7 +1762,7 @@ arc_print_operand (file, x, code)
fputs (".a", file);
}
else
- output_operand_lossage ("invalid operand to %U code");
+ output_operand_lossage ("invalid operand to %%U code");
return;
case 'V' :
/* Output cache bypass indicator for a load/store insn. Volatile memory
@@ -1773,7 +1773,7 @@ arc_print_operand (file, x, code)
fputs (".di", file);
}
else
- output_operand_lossage ("invalid operand to %V code");
+ output_operand_lossage ("invalid operand to %%V code");
return;
case 0 :
/* Do nothing special. */
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 0cfbbd35e5f..063bad642ea 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -55,10 +55,10 @@ Boston, MA 02111-1307, USA. */
abort (); \
} while (0)
-#define LOSE_AND_RETURN(msg, x) \
+#define LOSE_AND_RETURN(msgid, x) \
do \
{ \
- cris_operand_lossage (msg, x); \
+ cris_operand_lossage (msgid, x); \
return; \
} while (0)
@@ -507,12 +507,12 @@ cris_op_str (x)
categorization of the error. */
static void
-cris_operand_lossage (msg, op)
- const char *msg;
+cris_operand_lossage (msgid, op)
+ const char *msgid;
rtx op;
{
debug_rtx (op);
- output_operand_lossage (msg);
+ output_operand_lossage ("%s", msgid);
}
/* Print an index part of an address to file. */
diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c
index e804cd9dab2..261f3665325 100644
--- a/gcc/config/fr30/fr30.c
+++ b/gcc/config/fr30/fr30.c
@@ -1,5 +1,5 @@
/* FR30 specific functions.
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of GNU CC.
@@ -480,7 +480,7 @@ fr30_print_operand (file, x, code)
/* Compute the register name of the second register in a hi/lo
register pair. */
if (GET_CODE (x) != REG)
- output_operand_lossage ("fr30_print_operand: unrecognized %p code");
+ output_operand_lossage ("fr30_print_operand: unrecognized %%p code");
else
fprintf (file, "r%d", REGNO (x) + 1);
return;
@@ -500,7 +500,7 @@ fr30_print_operand (file, x, code)
case GTU: fprintf (file, "hi"); break;
case GEU: fprintf (file, "nc"); break;
default:
- output_operand_lossage ("fr30_print_operand: unrecognized %b code");
+ output_operand_lossage ("fr30_print_operand: unrecognized %%b code");
break;
}
return;
@@ -521,7 +521,7 @@ fr30_print_operand (file, x, code)
case GTU: fprintf (file, "ls"); break;
case GEU: fprintf (file, "c"); break;
default:
- output_operand_lossage ("fr30_print_operand: unrecognized %B code");
+ output_operand_lossage ("fr30_print_operand: unrecognized %%B code");
break;
}
return;
@@ -529,7 +529,7 @@ fr30_print_operand (file, x, code)
case 'A':
/* Print a signed byte value as an unsigned value. */
if (GET_CODE (x) != CONST_INT)
- output_operand_lossage ("fr30_print_operand: invalid operand to %A code");
+ output_operand_lossage ("fr30_print_operand: invalid operand to %%A code");
else
{
HOST_WIDE_INT val;
@@ -546,14 +546,14 @@ fr30_print_operand (file, x, code)
if (GET_CODE (x) != CONST_INT
|| INTVAL (x) < 16
|| INTVAL (x) > 32)
- output_operand_lossage ("fr30_print_operand: invalid %x code");
+ output_operand_lossage ("fr30_print_operand: invalid %%x code");
else
fprintf (file, "%d", INTVAL (x) - 16);
return;
case 'F':
if (GET_CODE (x) != CONST_DOUBLE)
- output_operand_lossage ("fr30_print_operand: invalid %F code");
+ output_operand_lossage ("fr30_print_operand: invalid %%F code");
else
{
REAL_VALUE_TYPE d;
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e038e5cc7ef..23bb34ea941 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -5862,11 +5862,7 @@ print_operand (file, x, code)
return;
}
default:
- {
- char str[50];
- sprintf (str, "invalid operand code `%c'", code);
- output_operand_lossage (str);
- }
+ output_operand_lossage ("invalid operand code `%c'", code);
}
}
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index 9ae218e1d06..edf5fa4056e 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on the Mitsubishi M32R cpu.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -2245,14 +2245,14 @@ m32r_print_operand (file, x, code)
if (GET_CODE (x) == REG)
fprintf (file, "@+%s", reg_names [REGNO (x)]);
else
- output_operand_lossage ("invalid operand to %s code");
+ output_operand_lossage ("invalid operand to %%s code");
return;
case 'p':
if (GET_CODE (x) == REG)
fprintf (file, "@%s+", reg_names [REGNO (x)]);
else
- output_operand_lossage ("invalid operand to %p code");
+ output_operand_lossage ("invalid operand to %%p code");
return;
case 'R' :
@@ -2275,7 +2275,7 @@ m32r_print_operand (file, x, code)
fputc (')', file);
}
else
- output_operand_lossage ("invalid operand to %R code");
+ output_operand_lossage ("invalid operand to %%R code");
return;
case 'H' : /* High word */
@@ -2298,7 +2298,7 @@ m32r_print_operand (file, x, code)
code == 'L' ? INTVAL (first) : INTVAL (second));
}
else
- output_operand_lossage ("invalid operand to %H/%L code");
+ output_operand_lossage ("invalid operand to %%H/%%L code");
return;
case 'A' :
@@ -2360,7 +2360,7 @@ m32r_print_operand (file, x, code)
fputc (')', file);
return;
default :
- output_operand_lossage ("invalid operand to %T/%B code");
+ output_operand_lossage ("invalid operand to %%T/%%B code");
return;
}
break;
@@ -2375,7 +2375,7 @@ m32r_print_operand (file, x, code)
fputs (".a", file);
}
else
- output_operand_lossage ("invalid operand to %U code");
+ output_operand_lossage ("invalid operand to %%U code");
return;
case 'N' :
@@ -2383,7 +2383,7 @@ m32r_print_operand (file, x, code)
if (GET_CODE (x) == CONST_INT)
output_addr_const (file, GEN_INT (- INTVAL (x)));
else
- output_operand_lossage ("invalid operand to %N code");
+ output_operand_lossage ("invalid operand to %%N code");
return;
case 'X' :
diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c
index 5115c0c6e7b..c1c2146603e 100644
--- a/gcc/config/m88k/m88k.c
+++ b/gcc/config/m88k/m88k.c
@@ -2879,7 +2879,7 @@ print_operand (file, x, code)
if (sequencep)
{
if (code < 'B' || code > 'E')
- output_operand_lossage ("%R not followed by %B/C/D/E");
+ output_operand_lossage ("%%R not followed by %%B/C/D/E");
if (reversep)
xc = reverse_condition (xc);
sequencep = 0;
@@ -2947,43 +2947,43 @@ print_operand (file, x, code)
value >>= 16;
case 'x': /* print the lower 16 bits of the integer constant in hex */
if (xc != CONST_INT)
- output_operand_lossage ("invalid %x/X value");
+ output_operand_lossage ("invalid %%x/X value");
fprintf (file, "0x%x", value & 0xffff); return;
case 'H': /* print the low 16 bits of the negated integer constant */
if (xc != CONST_INT)
- output_operand_lossage ("invalid %H value");
+ output_operand_lossage ("invalid %%H value");
value = -value;
case 'h': /* print the register or low 16 bits of the integer constant */
if (xc == REG)
goto reg;
if (xc != CONST_INT)
- output_operand_lossage ("invalid %h value");
+ output_operand_lossage ("invalid %%h value");
fprintf (file, "%d", value & 0xffff);
return;
case 'Q': /* print the low 8 bits of the negated integer constant */
if (xc != CONST_INT)
- output_operand_lossage ("invalid %Q value");
+ output_operand_lossage ("invalid %%Q value");
value = -value;
case 'q': /* print the register or low 8 bits of the integer constant */
if (xc == REG)
goto reg;
if (xc != CONST_INT)
- output_operand_lossage ("invalid %q value");
+ output_operand_lossage ("invalid %%q value");
fprintf (file, "%d", value & 0xff);
return;
case 'w': /* print the integer constant (X == 32 ? 0 : 32 - X) */
if (xc != CONST_INT)
- output_operand_lossage ("invalid %o value");
+ output_operand_lossage ("invalid %%o value");
fprintf (file, "%d", value == 32 ? 0 : 32 - value);
return;
case 'p': /* print the logarithm of the integer constant */
if (xc != CONST_INT
|| (value = exact_log2 (value)) < 0)
- output_operand_lossage ("invalid %p value");
+ output_operand_lossage ("invalid %%p value");
fprintf (file, "%d", value);
return;
@@ -2996,12 +2996,12 @@ print_operand (file, x, code)
register int top, bottom;
if (xc != CONST_INT)
- output_operand_lossage ("invalid %s/S value");
+ output_operand_lossage ("invalid %%s/S value");
/* All the "one" bits must be contiguous. If so, MASK will be
a power of two or zero. */
mask = (uval | (uval - 1)) + 1;
if (!(uval && POWER_OF_2_or_0 (mask)))
- output_operand_lossage ("invalid %s/S value");
+ output_operand_lossage ("invalid %%s/S value");
top = mask ? exact_log2 (mask) : 32;
bottom = exact_log2 (uval & ~(uval - 1));
fprintf (file,"%d<%d>", top - bottom, bottom);
@@ -3012,7 +3012,7 @@ print_operand (file, x, code)
if (xc == LABEL_REF)
output_addr_const (file, x);
else if (xc != PC)
- output_operand_lossage ("invalid %P operand");
+ output_operand_lossage ("invalid %%P operand");
return;
case 'L': /* print 0 or 1 if operand is label_ref and then... */
@@ -3043,7 +3043,7 @@ print_operand (file, x, code)
case LE: fputs ("le0", file); return;
case LT: fputs ("lt0", file); return;
case GE: fputs ("ge0", file); return;
- default: output_operand_lossage ("invalid %B value");
+ default: output_operand_lossage ("invalid %%B value");
}
case 'C': /* bb0/bb1 branch values for comparisons */
@@ -3060,7 +3060,7 @@ print_operand (file, x, code)
case LEU: fputs ("ls", file); return;
case LTU: fputs ("lo", file); return;
case GEU: fputs ("hs", file); return;
- default: output_operand_lossage ("invalid %C value");
+ default: output_operand_lossage ("invalid %%C value");
}
case 'D': /* bcnd branch values for float comparisons */
@@ -3073,7 +3073,7 @@ print_operand (file, x, code)
case LE: fputs ("0xe", file); return;
case LT: fputs ("0x4", file); return;
case GE: fputs ("0xb", file); return;
- default: output_operand_lossage ("invalid %D value");
+ default: output_operand_lossage ("invalid %%D value");
}
case 'E': /* bcnd branch values for special integers */
@@ -3081,12 +3081,12 @@ print_operand (file, x, code)
{
case EQ: fputs ("0x8", file); return;
case NE: fputs ("0x7", file); return;
- default: output_operand_lossage ("invalid %E value");
+ default: output_operand_lossage ("invalid %%E value");
}
case 'd': /* second register of a two register pair */
if (xc != REG)
- output_operand_lossage ("`%d' operand isn't a register");
+ output_operand_lossage ("`%%d' operand isn't a register");
fputs (reg_names[REGNO (x) + 1], file);
return;
@@ -3097,7 +3097,7 @@ print_operand (file, x, code)
return;
}
else if (xc != REG)
- output_operand_lossage ("invalid %r value");
+ output_operand_lossage ("invalid %%r value");
case 0:
name:
if (xc == REG)