aboutsummaryrefslogtreecommitdiff
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
commit3ec2b351bd81ef7a827c8853e04c5612d00be84a (patch)
treee1431249747d706a97814415d8cd8df3fd5d4382 /cpu
parent9d8504b17f98d4fc4a524395563fa67a4fe8d2bc (diff)
downloadgdb-3ec2b351bd81ef7a827c8853e04c5612d00be84a.zip
gdb-3ec2b351bd81ef7a827c8853e04c5612d00be84a.tar.gz
gdb-3ec2b351bd81ef7a827c8853e04c5612d00be84a.tar.bz2
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 0186195..7facd5a 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 5da6911..63ef076 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 57c2913..f61de6c 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;