LEFT | RIGHT |
(no file at all) | |
1 // Inferno utils/5c/txt.c | 1 // Inferno utils/5c/txt.c |
2 // http://code.google.com/p/inferno-os/source/browse/utils/5c/txt.c | 2 // http://code.google.com/p/inferno-os/source/browse/utils/5c/txt.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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 *n = *nodsafe; | 393 *n = *nodsafe; |
394 n->xoffset = -(stkoff + cursafe); | 394 n->xoffset = -(stkoff + cursafe); |
395 n->type = nn->type; | 395 n->type = nn->type; |
396 n->etype = nn->type->etype; | 396 n->etype = nn->type->etype; |
397 n->lineno = nn->lineno; | 397 n->lineno = nn->lineno; |
398 } | 398 } |
399 | 399 |
400 void | 400 void |
401 regaalloc1(Node *n, Node *nn) | 401 regaalloc1(Node *n, Node *nn) |
402 { | 402 { |
| 403 if(REGARG < 0) { |
| 404 fatal(n, "regaalloc1 and REGARG<0"); |
| 405 return; |
| 406 } |
403 nodreg(n, nn, REGARG); | 407 nodreg(n, nn, REGARG); |
404 reg[REGARG]++; | 408 reg[REGARG]++; |
405 curarg = align(curarg, nn->type, Aarg1, nil); | 409 curarg = align(curarg, nn->type, Aarg1, nil); |
406 curarg = align(curarg, nn->type, Aarg2, nil); | 410 curarg = align(curarg, nn->type, Aarg2, nil); |
407 maxargsafe = maxround(maxargsafe, cursafe+curarg); | 411 maxargsafe = maxround(maxargsafe, cursafe+curarg); |
408 } | 412 } |
409 | 413 |
410 void | 414 void |
411 regaalloc(Node *n, Node *nn) | 415 regaalloc(Node *n, Node *nn) |
412 { | 416 { |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 BFLOAT, /* [TFLOAT] */ | 1307 BFLOAT, /* [TFLOAT] */ |
1304 BDOUBLE, /* [TDOUBLE] */ | 1308 BDOUBLE, /* [TDOUBLE] */ |
1305 BLONG|BULONG|BIND, /* [TIND] */ | 1309 BLONG|BULONG|BIND, /* [TIND] */ |
1306 0, /* [TFUNC] */ | 1310 0, /* [TFUNC] */ |
1307 0, /* [TARRAY] */ | 1311 0, /* [TARRAY] */ |
1308 0, /* [TVOID] */ | 1312 0, /* [TVOID] */ |
1309 BSTRUCT, /* [TSTRUCT] */ | 1313 BSTRUCT, /* [TSTRUCT] */ |
1310 BUNION, /* [TUNION] */ | 1314 BUNION, /* [TUNION] */ |
1311 0, /* [TENUM] */ | 1315 0, /* [TENUM] */ |
1312 }; | 1316 }; |
LEFT | RIGHT |