LEFT | RIGHT |
(no file at all) | |
1 // Derived from Inferno utils/6c/peep.c | 1 // Derived from Inferno utils/6c/peep.c |
2 // http://code.google.com/p/inferno-os/source/browse/utils/6c/peep.c | 2 // http://code.google.com/p/inferno-os/source/browse/utils/6c/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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 r = r2; | 122 r = r2; |
123 t++; | 123 t++; |
124 | 124 |
125 case ADATA: | 125 case ADATA: |
126 case AGLOBL: | 126 case AGLOBL: |
127 case ANAME: | 127 case ANAME: |
128 case ASIGNAME: | 128 case ASIGNAME: |
129 case ALOCALS: | 129 case ALOCALS: |
130 case ATYPE: | 130 case ATYPE: |
| 131 case ANPTRS: |
| 132 case APTRS: |
131 p = p->link; | 133 p = p->link; |
132 } | 134 } |
133 } | 135 } |
134 | 136 |
135 // byte, word arithmetic elimination. | 137 // byte, word arithmetic elimination. |
136 elimshortmov(r); | 138 elimshortmov(r); |
137 | 139 |
138 // constant propagation | 140 // constant propagation |
139 // find MOV $con,R followed by | 141 // find MOV $con,R followed by |
140 // another MOV $con,R without | 142 // another MOV $con,R without |
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 if(p->from.offset == p0->from.offset) | 1028 if(p->from.offset == p0->from.offset) |
1027 if(p->from.scale == p0->from.scale) | 1029 if(p->from.scale == p0->from.scale) |
1028 if(p->from.u.vval == p0->from.u.vval) | 1030 if(p->from.u.vval == p0->from.u.vval) |
1029 if(p->from.index == p0->from.index) { | 1031 if(p->from.index == p0->from.index) { |
1030 excise(r); | 1032 excise(r); |
1031 goto loop; | 1033 goto loop; |
1032 } | 1034 } |
1033 break; | 1035 break; |
1034 } | 1036 } |
1035 } | 1037 } |
LEFT | RIGHT |