[svn:parrot] r39783 - trunk/compilers/imcc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Thu Jun 25 22:35:38 UTC 2009


Author: chromatic
Date: Thu Jun 25 22:35:37 2009
New Revision: 39783
URL: https://trac.parrot.org/parrot/changeset/39783

Log:
[IMCC] Fixed some signedness mismatch warnings in the register allocator.  No
functional changes, unless you count the possibility of additional correctness
in excessively unlikely possibilities a functional change.

Modified:
   trunk/compilers/imcc/reg_alloc.c

Modified: trunk/compilers/imcc/reg_alloc.c
==============================================================================
--- trunk/compilers/imcc/reg_alloc.c	Thu Jun 25 22:29:08 2009	(r39782)
+++ trunk/compilers/imcc/reg_alloc.c	Thu Jun 25 22:35:37 2009	(r39783)
@@ -72,7 +72,7 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*r);
 
-static int first_avail(
+static unsigned int first_avail(
     ARGIN(const IMC_Unit *unit),
     int reg_set,
     ARGOUT_NULLOK(Set **avail))
@@ -1110,7 +1110,7 @@
 
 /*
 
-=item C<static int first_avail(const IMC_Unit *unit, int reg_set, Set **avail)>
+=item C<static unsigned int first_avail(const IMC_Unit *unit, int reg_set, Set **avail)>
 
 find first available register of the given reg_set
 
@@ -1118,7 +1118,7 @@
 
 */
 
-static int
+static unsigned int
 first_avail(ARGIN(const IMC_Unit *unit), int reg_set, ARGOUT_NULLOK(Set **avail))
 {
     ASSERT_ARGS(first_avail)
@@ -1188,10 +1188,10 @@
             &&  r->color == -1
             && (r->usage & usage)
             && r->use_count) {
-                Set *avail    = sets[j];
-                int first_reg = avail
-                              ? set_first_zero(avail)
-                              : first_avail(unit, (int)r->set, &avail);
+                Set         *avail     = sets[j];
+                unsigned int first_reg = avail
+                                       ? set_first_zero(avail)
+                                       : first_avail(unit, (int)r->set, &avail);
                 set_add(avail, first_reg);
                 r->color = first_reg++;
 


More information about the parrot-commits mailing list