projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4 release
[unix-history]
/
usr
/
src
/
cmd
/
pi
/
gen.c
diff --git
a/usr/src/cmd/pi/gen.c
b/usr/src/cmd/pi/gen.c
index
957d5e9
..
21c07d7
100644
(file)
--- a/
usr/src/cmd/pi/gen.c
+++ b/
usr/src/cmd/pi/gen.c
@@
-1,16
+1,16
@@
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-#
-/*
- * pi - Pascal interpreter code translator
- *
- * Charles Haley, Bill Joy UCB
- * Version 1.2 November 1978
- */
-#include "whoami"
+static char sccsid[] = "@(#)gen.c 1.1 8/27/80";
+
+#include "whoami.h"
+#ifdef OBJ
+ /*
+ * and the rest of the file
+ */
#include "0.h"
#include "tree.h"
#include "opcode.h"
#include "0.h"
#include "tree.h"
#include "opcode.h"
+#include "objfmt.h"
/*
* This array tells the type
/*
* This array tells the type
@@
-194,21
+194,23
@@
gen(p, o, w1, w2)
}
op = arop[o];
if (op == O_REL2) {
}
op = arop[o];
if (op == O_REL2) {
- put1((op + reltab[i]) | (o - T_EQ) <<
9
);
+ put1((op + reltab[i]) | (o - T_EQ) <<
8+INDX
);
return (nl+TBOOL);
}
put1(i == 15 ? ar8op[o-T_DIVD] : op | artab[i]);
return (op == O_DVD2 && !divchk ? nl+TDOUBLE : nl+arret[i]);
return (nl+TBOOL);
}
put1(i == 15 ? ar8op[o-T_DIVD] : op | artab[i]);
return (op == O_DVD2 && !divchk ? nl+TDOUBLE : nl+arret[i]);
+ case TREC:
case TSTR:
case TSTR:
- put2(O_RELG | (o - T_EQ) <<
9
, w1);
+ put2(O_RELG | (o - T_EQ) <<
8+INDX
, w1);
return (nl+TBOOL);
case TSET:
op = setop[o-T_MULT];
if (op == O_RELT)
return (nl+TBOOL);
case TSET:
op = setop[o-T_MULT];
if (op == O_RELT)
- op |= (o - T_EQ)<<
9
;
+ op |= (o - T_EQ)<<
8+INDX
;
put2(op, w1);
return (o >= T_EQ ? nl+TBOOL : nl+TSET);
default:
panic("gen");
}
}
put2(op, w1);
return (o >= T_EQ ? nl+TBOOL : nl+TSET);
default:
panic("gen");
}
}
+#endif OBJ