aboutsummaryrefslogtreecommitdiff
path: root/opcodes/openrisc-asm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-10-09 08:54:58 +0000
committerNick Clifton <nickc@redhat.com>2001-10-09 08:54:58 +0000
commit0e2ee3ca05685dd15a9aa629d3a7dd1a686e6351 (patch)
treed1ef0e67d43d562cc680363b5f6a09332efd8b65 /opcodes/openrisc-asm.c
parent060adf0e2fe724875446490282915f9d83d3e42d (diff)
downloadgdb-0e2ee3ca05685dd15a9aa629d3a7dd1a686e6351.zip
gdb-0e2ee3ca05685dd15a9aa629d3a7dd1a686e6351.tar.gz
gdb-0e2ee3ca05685dd15a9aa629d3a7dd1a686e6351.tar.bz2
Fix compile time warnings in cgen-generated files
Diffstat (limited to 'opcodes/openrisc-asm.c')
-rw-r--r--opcodes/openrisc-asm.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/opcodes/openrisc-asm.c b/opcodes/openrisc-asm.c
index b414cb5..de9b554 100644
--- a/opcodes/openrisc-asm.c
+++ b/opcodes/openrisc-asm.c
@@ -26,9 +26,9 @@ 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 "safe-ctype.h"
#include "bfd.h"
#include "symcat.h"
#include "openrisc-desc.h"
@@ -44,14 +44,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
static const char * parse_insn_normal
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
-long openrisc_sign_extend_16bit
- PARAMS ((long));
-static const char * parse_hi16
- PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
-static const char * parse_lo16
- PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
-const char * openrisc_cgen_parse_operand
- PARAMS ((CGEN_CPU_DESC, int, const char **, CGEN_FIELDS *));
/* -- assembler routines inserted here */
@@ -59,6 +51,11 @@ const char * openrisc_cgen_parse_operand
#define CGEN_VERBOSE_ASSEMBLER_ERRORS
+static const char * parse_hi16
+ PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
+static const char * parse_lo16
+ PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
+
long
openrisc_sign_extend_16bit (value)
long value;
@@ -66,7 +63,6 @@ openrisc_sign_extend_16bit (value)
return (long) (short) value;
}
-
/* Handle hi(). */
static const char *
@@ -116,8 +112,7 @@ parse_hi16 (cd, strp, opindex, valuep)
return errmsg;
}
-
-/* Handle lo() */
+/* Handle lo(). */
static const char *
parse_lo16 (cd, strp, opindex, valuep)
@@ -167,6 +162,9 @@ parse_lo16 (cd, strp, opindex, valuep)
/* -- */
+const char * openrisc_cgen_parse_operand
+ PARAMS ((CGEN_CPU_DESC, int, const char **, CGEN_FIELDS *));
+
/* Main entry point for operand parsing.
This function is basically just a big switch statement. Earlier versions
@@ -278,8 +276,7 @@ openrisc_cgen_init_asm (cd)
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)
@@ -402,14 +399,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
@@ -438,7 +435,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) == ' ')
@@ -485,7 +482,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')
@@ -534,7 +531,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.