LEFT | RIGHT |
(no file at all) | |
1 // Inferno utils/8c/sgen.c | 1 // Inferno utils/8c/sgen.c |
2 // http://code.google.com/p/inferno-os/source/browse/utils/8c/sgen.c | 2 // http://code.google.com/p/inferno-os/source/browse/utils/8c/sgen.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 17 matching lines...) Expand all Loading... |
28 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | 28 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
29 // THE SOFTWARE. | 29 // THE SOFTWARE. |
30 | 30 |
31 #include "gc.h" | 31 #include "gc.h" |
32 | 32 |
33 Prog* | 33 Prog* |
34 gtext(Sym *s, int32 stkoff) | 34 gtext(Sym *s, int32 stkoff) |
35 { | 35 { |
36 int32 a; | 36 int32 a; |
37 | 37 |
38 » a = argsize(); | 38 » a = argsize(1); |
39 if((textflag & NOSPLIT) != 0 && stkoff >= 128) | 39 if((textflag & NOSPLIT) != 0 && stkoff >= 128) |
40 yyerror("stack frame too large for NOSPLIT function"); | 40 yyerror("stack frame too large for NOSPLIT function"); |
41 | 41 |
42 gpseudo(ATEXT, s, nodconst(stkoff)); | 42 gpseudo(ATEXT, s, nodconst(stkoff)); |
43 p->to.type = D_CONST2; | 43 p->to.type = D_CONST2; |
44 p->to.offset2 = a; | 44 p->to.offset2 = a; |
45 return p; | 45 return p; |
46 } | 46 } |
47 | 47 |
48 void | 48 void |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 } else | 474 } else |
475 diag(n, "bad index"); | 475 diag(n, "bad index"); |
476 | 476 |
477 idx.basetree = r; | 477 idx.basetree = r; |
478 if(debug['x']) { | 478 if(debug['x']) { |
479 print("scale = %d\n", idx.scale); | 479 print("scale = %d\n", idx.scale); |
480 prtree(idx.regtree, "index"); | 480 prtree(idx.regtree, "index"); |
481 prtree(idx.basetree, "base"); | 481 prtree(idx.basetree, "base"); |
482 } | 482 } |
483 } | 483 } |
LEFT | RIGHT |