summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-07-05 15:07:46 +0000
committerNick Clifton <nickc@redhat.com>2005-07-05 15:07:46 +0000
commitffdd0bf64cb3633585a8c6b1bf4498da90c08116 (patch)
treea3426f0b1b76098a639dc0bde15ef6e12e62a9b8 /cpu
parentc440d9ad3435a7fdb935f9b27212153a3e63b9f1 (diff)
downloadbinutils-redhat-ffdd0bf64cb3633585a8c6b1bf4498da90c08116.tar.gz
Fix compile time warnings from a GCC 4.0 compiler
Diffstat (limited to 'cpu')
-rw-r--r--cpu/ChangeLog10
-rw-r--r--cpu/iq2000.opc4
-rw-r--r--cpu/ms1.opc31
3 files changed, 23 insertions, 22 deletions
diff --git a/cpu/ChangeLog b/cpu/ChangeLog
index 0186195be2..7facd5a550 100644
--- a/cpu/ChangeLog
+++ b/cpu/ChangeLog
@@ -1,3 +1,13 @@
+2005-07-05 Nick Clifton <nickc@redhat.com>
+
+ * iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
+ unsigned in order to avoid compile time warnings about sign
+ conflicts.
+
+ * ms1.opc (parse_*): Likewise.
+ (parse_imm16): Use a "void *" as it is passed both signed and
+ unsigned arguments.
+
2005-07-01 Nick Clifton <nickc@redhat.com>
* frv.opc: Update to ISO C90 function declaration style.
diff --git a/cpu/iq2000.opc b/cpu/iq2000.opc
index 5da6911a1c..63ef0768dd 100644
--- a/cpu/iq2000.opc
+++ b/cpu/iq2000.opc
@@ -259,7 +259,7 @@ static const char *
parse_lo16 (CGEN_CPU_DESC cd,
const char **strp,
int opindex,
- long *valuep)
+ unsigned long *valuep)
{
if (strncasecmp (*strp, "%lo(", 4) == 0)
{
@@ -291,7 +291,7 @@ static const char *
parse_mlo16 (CGEN_CPU_DESC cd,
const char **strp,
int opindex,
- long *valuep)
+ unsigned long *valuep)
{
if (strncasecmp (*strp, "%lo(", 4) == 0)
{
diff --git a/cpu/ms1.opc b/cpu/ms1.opc
index 57c2913bd1..f61de6cd3d 100644
--- a/cpu/ms1.opc
+++ b/cpu/ms1.opc
@@ -89,16 +89,6 @@ ms1_asm_hash (const char* insn)
/* -- asm.c */
-static int signed_out_of_bounds (long);
-static const char * parse_imm16 (CGEN_CPU_DESC, const char **, int, long *);
-static const char * parse_dup (CGEN_CPU_DESC, const char **, int, long *);
-static const char * parse_ball (CGEN_CPU_DESC, const char **, int, long *);
-static const char * parse_xmode (CGEN_CPU_DESC, const char **, int, long *);
-static const char * parse_rc (CGEN_CPU_DESC, const char **, int, long *);
-static const char * parse_cbrb (CGEN_CPU_DESC, const char **, int, long *);
-static const char * parse_rbbc (CGEN_CPU_DESC, const char **, int, long *);
-static const char * parse_type (CGEN_CPU_DESC, const char **, int, long *);
-
/* Range checking for signed numbers. Returns 0 if acceptable
and 1 if the value is out of bounds for a signed quantity. */
@@ -114,8 +104,9 @@ static const char *
parse_imm16 (CGEN_CPU_DESC cd,
const char **strp,
int opindex,
- long *valuep)
+ void *arg)
{
+ signed long * valuep = (signed long *) arg;
const char *errmsg;
enum cgen_parse_operand_result result_type;
bfd_reloc_code_real_type code = BFD_RELOC_NONE;
@@ -218,9 +209,9 @@ parse_imm16 (CGEN_CPU_DESC cd,
else
{
/* MS1_OPERAND_IMM16Z. Parse as an unsigned integer. */
- errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, valuep);
+ errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, (unsigned long *) valuep);
- if (opindex == (CGEN_OPERAND_TYPE)MS1_OPERAND_IMM16
+ if (opindex == (CGEN_OPERAND_TYPE) MS1_OPERAND_IMM16
&& *valuep >= 0x8000
&& *valuep <= 0xffff)
*valuep -= 0x10000;
@@ -235,7 +226,7 @@ static const char *
parse_dup (CGEN_CPU_DESC cd,
const char **strp,
int opindex,
- long *valuep)
+ unsigned long *valuep)
{
const char *errmsg = NULL;
@@ -260,7 +251,7 @@ static const char *
parse_ball (CGEN_CPU_DESC cd,
const char **strp,
int opindex,
- long *valuep)
+ unsigned long *valuep)
{
const char *errmsg = NULL;
@@ -284,7 +275,7 @@ static const char *
parse_xmode (CGEN_CPU_DESC cd,
const char **strp,
int opindex,
- long *valuep)
+ unsigned long *valuep)
{
const char *errmsg = NULL;
@@ -308,7 +299,7 @@ static const char *
parse_rc (CGEN_CPU_DESC cd,
const char **strp,
int opindex,
- long *valuep)
+ unsigned long *valuep)
{
const char *errmsg = NULL;
@@ -332,7 +323,7 @@ static const char *
parse_cbrb (CGEN_CPU_DESC cd,
const char **strp,
int opindex,
- long *valuep)
+ unsigned long *valuep)
{
const char *errmsg = NULL;
@@ -356,7 +347,7 @@ static const char *
parse_rbbc (CGEN_CPU_DESC cd,
const char **strp,
int opindex,
- long *valuep)
+ unsigned long *valuep)
{
const char *errmsg = NULL;
@@ -390,7 +381,7 @@ static const char *
parse_type (CGEN_CPU_DESC cd,
const char **strp,
int opindex,
- long *valuep)
+ unsigned long *valuep)
{
const char *errmsg = NULL;