LEFT | RIGHT |
(no file at all) | |
1 // Inferno utils/5c/peep.c | 1 // Inferno utils/5c/peep.c |
2 // http://code.google.com/p/inferno-os/source/browse/utils/5c/peep.c | 2 // http://code.google.com/p/inferno-os/source/browse/utils/5c/peep.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 r1->p1 = r2; | 71 r1->p1 = r2; |
72 | 72 |
73 r = r2; | 73 r = r2; |
74 | 74 |
75 case ADATA: | 75 case ADATA: |
76 case AGLOBL: | 76 case AGLOBL: |
77 case ANAME: | 77 case ANAME: |
78 case ASIGNAME: | 78 case ASIGNAME: |
79 case ALOCALS: | 79 case ALOCALS: |
80 case ATYPE: | 80 case ATYPE: |
| 81 case ANPTRS: |
| 82 case APTRS: |
81 p = p->link; | 83 p = p->link; |
82 } | 84 } |
83 } | 85 } |
84 //dumpit("begin", firstr); | 86 //dumpit("begin", firstr); |
85 | 87 |
86 loop1: | 88 loop1: |
87 | 89 |
88 t = 0; | 90 t = 0; |
89 for(r=firstr; r!=R; r=r->link) { | 91 for(r=firstr; r!=R; r=r->link) { |
90 p = r->prog; | 92 p = r->prog; |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 return 4; | 1190 return 4; |
1189 return 3; | 1191 return 3; |
1190 | 1192 |
1191 case ATEXT: /* funny */ | 1193 case ATEXT: /* funny */ |
1192 if(v->type == D_REG) | 1194 if(v->type == D_REG) |
1193 if(v->reg == (uchar)REGARG) | 1195 if(v->reg == (uchar)REGARG) |
1194 return 3; | 1196 return 3; |
1195 return 0; | 1197 return 0; |
1196 | 1198 |
1197 case ALOCALS: /* funny */ | 1199 case ALOCALS: /* funny */ |
| 1200 case ANPTRS: |
| 1201 case APTRS: |
1198 return 0; | 1202 return 0; |
1199 } | 1203 } |
1200 } | 1204 } |
1201 | 1205 |
1202 /* | 1206 /* |
1203 * direct reference, | 1207 * direct reference, |
1204 * could be set/use depending on | 1208 * could be set/use depending on |
1205 * semantics | 1209 * semantics |
1206 */ | 1210 */ |
1207 int | 1211 int |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 } | 1553 } |
1550 } | 1554 } |
1551 | 1555 |
1552 int | 1556 int |
1553 isdconst(Addr *a) | 1557 isdconst(Addr *a) |
1554 { | 1558 { |
1555 if(a->type == D_CONST && a->reg == NREG) | 1559 if(a->type == D_CONST && a->reg == NREG) |
1556 return 1; | 1560 return 1; |
1557 return 0; | 1561 return 0; |
1558 } | 1562 } |
LEFT | RIGHT |