LEFT | RIGHT |
(no file at all) | |
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 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1737 mark(Prog *firstp) | 1737 mark(Prog *firstp) |
1738 { | 1738 { |
1739 Prog *p; | 1739 Prog *p; |
1740 ········ | 1740 ········ |
1741 for(p=firstp; p; p=p->link) { | 1741 for(p=firstp; p; p=p->link) { |
1742 if(p->reg != dead) | 1742 if(p->reg != dead) |
1743 break; | 1743 break; |
1744 p->reg = alive; | 1744 p->reg = alive; |
1745 if(p->as != ACALL && p->to.type == D_BRANCH && p->to.branch) | 1745 if(p->as != ACALL && p->to.type == D_BRANCH && p->to.branch) |
1746 mark(p->to.branch); | 1746 mark(p->to.branch); |
1747 » » if(p->as == AJMP || p->as == ARET || (p->as == ACALL && noreturn
(p))) | 1747 » » if(p->as == AJMP || p->as == ARET || p->as == AUNDEF) |
1748 break; | 1748 break; |
1749 } | 1749 } |
1750 } | 1750 } |
1751 | 1751 |
1752 static void | 1752 static void |
1753 fixjmp(Prog *firstp) | 1753 fixjmp(Prog *firstp) |
1754 { | 1754 { |
1755 int jmploop; | 1755 int jmploop; |
1756 Prog *p, *last; | 1756 Prog *p, *last; |
1757 ········ | 1757 ········ |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 last->link = P; | 1812 last->link = P; |
1813 } | 1813 } |
1814 ········ | 1814 ········ |
1815 if(debug['R'] && debug['v']) { | 1815 if(debug['R'] && debug['v']) { |
1816 print("\n"); | 1816 print("\n"); |
1817 for(p=firstp; p; p=p->link) | 1817 for(p=firstp; p; p=p->link) |
1818 print("%P\n", p); | 1818 print("%P\n", p); |
1819 print("\n"); | 1819 print("\n"); |
1820 } | 1820 } |
1821 } | 1821 } |
LEFT | RIGHT |