OLD | NEW |
1 // Inferno utils/6l/pass.c | 1 // Inferno utils/6l/pass.c |
2 // http://code.google.com/p/inferno-os/source/browse/utils/6l/pass.c | 2 // http://code.google.com/p/inferno-os/source/browse/utils/6l/pass.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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 // common | 462 // common |
463 p = appendp(p); | 463 p = appendp(p); |
464 p->as = AJHI; | 464 p->as = AJHI; |
465 p->to.type = D_BRANCH; | 465 p->to.type = D_BRANCH; |
466 p->to.offset = 4; | 466 p->to.offset = 4; |
467 q = p; | 467 q = p; |
468 } | 468 } |
469 | 469 |
470 /* 160 comes from 3 calls (3*8) 4 safes (4*8) and 104 gu
ard */ | 470 /* 160 comes from 3 calls (3*8) 4 safes (4*8) and 104 gu
ard */ |
471 moreconst1 = 0; | 471 moreconst1 = 0; |
472 » » » if(autoffset+160 > 4096) | 472 » » » if(autoffset+160+textarg > 4096) |
473 moreconst1 = (autoffset+160) & ~7LL; | 473 moreconst1 = (autoffset+160) & ~7LL; |
474 moreconst2 = textarg; | 474 moreconst2 = textarg; |
475 | 475 |
476 // 4 varieties varieties (const1==0 cross const2==0) | 476 // 4 varieties varieties (const1==0 cross const2==0) |
477 // and 6 subvarieties of (const1==0 and const2!=0) | 477 // and 6 subvarieties of (const1==0 and const2!=0) |
478 p = appendp(p); | 478 p = appendp(p); |
479 if(moreconst1 == 0 && moreconst2 == 0) { | 479 if(moreconst1 == 0 && moreconst2 == 0) { |
480 p->as = ACALL; | 480 p->as = ACALL; |
481 p->to.type = D_BRANCH; | 481 p->to.type = D_BRANCH; |
482 p->pcond = pmorestack[0]; | 482 p->pcond = pmorestack[0]; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 undef(void) | 687 undef(void) |
688 { | 688 { |
689 int i; | 689 int i; |
690 Sym *s; | 690 Sym *s; |
691 | 691 |
692 for(i=0; i<NHASH; i++) | 692 for(i=0; i<NHASH; i++) |
693 for(s = hash[i]; s != S; s = s->hash) | 693 for(s = hash[i]; s != S; s = s->hash) |
694 if(s->type == SXREF) | 694 if(s->type == SXREF) |
695 diag("%s: not defined", s->name); | 695 diag("%s: not defined", s->name); |
696 } | 696 } |
OLD | NEW |