OLD | NEW |
1 // Derived from Inferno utils/6c/reg.c | 1 // Derived from Inferno utils/6c/reg.c |
2 // http://code.google.com/p/inferno-os/source/browse/utils/6c/reg.c | 2 // http://code.google.com/p/inferno-os/source/browse/utils/6c/reg.c |
3 // | 3 // |
4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. | 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. |
5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) | 5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) |
6 // Portions Copyright © 1997-1999 Vita Nuova Limited | 6 // Portions Copyright © 1997-1999 Vita Nuova Limited |
7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov
a.com) | 7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov
a.com) |
8 // Portions Copyright © 2004,2006 Bruce Ellis | 8 // Portions Copyright © 2004,2006 Bruce Ellis |
9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) | 9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) |
10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others | 10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 * allocate pcs | 188 * allocate pcs |
189 * find use and set of variables | 189 * find use and set of variables |
190 */ | 190 */ |
191 nr = 0; | 191 nr = 0; |
192 for(p=firstp; p!=P; p=p->link) { | 192 for(p=firstp; p!=P; p=p->link) { |
193 switch(p->as) { | 193 switch(p->as) { |
194 case ADATA: | 194 case ADATA: |
195 case AGLOBL: | 195 case AGLOBL: |
196 case ANAME: | 196 case ANAME: |
197 case ASIGNAME: | 197 case ASIGNAME: |
198 case ALOCALS: | |
199 case ATYPE: | 198 case ATYPE: |
200 case ANPTRS: | |
201 case APTRS: | |
202 continue; | 199 continue; |
203 } | 200 } |
204 r = rega(); | 201 r = rega(); |
205 nr++; | 202 nr++; |
206 if(firstr == R) { | 203 if(firstr == R) { |
207 firstr = r; | 204 firstr = r; |
208 lastr = r; | 205 lastr = r; |
209 } else { | 206 } else { |
210 lastr->link = r; | 207 lastr->link = r; |
211 r->p1 = lastr; | 208 r->p1 = lastr; |
(...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 // eliminate the mov. | 1908 // eliminate the mov. |
1912 p2->from = p->from; | 1909 p2->from = p->from; |
1913 *p = *p2; | 1910 *p = *p2; |
1914 p->link = p2->link; | 1911 p->link = p2->link; |
1915 if(debug['R'] && debug['v']) { | 1912 if(debug['R'] && debug['v']) { |
1916 print(" ===change== %P\n", p); | 1913 print(" ===change== %P\n", p); |
1917 } | 1914 } |
1918 } | 1915 } |
1919 } | 1916 } |
1920 } | 1917 } |
OLD | NEW |