LEFT | RIGHT |
(no file at all) | |
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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 } | 831 } |
832 | 832 |
833 /* | 833 /* |
834 * direct reference, | 834 * direct reference, |
835 * could be set/use depending on | 835 * could be set/use depending on |
836 * semantics | 836 * semantics |
837 */ | 837 */ |
838 static int | 838 static int |
839 copyas(Adr *a, Adr *v) | 839 copyas(Adr *a, Adr *v) |
840 { | 840 { |
| 841 if(D_AL <= a->type && a->type <= D_R15B) |
| 842 fatal("use of byte register"); |
| 843 if(D_AL <= v->type && v->type <= D_R15B) |
| 844 fatal("use of byte register"); |
| 845 |
841 if(a->type != v->type) | 846 if(a->type != v->type) |
842 return 0; | 847 return 0; |
843 if(regtyp(v)) | 848 if(regtyp(v)) |
844 return 1; | 849 return 1; |
845 if(v->type == D_AUTO || v->type == D_PARAM) | 850 if(v->type == D_AUTO || v->type == D_PARAM) |
846 if(v->offset == a->offset) | 851 if(v->offset == a->offset) |
847 return 1; | 852 return 1; |
848 return 0; | 853 return 0; |
849 } | 854 } |
850 | 855 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 a->type == D_INDIR + reg->type && | 981 a->type == D_INDIR + reg->type && |
977 a->index == D_NONE && | 982 a->index == D_NONE && |
978 0 <= a->offset && a->offset < 4096; | 983 0 <= a->offset && a->offset < 4096; |
979 } | 984 } |
980 | 985 |
981 int | 986 int |
982 stackaddr(Addr *a) | 987 stackaddr(Addr *a) |
983 { | 988 { |
984 return regtyp(a) && a->type == D_SP; | 989 return regtyp(a) && a->type == D_SP; |
985 } | 990 } |
LEFT | RIGHT |