Replace badd/uind with vector

vector instruction now used for array referencing.  I had overlooked it.
Also, minor cleanup.
This commit is contained in:
rswier
2016-03-18 01:33:47 -04:00
parent b8b1ac5d95
commit c35b1e2add
2 changed files with 6 additions and 8 deletions
+3 -4
View File
@@ -53,7 +53,7 @@ xflush() {
#define flush xflush
main(int argc, char **argv) {
extern symtab[], eof, *ns, nerror;
extern symtab[], eof, *ns;
extern fin, fout;
if (argc > 1) {
@@ -77,7 +77,7 @@ main(int argc, char **argv) {
}
int *lookup() {
extern symtab[], symbuf[], eof, *ns, nerror;
extern symtab[], symbuf[], eof, *ns;
auto *np, *sp, *rp;
rp = symtab;
@@ -415,8 +415,7 @@ loop:
expr(15);
if (symbol() != 5)
error('[]');
gen('b',12); /* badd */
gen('u',3); /* uind */
gen('n',4); /* vector */
goto loop;
}
if (o==6) { /* ( */