More signed overflow fixes
[deliverable/binutils-gdb.git] / opcodes / arc-ext.c
index cfb13aa0e1d3a2b8e234f5bc1d1f28984784dd11..bc676687914ab2f4833167458e67aa57d44114c5 100644 (file)
@@ -53,7 +53,7 @@
 
 struct ExtAuxRegister
 {
-  long                   address;
+  unsigned               address;
   char *                 name;
   struct ExtAuxRegister * next;
 };
@@ -191,8 +191,8 @@ create_map (unsigned char *block,
            char *aux_name = xstrdup ((char *) (p + 6));
 
            newAuxRegister->name = aux_name;
-           newAuxRegister->address = (p[2] << 24) | (p[3] << 16)
-             | (p[4] << 8) | p[5];
+           newAuxRegister->address = (((unsigned) p[2] << 24) | (p[3] << 16)
+                                      | (p[4] << 8) | p[5]);
            newAuxRegister->next = arc_extension_map.auxRegisters;
            arc_extension_map.auxRegisters = newAuxRegister;
            break;
@@ -406,7 +406,7 @@ arcExtMap_condCodeName (int code)
 /* Get the name of an extension auxiliary register.  */
 
 const char *
-arcExtMap_auxRegName (long address)
+arcExtMap_auxRegName (unsigned address)
 {
   /* Walk the list of auxiliary register names and find the name.  */
   struct ExtAuxRegister *r;
@@ -463,7 +463,7 @@ dump_ARC_extmap (void)
 
     while (r)
     {
-       printf ("AUX : %s %ld\n", r->name, r->address);
+       printf ("AUX : %s %u\n", r->name, r->address);
        r = r->next;
     }
 
This page took 0.02354 seconds and 4 git commands to generate.