OLD | NEW |
1 // Inferno utils/6c/sgen.c | 1 // Inferno utils/6c/sgen.c |
2 // http://code.google.com/p/inferno-os/source/browse/utils/6c/sgen.c | 2 // http://code.google.com/p/inferno-os/source/browse/utils/6c/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 18 matching lines...) Expand all Loading... |
29 // THE SOFTWARE. | 29 // THE SOFTWARE. |
30 | 30 |
31 #include "gc.h" | 31 #include "gc.h" |
32 #include "../../pkg/runtime/funcdata.h" | 32 #include "../../pkg/runtime/funcdata.h" |
33 | 33 |
34 Prog* | 34 Prog* |
35 gtext(Sym *s, int32 stkoff) | 35 gtext(Sym *s, int32 stkoff) |
36 { | 36 { |
37 vlong v; | 37 vlong v; |
38 | 38 |
39 » v = ((uvlong)argsize() << 32) | (stkoff & 0xffffffff); | 39 » v = ((uvlong)argsize(1) << 32) | (stkoff & 0xffffffff); |
40 if((textflag & NOSPLIT) && stkoff >= 128) | 40 if((textflag & NOSPLIT) && stkoff >= 128) |
41 yyerror("stack frame too large for NOSPLIT function"); | 41 yyerror("stack frame too large for NOSPLIT function"); |
42 | 42 |
43 gpseudo(ATEXT, s, nodgconst(v, types[TVLONG])); | 43 gpseudo(ATEXT, s, nodgconst(v, types[TVLONG])); |
44 return p; | 44 return p; |
45 } | 45 } |
46 | 46 |
47 void | 47 void |
48 noretval(int n) | 48 noretval(int n) |
49 { | 49 { |
(...skipping 424 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 } |
OLD | NEW |