mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
Use safe-ctype.h not ctype.h
This commit is contained in:
parent
03dd63aa03
commit
37111cc728
@ -1,3 +1,23 @@
|
||||
2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
|
||||
|
||||
* cgen-ibld.in: Include safe-ctype.h in preference to
|
||||
ctype.h.
|
||||
* cgen-asm.in: Include safe-ctype.h in preference to
|
||||
ctype.h. Fix formatting. Use ISSPACE instead of isspace and
|
||||
TOLOWER instead of tolower.
|
||||
(@arch@_cgen_build_insn_regex): Remove duplication of syntax
|
||||
string elements in constructed regular expression.
|
||||
* fr30-asm.c: Regenerate.
|
||||
* fr30-desc.c: Regenerate.
|
||||
* fr30-ibld.c: Regenerate.
|
||||
* m32r-asm.c: Regenerate.
|
||||
* m32r-desc.c: Regenerate.
|
||||
* m32r-ibld.c: Regenerate.
|
||||
* openrisc-asm.c: Regenerate.
|
||||
* openrisc-desc.c: Regenerate.
|
||||
* openrisc-ibld.c: Regenerate.
|
||||
* po/opcodes.pot: Regenerate.
|
||||
|
||||
2001-10-12 matthew green <mrg@redhat.com>
|
||||
|
||||
* ppc-opc.c (insert_de, extract_de, insert_des, extract_des): New
|
||||
|
@ -26,7 +26,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
Keep that in mind. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include "ansidecl.h"
|
||||
#include "bfd.h"
|
||||
@ -36,29 +35,29 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "opintl.h"
|
||||
#include "xregex.h"
|
||||
#include "libiberty.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
#undef min
|
||||
#undef min
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
#undef max
|
||||
#undef max
|
||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
static const char * parse_insn_normal
|
||||
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
|
||||
|
||||
/* -- assembler routines inserted here */
|
||||
/* -- assembler routines inserted here. */
|
||||
|
||||
|
||||
/*
|
||||
Regex construction routine.
|
||||
/* Regex construction routine.
|
||||
|
||||
This translates an opcode syntax string into a regex string,
|
||||
by replacing any non-character syntax element (such as an
|
||||
opcode) with the pattern '.*'
|
||||
This translates an opcode syntax string into a regex string,
|
||||
by replacing any non-character syntax element (such as an
|
||||
opcode) with the pattern '.*'
|
||||
|
||||
It then compiles the regex and stores it in the opcode, for
|
||||
later use by @arch@_cgen_assemble_insn
|
||||
It then compiles the regex and stores it in the opcode, for
|
||||
later use by @arch@_cgen_assemble_insn
|
||||
|
||||
Returns NULL for success, an error message for failure. */
|
||||
Returns NULL for success, an error message for failure. */
|
||||
|
||||
char *
|
||||
@arch@_cgen_build_insn_regex (insn)
|
||||
@ -66,7 +65,6 @@ char *
|
||||
{
|
||||
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
|
||||
const char *mnem = CGEN_INSN_MNEMONIC (insn);
|
||||
int mnem_len;
|
||||
char rxbuf[CGEN_MAX_RX_ELEMENTS];
|
||||
char *rx = rxbuf;
|
||||
const CGEN_SYNTAX_CHAR_TYPE *syn;
|
||||
@ -134,9 +132,6 @@ char *
|
||||
*rx++ = c;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Insert syntax char into rx. */
|
||||
*rx++ = c;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -170,7 +165,7 @@ char *
|
||||
regfree ((regex_t *) CGEN_INSN_RX (insn));
|
||||
free (CGEN_INSN_RX (insn));
|
||||
(CGEN_INSN_RX (insn)) = NULL;
|
||||
return msg;
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
@ -211,14 +206,14 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
GAS's input scrubber will ensure mnemonics are lowercase, but we may
|
||||
not be called from GAS. */
|
||||
p = CGEN_INSN_MNEMONIC (insn);
|
||||
while (*p && tolower (*p) == tolower (*str))
|
||||
while (*p && TOLOWER (*p) == TOLOWER (*str))
|
||||
++p, ++str;
|
||||
|
||||
if (* p)
|
||||
return _("unrecognized instruction");
|
||||
|
||||
#ifndef CGEN_MNEMONIC_OPERANDS
|
||||
if (* str && !isspace (* str))
|
||||
if (* str && ! ISSPACE (* str))
|
||||
return _("unrecognized instruction");
|
||||
#endif
|
||||
|
||||
@ -247,7 +242,7 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
first char after the mnemonic part is a space. */
|
||||
/* FIXME: We also take inappropriate advantage of the fact that
|
||||
GAS's input scrubber will remove extraneous blanks. */
|
||||
if (tolower (*str) == tolower (CGEN_SYNTAX_CHAR (* syn)))
|
||||
if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
|
||||
{
|
||||
#ifdef CGEN_MNEMONIC_OPERANDS
|
||||
if (CGEN_SYNTAX_CHAR(* syn) == ' ')
|
||||
@ -296,7 +291,7 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
blanks now. IE: We needn't try again with a longer version of
|
||||
the insn and it is assumed that longer versions of insns appear
|
||||
before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
|
||||
while (isspace (* str))
|
||||
while (ISSPACE (* str))
|
||||
++ str;
|
||||
|
||||
if (* str != '\0')
|
||||
@ -345,7 +340,7 @@ const CGEN_INSN *
|
||||
int recognized_mnemonic = 0;
|
||||
|
||||
/* Skip leading white space. */
|
||||
while (isspace (* str))
|
||||
while (ISSPACE (* str))
|
||||
++ str;
|
||||
|
||||
/* The instructions are stored in hashed lists.
|
||||
|
@ -25,7 +25,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
Keep that in mind. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include "ansidecl.h"
|
||||
#include "dis-asm.h"
|
||||
@ -34,6 +33,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "@prefix@-desc.h"
|
||||
#include "@prefix@-opc.h"
|
||||
#include "opintl.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
#undef min
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
@ -26,7 +26,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
Keep that in mind. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include "ansidecl.h"
|
||||
#include "bfd.h"
|
||||
@ -36,16 +35,17 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "opintl.h"
|
||||
#include "xregex.h"
|
||||
#include "libiberty.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
#undef min
|
||||
#undef min
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
#undef max
|
||||
#undef max
|
||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
static const char * parse_insn_normal
|
||||
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
|
||||
|
||||
/* -- assembler routines inserted here */
|
||||
/* -- assembler routines inserted here. */
|
||||
|
||||
/* -- asm.c */
|
||||
/* Handle register lists for LDMx and STMx. */
|
||||
@ -345,17 +345,16 @@ fr30_cgen_init_asm (cd)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Regex construction routine.
|
||||
/* Regex construction routine.
|
||||
|
||||
This translates an opcode syntax string into a regex string,
|
||||
by replacing any non-character syntax element (such as an
|
||||
opcode) with the pattern '.*'
|
||||
This translates an opcode syntax string into a regex string,
|
||||
by replacing any non-character syntax element (such as an
|
||||
opcode) with the pattern '.*'
|
||||
|
||||
It then compiles the regex and stores it in the opcode, for
|
||||
later use by fr30_cgen_assemble_insn
|
||||
It then compiles the regex and stores it in the opcode, for
|
||||
later use by fr30_cgen_assemble_insn
|
||||
|
||||
Returns NULL for success, an error message for failure. */
|
||||
Returns NULL for success, an error message for failure. */
|
||||
|
||||
char *
|
||||
fr30_cgen_build_insn_regex (insn)
|
||||
@ -363,7 +362,6 @@ fr30_cgen_build_insn_regex (insn)
|
||||
{
|
||||
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
|
||||
const char *mnem = CGEN_INSN_MNEMONIC (insn);
|
||||
int mnem_len;
|
||||
char rxbuf[CGEN_MAX_RX_ELEMENTS];
|
||||
char *rx = rxbuf;
|
||||
const CGEN_SYNTAX_CHAR_TYPE *syn;
|
||||
@ -431,9 +429,6 @@ fr30_cgen_build_insn_regex (insn)
|
||||
*rx++ = c;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Insert syntax char into rx. */
|
||||
*rx++ = c;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -467,7 +462,7 @@ fr30_cgen_build_insn_regex (insn)
|
||||
regfree ((regex_t *) CGEN_INSN_RX (insn));
|
||||
free (CGEN_INSN_RX (insn));
|
||||
(CGEN_INSN_RX (insn)) = NULL;
|
||||
return msg;
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
@ -508,14 +503,14 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
GAS's input scrubber will ensure mnemonics are lowercase, but we may
|
||||
not be called from GAS. */
|
||||
p = CGEN_INSN_MNEMONIC (insn);
|
||||
while (*p && tolower (*p) == tolower (*str))
|
||||
while (*p && TOLOWER (*p) == TOLOWER (*str))
|
||||
++p, ++str;
|
||||
|
||||
if (* p)
|
||||
return _("unrecognized instruction");
|
||||
|
||||
#ifndef CGEN_MNEMONIC_OPERANDS
|
||||
if (* str && !isspace (* str))
|
||||
if (* str && ! ISSPACE (* str))
|
||||
return _("unrecognized instruction");
|
||||
#endif
|
||||
|
||||
@ -544,7 +539,7 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
first char after the mnemonic part is a space. */
|
||||
/* FIXME: We also take inappropriate advantage of the fact that
|
||||
GAS's input scrubber will remove extraneous blanks. */
|
||||
if (tolower (*str) == tolower (CGEN_SYNTAX_CHAR (* syn)))
|
||||
if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
|
||||
{
|
||||
#ifdef CGEN_MNEMONIC_OPERANDS
|
||||
if (CGEN_SYNTAX_CHAR(* syn) == ' ')
|
||||
@ -593,7 +588,7 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
blanks now. IE: We needn't try again with a longer version of
|
||||
the insn and it is assumed that longer versions of insns appear
|
||||
before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
|
||||
while (isspace (* str))
|
||||
while (ISSPACE (* str))
|
||||
++ str;
|
||||
|
||||
if (* str != '\0')
|
||||
@ -642,7 +637,7 @@ fr30_cgen_assemble_insn (cd, str, fields, buf, errmsg)
|
||||
int recognized_mnemonic = 0;
|
||||
|
||||
/* Skip leading white space. */
|
||||
while (isspace (* str))
|
||||
while (ISSPACE (* str))
|
||||
++ str;
|
||||
|
||||
/* The instructions are stored in hashed lists.
|
||||
|
@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
*/
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include "ansidecl.h"
|
||||
|
@ -25,7 +25,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
Keep that in mind. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include "ansidecl.h"
|
||||
#include "dis-asm.h"
|
||||
@ -34,6 +33,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "fr30-desc.h"
|
||||
#include "fr30-opc.h"
|
||||
#include "opintl.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
#undef min
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
@ -26,7 +26,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
Keep that in mind. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include "ansidecl.h"
|
||||
#include "bfd.h"
|
||||
@ -36,16 +35,17 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "opintl.h"
|
||||
#include "xregex.h"
|
||||
#include "libiberty.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
#undef min
|
||||
#undef min
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
#undef max
|
||||
#undef max
|
||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
static const char * parse_insn_normal
|
||||
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
|
||||
|
||||
/* -- assembler routines inserted here */
|
||||
/* -- assembler routines inserted here. */
|
||||
|
||||
/* -- asm.c */
|
||||
static const char * parse_hash
|
||||
@ -347,17 +347,16 @@ m32r_cgen_init_asm (cd)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Regex construction routine.
|
||||
/* Regex construction routine.
|
||||
|
||||
This translates an opcode syntax string into a regex string,
|
||||
by replacing any non-character syntax element (such as an
|
||||
opcode) with the pattern '.*'
|
||||
This translates an opcode syntax string into a regex string,
|
||||
by replacing any non-character syntax element (such as an
|
||||
opcode) with the pattern '.*'
|
||||
|
||||
It then compiles the regex and stores it in the opcode, for
|
||||
later use by m32r_cgen_assemble_insn
|
||||
It then compiles the regex and stores it in the opcode, for
|
||||
later use by m32r_cgen_assemble_insn
|
||||
|
||||
Returns NULL for success, an error message for failure. */
|
||||
Returns NULL for success, an error message for failure. */
|
||||
|
||||
char *
|
||||
m32r_cgen_build_insn_regex (insn)
|
||||
@ -365,7 +364,6 @@ m32r_cgen_build_insn_regex (insn)
|
||||
{
|
||||
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
|
||||
const char *mnem = CGEN_INSN_MNEMONIC (insn);
|
||||
int mnem_len;
|
||||
char rxbuf[CGEN_MAX_RX_ELEMENTS];
|
||||
char *rx = rxbuf;
|
||||
const CGEN_SYNTAX_CHAR_TYPE *syn;
|
||||
@ -433,9 +431,6 @@ m32r_cgen_build_insn_regex (insn)
|
||||
*rx++ = c;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Insert syntax char into rx. */
|
||||
*rx++ = c;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -469,7 +464,7 @@ m32r_cgen_build_insn_regex (insn)
|
||||
regfree ((regex_t *) CGEN_INSN_RX (insn));
|
||||
free (CGEN_INSN_RX (insn));
|
||||
(CGEN_INSN_RX (insn)) = NULL;
|
||||
return msg;
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
@ -510,14 +505,14 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
GAS's input scrubber will ensure mnemonics are lowercase, but we may
|
||||
not be called from GAS. */
|
||||
p = CGEN_INSN_MNEMONIC (insn);
|
||||
while (*p && tolower (*p) == tolower (*str))
|
||||
while (*p && TOLOWER (*p) == TOLOWER (*str))
|
||||
++p, ++str;
|
||||
|
||||
if (* p)
|
||||
return _("unrecognized instruction");
|
||||
|
||||
#ifndef CGEN_MNEMONIC_OPERANDS
|
||||
if (* str && !isspace (* str))
|
||||
if (* str && ! ISSPACE (* str))
|
||||
return _("unrecognized instruction");
|
||||
#endif
|
||||
|
||||
@ -546,7 +541,7 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
first char after the mnemonic part is a space. */
|
||||
/* FIXME: We also take inappropriate advantage of the fact that
|
||||
GAS's input scrubber will remove extraneous blanks. */
|
||||
if (tolower (*str) == tolower (CGEN_SYNTAX_CHAR (* syn)))
|
||||
if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
|
||||
{
|
||||
#ifdef CGEN_MNEMONIC_OPERANDS
|
||||
if (CGEN_SYNTAX_CHAR(* syn) == ' ')
|
||||
@ -595,7 +590,7 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
blanks now. IE: We needn't try again with a longer version of
|
||||
the insn and it is assumed that longer versions of insns appear
|
||||
before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
|
||||
while (isspace (* str))
|
||||
while (ISSPACE (* str))
|
||||
++ str;
|
||||
|
||||
if (* str != '\0')
|
||||
@ -644,7 +639,7 @@ m32r_cgen_assemble_insn (cd, str, fields, buf, errmsg)
|
||||
int recognized_mnemonic = 0;
|
||||
|
||||
/* Skip leading white space. */
|
||||
while (isspace (* str))
|
||||
while (ISSPACE (* str))
|
||||
++ str;
|
||||
|
||||
/* The instructions are stored in hashed lists.
|
||||
|
@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
*/
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include "ansidecl.h"
|
||||
|
@ -25,7 +25,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
Keep that in mind. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include "ansidecl.h"
|
||||
#include "dis-asm.h"
|
||||
@ -34,6 +33,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "m32r-desc.h"
|
||||
#include "m32r-opc.h"
|
||||
#include "opintl.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
#undef min
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
@ -26,7 +26,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
Keep that in mind. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include "ansidecl.h"
|
||||
#include "bfd.h"
|
||||
@ -36,16 +35,17 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "opintl.h"
|
||||
#include "xregex.h"
|
||||
#include "libiberty.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
#undef min
|
||||
#undef min
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
#undef max
|
||||
#undef max
|
||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
static const char * parse_insn_normal
|
||||
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
|
||||
|
||||
/* -- assembler routines inserted here */
|
||||
/* -- assembler routines inserted here. */
|
||||
|
||||
/* -- asm.c */
|
||||
|
||||
@ -266,17 +266,16 @@ openrisc_cgen_init_asm (cd)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Regex construction routine.
|
||||
/* Regex construction routine.
|
||||
|
||||
This translates an opcode syntax string into a regex string,
|
||||
by replacing any non-character syntax element (such as an
|
||||
opcode) with the pattern '.*'
|
||||
This translates an opcode syntax string into a regex string,
|
||||
by replacing any non-character syntax element (such as an
|
||||
opcode) with the pattern '.*'
|
||||
|
||||
It then compiles the regex and stores it in the opcode, for
|
||||
later use by openrisc_cgen_assemble_insn
|
||||
It then compiles the regex and stores it in the opcode, for
|
||||
later use by openrisc_cgen_assemble_insn
|
||||
|
||||
Returns NULL for success, an error message for failure. */
|
||||
Returns NULL for success, an error message for failure. */
|
||||
|
||||
char *
|
||||
openrisc_cgen_build_insn_regex (insn)
|
||||
@ -284,7 +283,6 @@ openrisc_cgen_build_insn_regex (insn)
|
||||
{
|
||||
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
|
||||
const char *mnem = CGEN_INSN_MNEMONIC (insn);
|
||||
int mnem_len;
|
||||
char rxbuf[CGEN_MAX_RX_ELEMENTS];
|
||||
char *rx = rxbuf;
|
||||
const CGEN_SYNTAX_CHAR_TYPE *syn;
|
||||
@ -352,9 +350,6 @@ openrisc_cgen_build_insn_regex (insn)
|
||||
*rx++ = c;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Insert syntax char into rx. */
|
||||
*rx++ = c;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -388,7 +383,7 @@ openrisc_cgen_build_insn_regex (insn)
|
||||
regfree ((regex_t *) CGEN_INSN_RX (insn));
|
||||
free (CGEN_INSN_RX (insn));
|
||||
(CGEN_INSN_RX (insn)) = NULL;
|
||||
return msg;
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
@ -429,14 +424,14 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
GAS's input scrubber will ensure mnemonics are lowercase, but we may
|
||||
not be called from GAS. */
|
||||
p = CGEN_INSN_MNEMONIC (insn);
|
||||
while (*p && tolower (*p) == tolower (*str))
|
||||
while (*p && TOLOWER (*p) == TOLOWER (*str))
|
||||
++p, ++str;
|
||||
|
||||
if (* p)
|
||||
return _("unrecognized instruction");
|
||||
|
||||
#ifndef CGEN_MNEMONIC_OPERANDS
|
||||
if (* str && !isspace (* str))
|
||||
if (* str && ! ISSPACE (* str))
|
||||
return _("unrecognized instruction");
|
||||
#endif
|
||||
|
||||
@ -465,7 +460,7 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
first char after the mnemonic part is a space. */
|
||||
/* FIXME: We also take inappropriate advantage of the fact that
|
||||
GAS's input scrubber will remove extraneous blanks. */
|
||||
if (tolower (*str) == tolower (CGEN_SYNTAX_CHAR (* syn)))
|
||||
if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
|
||||
{
|
||||
#ifdef CGEN_MNEMONIC_OPERANDS
|
||||
if (CGEN_SYNTAX_CHAR(* syn) == ' ')
|
||||
@ -514,7 +509,7 @@ parse_insn_normal (cd, insn, strp, fields)
|
||||
blanks now. IE: We needn't try again with a longer version of
|
||||
the insn and it is assumed that longer versions of insns appear
|
||||
before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
|
||||
while (isspace (* str))
|
||||
while (ISSPACE (* str))
|
||||
++ str;
|
||||
|
||||
if (* str != '\0')
|
||||
@ -563,7 +558,7 @@ openrisc_cgen_assemble_insn (cd, str, fields, buf, errmsg)
|
||||
int recognized_mnemonic = 0;
|
||||
|
||||
/* Skip leading white space. */
|
||||
while (isspace (* str))
|
||||
while (ISSPACE (* str))
|
||||
++ str;
|
||||
|
||||
/* The instructions are stored in hashed lists.
|
||||
|
@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
*/
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include "ansidecl.h"
|
||||
|
@ -25,7 +25,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
Keep that in mind. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include "ansidecl.h"
|
||||
#include "dis-asm.h"
|
||||
@ -34,6 +33,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "openrisc-desc.h"
|
||||
#include "openrisc-opc.h"
|
||||
#include "opintl.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
#undef min
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2001-10-09 09:40+0100\n"
|
||||
"POT-Creation-Date: 2001-10-12 23:04+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -60,7 +60,7 @@ msgstr ""
|
||||
msgid "unrecognized keyword/register name"
|
||||
msgstr ""
|
||||
|
||||
#: cgen-asm.c:340 fr30-ibld.c:207 m32r-ibld.c:197 openrisc-ibld.c:197
|
||||
#: cgen-asm.c:340 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
|
||||
#, c-format
|
||||
msgid "operand out of range (%ld not between %ld and %ld)"
|
||||
msgstr ""
|
||||
@ -86,87 +86,91 @@ msgstr ""
|
||||
msgid "Address 0x%x is out of bounds.\n"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-asm.c:312 m32r-asm.c:319 openrisc-asm.c:247
|
||||
#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
|
||||
#, c-format
|
||||
msgid "Unrecognized field %d while parsing.\n"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
|
||||
msgid "missing mnemonic in syntax string"
|
||||
msgstr ""
|
||||
|
||||
#. We couldn't parse it.
|
||||
#: fr30-asm.c:474 fr30-asm.c:478 fr30-asm.c:563 fr30-asm.c:665 m32r-asm.c:481
|
||||
#: m32r-asm.c:485 m32r-asm.c:570 m32r-asm.c:672 openrisc-asm.c:409
|
||||
#: openrisc-asm.c:413 openrisc-asm.c:498 openrisc-asm.c:600
|
||||
#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512
|
||||
#: m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431
|
||||
#: openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
|
||||
msgid "unrecognized instruction"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-asm.c:520 m32r-asm.c:527 openrisc-asm.c:455
|
||||
#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
|
||||
#, c-format
|
||||
msgid "syntax error (expected char `%c', found `%c')"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-asm.c:529 m32r-asm.c:536 openrisc-asm.c:464
|
||||
#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
|
||||
#, c-format
|
||||
msgid "syntax error (expected char `%c', found end of instruction)"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-asm.c:557 m32r-asm.c:564 openrisc-asm.c:492
|
||||
#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
|
||||
msgid "junk at end of line"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-asm.c:664 m32r-asm.c:671 openrisc-asm.c:599
|
||||
#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
|
||||
msgid "unrecognized form of instruction"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-asm.c:676 m32r-asm.c:683 openrisc-asm.c:611
|
||||
#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
|
||||
#, c-format
|
||||
msgid "bad instruction `%.50s...'"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-asm.c:679 m32r-asm.c:686 openrisc-asm.c:614
|
||||
#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
|
||||
#, c-format
|
||||
msgid "bad instruction `%.50s'"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-dis.c:301 m32r-dis.c:246 openrisc-dis.c:134
|
||||
#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
|
||||
#, c-format
|
||||
msgid "Unrecognized field %d while printing insn.\n"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-ibld.c:178 m32r-ibld.c:168 openrisc-ibld.c:168
|
||||
#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
|
||||
#, c-format
|
||||
msgid "operand out of range (%ld not between %ld and %lu)"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-ibld.c:191 m32r-ibld.c:181 openrisc-ibld.c:181
|
||||
#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
|
||||
#, c-format
|
||||
msgid "operand out of range (%lu not between 0 and %lu)"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-ibld.c:739 m32r-ibld.c:656 openrisc-ibld.c:630
|
||||
#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
|
||||
#, c-format
|
||||
msgid "Unrecognized field %d while building insn.\n"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-ibld.c:943 m32r-ibld.c:786 openrisc-ibld.c:731
|
||||
#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
|
||||
#, c-format
|
||||
msgid "Unrecognized field %d while decoding insn.\n"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-ibld.c:1087 m32r-ibld.c:891 openrisc-ibld.c:806
|
||||
#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
|
||||
#, c-format
|
||||
msgid "Unrecognized field %d while getting int operand.\n"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-ibld.c:1216 m32r-ibld.c:981 openrisc-ibld.c:866
|
||||
#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
|
||||
#, c-format
|
||||
msgid "Unrecognized field %d while getting vma operand.\n"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-ibld.c:1345 m32r-ibld.c:1074 openrisc-ibld.c:930
|
||||
#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
|
||||
#, c-format
|
||||
msgid "Unrecognized field %d while setting int operand.\n"
|
||||
msgstr ""
|
||||
|
||||
#: fr30-ibld.c:1467 m32r-ibld.c:1160 openrisc-ibld.c:987
|
||||
#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
|
||||
#, c-format
|
||||
msgid "Unrecognized field %d while setting vma operand.\n"
|
||||
msgstr ""
|
||||
|
Loading…
Reference in New Issue
Block a user