OLD | NEW |
1 // Inferno utils/8l/pass.c | 1 // Inferno utils/8l/pass.c |
2 // http://code.google.com/p/inferno-os/source/browse/utils/8l/pass.c | 2 // http://code.google.com/p/inferno-os/source/browse/utils/8l/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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 for(cursym = textp; cursym != nil; cursym = cursym->next) { | 407 for(cursym = textp; cursym != nil; cursym = cursym->next) { |
408 if(cursym->text == nil || cursym->text->link == nil) | 408 if(cursym->text == nil || cursym->text->link == nil) |
409 continue; | 409 continue; |
410 | 410 |
411 p = cursym->text; | 411 p = cursym->text; |
412 autoffset = p->to.offset; | 412 autoffset = p->to.offset; |
413 if(autoffset < 0) | 413 if(autoffset < 0) |
414 autoffset = 0; | 414 autoffset = 0; |
415 | 415 |
416 q = P; | 416 q = P; |
417 q1 = P; | |
418 if(pmorestack != P) | 417 if(pmorestack != P) |
419 if(!(p->from.scale & NOSPLIT)) { | 418 if(!(p->from.scale & NOSPLIT)) { |
420 p = appendp(p); // load g into CX | 419 p = appendp(p); // load g into CX |
421 switch(HEADTYPE) { | 420 switch(HEADTYPE) { |
422 case Hwindows: | 421 case Hwindows: |
423 p->as = AMOVL; | 422 p->as = AMOVL; |
424 p->from.type = D_INDIR+D_FS; | 423 p->from.type = D_INDIR+D_FS; |
425 p->from.offset = 0x2c; | 424 p->from.offset = 0x2c; |
426 p->to.type = D_CX; | 425 p->to.type = D_CX; |
427 | 426 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 } else | 648 } else |
650 while(*s >= '0' && *s <= '7') | 649 while(*s >= '0' && *s <= '7') |
651 n = n*8 + *s++ - '0'; | 650 n = n*8 + *s++ - '0'; |
652 } else | 651 } else |
653 while(*s >= '0' && *s <= '9') | 652 while(*s >= '0' && *s <= '9') |
654 n = n*10 + *s++ - '0'; | 653 n = n*10 + *s++ - '0'; |
655 if(f) | 654 if(f) |
656 n = -n; | 655 n = -n; |
657 return n; | 656 return n; |
658 } | 657 } |
OLD | NEW |