mojoshader.c
branchtrunk
changeset 84 a49c5e1948d3
parent 83 ce46250e553d
child 85 c6d6f4d0c596
equal deleted inserted replaced
83:ce46250e553d 84:a49c5e1948d3
   581         item->next = prev->next;
   581         item->next = prev->next;
   582         prev->next = item;
   582         prev->next = item;
   583     } // else
   583     } // else
   584 } // reglist_insert
   584 } // reglist_insert
   585 
   585 
   586 static RegisterList *reglist_exists(RegisterList *prev,
   586 static const RegisterList *reglist_exists(const RegisterList *prev,
   587                                     const RegisterType regtype,
   587                                           const RegisterType regtype,
   588                                     const int regnum)
   588                                           const int regnum)
   589 {
   589 {
   590     const uint32 newval = reg_to_ui32(regtype, regnum);
   590     const uint32 newval = reg_to_ui32(regtype, regnum);
   591     RegisterList *item = prev->next;
   591     const RegisterList *item = prev->next;
   592     while (item != NULL)
   592     while (item != NULL)
   593     {
   593     {
   594         const uint32 val = reg_to_ui32(item->regtype, item->regnum);
   594         const uint32 val = reg_to_ui32(item->regtype, item->regnum);
   595         if (newval == val)
   595         if (newval == val)
   596             return item;  // here it is.
   596             return item;  // here it is.