OLD | NEW |
1 // Derived from Inferno utils/6c/peep.c | 1 // Derived from Inferno utils/6c/peep.c |
2 // http://code.google.com/p/inferno-os/source/browse/utils/6c/peep.c | 2 // http://code.google.com/p/inferno-os/source/browse/utils/6c/peep.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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 break; | 529 break; |
530 case AXORB: | 530 case AXORB: |
531 case AXORW: | 531 case AXORW: |
532 p->as = AXORQ; | 532 p->as = AXORQ; |
533 break; | 533 break; |
534 case ASHLB: | 534 case ASHLB: |
535 case ASHLW: | 535 case ASHLW: |
536 p->as = ASHLQ; | 536 p->as = ASHLQ; |
537 break; | 537 break; |
538 } | 538 } |
539 » » » } else { | 539 » » » } else if(p->from.type >= D_NONE) { |
540 » » » » // explicit zero extension | 540 » » » » // explicit zero extension, but don't |
| 541 » » » » // do that if source is a byte register |
| 542 » » » » // (only AH can occur and it's forbidden). |
541 switch(p->as) { | 543 switch(p->as) { |
542 case AMOVB: | 544 case AMOVB: |
543 p->as = AMOVBQZX; | 545 p->as = AMOVBQZX; |
544 break; | 546 break; |
545 case AMOVW: | 547 case AMOVW: |
546 p->as = AMOVWQZX; | 548 p->as = AMOVWQZX; |
547 break; | 549 break; |
548 } | 550 } |
549 } | 551 } |
550 } | 552 } |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 if(p->from.offset == p0->from.offset) | 1304 if(p->from.offset == p0->from.offset) |
1303 if(p->from.scale == p0->from.scale) | 1305 if(p->from.scale == p0->from.scale) |
1304 if(p->from.dval == p0->from.dval) | 1306 if(p->from.dval == p0->from.dval) |
1305 if(p->from.index == p0->from.index) { | 1307 if(p->from.index == p0->from.index) { |
1306 excise(r); | 1308 excise(r); |
1307 goto loop; | 1309 goto loop; |
1308 } | 1310 } |
1309 break; | 1311 break; |
1310 } | 1312 } |
1311 } | 1313 } |
OLD | NEW |