unix-history/.git
36 years agoutah rcsid 1.30 87/09/07 20:41:00: Another minor battle in the struggle
Donn Seeley [Fri, 11 Dec 1987 16:39:03 +0000 (08:39 -0800)]
utah rcsid 1.30 87/09/07 20:41:00: Another minor battle in the struggle
between makearg() and float arguments.  This time we kluge the issue and
avoid szty() (which predicts that float values are only 4 bytes when SPRECC
is used).

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.35

36 years agoutah rcsid 1.29 87/08/25 00:05:43: Took care of some bugs in the extension
Donn Seeley [Fri, 11 Dec 1987 16:38:35 +0000 (08:38 -0800)]
utah rcsid 1.29 87/08/25 00:05:43: Took care of some bugs in the extension
of sconv() to handle FORARG evaluations.  Conversion of UCHAR/USHORT to
floating is now handled in sconv() so that ZG can take advantage of it;
this cures a bug with assignment ops with UCHAR/USHORT lhs and floating rhs
which caused the lhs to be treated as signed.  Conversions to FLOAT are now
handled in sconv() too.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.34

36 years agoconversions to insert an INT conversion and thus avoid the expensive and
Donn Seeley [Fri, 11 Dec 1987 16:38:14 +0000 (08:38 -0800)]
conversions to insert an INT conversion and thus avoid the expensive and
redundant UNSIGNED to FLOAT/DOUBLE overhead.  (7) Delete INT to UNSIGNED
and reverse conversions on function calls.  (8) Delete FLOAT to DOUBLE
conversions below logical operators.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.33

36 years agoutah rcsid 1.28 87/08/24 01:55:20: (1) Changed code for ZZ so that we can
Donn Seeley [Fri, 11 Dec 1987 16:38:02 +0000 (08:38 -0800)]
utah rcsid 1.28 87/08/24 01:55:20: (1) Changed code for ZZ so that we can
generate optimal AND tests against constants.  (2) Fixed botch in my
makearg() routine.  (3) Generate 'pushl' instead of 'movl' when working on
FORARG in sconv().  (4) Permitted NAME nodes as possible indexing bases,
using pc relative deferred addressing.  (5) Produce positive bicl masks if
possible, so we can use literals.  (6) Modify UCHAR/USHORT to FLOAT/DOUBLE

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.32

36 years agoutah rcsid 1.27 87/07/17 17:09:50: Cosmetic change to tlen() -- use
Donn Seeley [Fri, 11 Dec 1987 16:37:43 +0000 (08:37 -0800)]
utah rcsid 1.27 87/07/17 17:09:50: Cosmetic change to tlen() -- use
#define'd constants.  Also fix use of local machine 'sizeof (int)' in
zzzcode to #define'd target machine constants.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.31

36 years agoshifts. (6) Add ZV entry in zzzcode() to handle FORARG goals for
Donn Seeley [Fri, 11 Dec 1987 16:37:25 +0000 (08:37 -0800)]
shifts.  (6) Add ZV entry in zzzcode() to handle FORARG goals for
conversions and leaf nodes.  (7) Fix minor bug with ZB entry and unsigned
char/short.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.30

36 years agoutah rcsid 1.26 87/07/17 15:31:14: Some changes to reduce differences with
Donn Seeley [Fri, 11 Dec 1987 16:37:08 +0000 (08:37 -0800)]
utah rcsid 1.26 87/07/17 15:31:14: Some changes to reduce differences with
the tahoe compiler.  (1) #include <ctype.h> not "ctype.h".  (2) Simplify
eobl2(), hopcode() and hoptab[], flshape(), acon(), and cbgen() and
ccbranches[].  (3) Farm out conversion and structure assignment code in
zzzcode() to sconv() and stasg() functions.  (4) Delete lots of
commented-out old code.  (5) Fix bug in optim2() code for degenerate left

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.29

36 years agoutah rcsid 1.25 87/07/07 20:30:32: Permit the ZE code for INCR/DECR in
Donn Seeley [Fri, 11 Dec 1987 16:36:44 +0000 (08:36 -0800)]
utah rcsid 1.25 87/07/07 20:30:32: Permit the ZE code for INCR/DECR in
zzzcode() to take a NAME as its second operand: this permits FLOAT and
DOUBLE operands to be handled, since floating constants are represented by
NAMEs.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.28

36 years agoutah rcsid 1.24 87/07/07 19:37:31: Prevent core dumps in shumul() when
Donn Seeley [Fri, 11 Dec 1987 16:36:19 +0000 (08:36 -0800)]
utah rcsid 1.24 87/07/07 19:37:31: Prevent core dumps in shumul() when
using -x debugging...

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.27

36 years agoutah rcsid 1.23 87/05/31 20:46:39: More work on degenerate operations in
Donn Seeley [Fri, 11 Dec 1987 16:35:56 +0000 (08:35 -0800)]
utah rcsid 1.23 87/05/31 20:46:39: More work on degenerate operations in
optim2() and degenerate().

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.26

36 years agoutah rcsid 1.22 87/05/15 17:03:03: First pass at handling degenerate
Donn Seeley [Fri, 11 Dec 1987 16:35:34 +0000 (08:35 -0800)]
utah rcsid 1.22 87/05/15 17:03:03: First pass at handling degenerate
operations in optim2().  The idea is mainly that we can avoid some table
complications by assuming that no degenerate operations dribble down there.
Since I did some degenerate operations, I decided to do a few others so
that some operations aren't outstandingly slow.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.25

36 years agoon a certain amount of tree canonicalization there.
Donn Seeley [Fri, 11 Dec 1987 16:35:10 +0000 (08:35 -0800)]
on a certain amount of tree canonicalization there.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.24

36 years agoutah rcsid 1.21 87/04/24 19:05:37: Optimize comparisons with constants
Donn Seeley [Fri, 11 Dec 1987 16:34:56 +0000 (08:34 -0800)]
utah rcsid 1.21 87/04/24 19:05:37: Optimize comparisons with constants
which are out of range of short integral types.  The purpose of this was
mainly to handle a problem in the code table -- it's hard to generate the
best code for short comparisons unless you know that the ridiculous cases
have been taken care of.  The optimization could have gone in either
clocal() or optim2(); the latter seemed more reasonable since I could count

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.23

36 years agoutah rcsid 1.20 87/04/19 23:47:13: Add support for handling unsigned div
Donn Seeley [Fri, 11 Dec 1987 16:34:32 +0000 (08:34 -0800)]
utah rcsid 1.20 87/04/19 23:47:13: Add support for handling unsigned div
and rem inline when the divisor is a constant: (1) ZJ template escape for
stuff that's too complex for the table; (2) a real version of upput() which
lets the table access both words of the 64-bit dividend operand of the ediv
instruction; (3) a hack to hardops() to detect constant divisors -- it
handles the easiest case and passes everything else to the table.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.22

36 years agoutah rcsid 1.19 87/03/18 00:02:55: The earlier rewrite of shtemp() left the
Donn Seeley [Fri, 11 Dec 1987 16:34:07 +0000 (08:34 -0800)]
utah rcsid 1.19 87/03/18 00:02:55: The earlier rewrite of shtemp() left the
code for STARNM forms commented out for some reason...

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.21

36 years agoutah rcsid 1.18 87/02/08 22:50:12: Replaced shtemp() routine -- shtemp() is
Donn Seeley [Fri, 11 Dec 1987 16:33:43 +0000 (08:33 -0800)]
utah rcsid 1.18 87/02/08 22:50:12: Replaced shtemp() routine -- shtemp() is
supposed to find leaf nodes which don't use any temporary registers, and
the old version didn't do that well.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.20

36 years agoutah rcsid 1.17 87/01/16 02:45:01: Permit nonpositive offsets from the
Donn Seeley [Fri, 11 Dec 1987 16:33:22 +0000 (08:33 -0800)]
utah rcsid 1.17 87/01/16 02:45:01: Permit nonpositive offsets from the
argument pointer for excessively clever program which want to recover funny
stuff on the stack.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.19

36 years agoutah rcsid 1.16 87/01/15 01:36:58: Changed optim2()'s SCONV optimization
Donn Seeley [Fri, 11 Dec 1987 16:32:53 +0000 (08:32 -0800)]
utah rcsid 1.16 87/01/15 01:36:58: Changed optim2()'s SCONV optimization
code to avoid screwing up function types.  Also some minor lint fixes.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.18

36 years agoutah rcsid 1.15 86/11/27 20:26:18: update to ucb sid 1.15 -- upput calling
Donn Seeley [Fri, 11 Dec 1987 16:32:28 +0000 (08:32 -0800)]
utah rcsid 1.15 86/11/27 20:26:18: update to ucb sid 1.15 -- upput calling
sequence changes (sam).  Added a couple /*ARGSUSED*/ lint directives;
probably a lost cause.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.17

36 years agoutah rcsid 1.14 86/06/18 14:35:25: The idea of converting ASSIGN+SCONV into
Donn Seeley [Fri, 11 Dec 1987 16:32:07 +0000 (08:32 -0800)]
utah rcsid 1.14 86/06/18 14:35:25: The idea of converting ASSIGN+SCONV into
ASSIGN with modified types was cute, but unfortunately certain varieties of
ASSIGN are not supported -- in particular double => bit field.  We chicken
out and leave bitfields alone.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.16

36 years agoutah rcsid 1.10 87/11/26 16:26:36: Delete isitfloat() -- make float
Donn Seeley [Fri, 11 Dec 1987 16:25:38 +0000 (08:25 -0800)]
utah rcsid 1.10 87/11/26 16:26:36: Delete isitfloat() -- make float
constants predictable and ANSI compatible.

SCCS-vsn: old/pcc/ccom.vax/local.c 1.16

36 years agoutah rcsid 1.9 87/08/24 01:48:41: Preserve FLOAT to DOUBLE conversions --
Donn Seeley [Fri, 11 Dec 1987 16:25:27 +0000 (08:25 -0800)]
utah rcsid 1.9 87/08/24 01:48:41: Preserve FLOAT to DOUBLE conversions --
on balance this seems to save some trouble down the line.

SCCS-vsn: old/pcc/ccom.vax/local.c 1.15

36 years agoutah rcsid 1.8 87/07/17 17:09:10: Cosmetic change to tlen() -- use
Donn Seeley [Fri, 11 Dec 1987 16:25:16 +0000 (08:25 -0800)]
utah rcsid 1.8 87/07/17 17:09:10: Cosmetic change to tlen() -- use
#define'd constants.

SCCS-vsn: old/pcc/ccom.vax/local.c 1.14

36 years agoutah rcsid 1.7 87/07/14 20:27:12: A problem with the new clocal conversion
Donn Seeley [Fri, 11 Dec 1987 16:25:08 +0000 (08:25 -0800)]
utah rcsid 1.7 87/07/14 20:27:12: A problem with the new clocal conversion
code -- in double-only floating arithmetic, delete all float to double
conversions (reclaim and the table will handle them).

SCCS-vsn: old/pcc/ccom.vax/local.c 1.13

36 years ago(6) 'word' has type CONSZ; adjusted printf()s accordingly. (7) Added
Donn Seeley [Fri, 11 Dec 1987 16:24:58 +0000 (08:24 -0800)]
(6) 'word' has type CONSZ; adjusted printf()s accordingly.  (7) Added
private prtdcon() routine; just like standard one but substitutes INT 0 for
floating so that the code table can use 'clrd'.

SCCS-vsn: old/pcc/ccom.vax/local.c 1.12

36 years agoutah rcsid 1.6 87/07/11 21:50:58: Several fixes/enhancements from Sam
Donn Seeley [Fri, 11 Dec 1987 16:24:52 +0000 (08:24 -0800)]
utah rcsid 1.6 87/07/11 21:50:58: Several fixes/enhancements from Sam
Leffler's tahoe compiler.  (1) Delete redundant cast() and isitlong()
functions.  (2) Make argument p to clocal() have class register (speed).
(3) Use unsigned comparisons with pointers.  (4) Greatly clean up
conversion code in clocal(); I made some changes of my own here.  (5)
Pretend fields have INT or UNSIGNED type, not UCHAR or CHAR, in clocal().

SCCS-vsn: old/pcc/ccom.vax/local.c 1.11

36 years agoutah rcsid 1.5 86/11/28 21:33:38: Added some ARGSUSED comments. Perhaps
Donn Seeley [Fri, 11 Dec 1987 16:24:42 +0000 (08:24 -0800)]
utah rcsid 1.5 86/11/28 21:33:38: Added some ARGSUSED comments.  Perhaps
isitlong() ought to have just one parameter anyway?  So it goes.

SCCS-vsn: old/pcc/ccom.vax/local.c 1.10

36 years agoutah rcsid 1.4 86/08/03 01:00:36: Don't generate code after errors.
Donn Seeley [Fri, 11 Dec 1987 16:24:31 +0000 (08:24 -0800)]
utah rcsid 1.4 86/08/03 01:00:36: Don't generate code after errors.

SCCS-vsn: old/pcc/ccom.vax/local.c 1.9

36 years agoutah rcsid 1.7 87/07/17 17:30:26: Some fixes from the tahoe compiler. (1)
Donn Seeley [Fri, 11 Dec 1987 16:18:29 +0000 (08:18 -0800)]
utah rcsid 1.7 87/07/17 17:30:26: Some fixes from the tahoe compiler.  (1)
Fix 'sizeof (int)' to SZINT/SZCHAR.  (2) Don't call toreg() unless we've
fixed the bugs with register chars.  (3) Sort the toreg() table by
frequency (if we ever do call it, it'll be faster!).

SCCS-vsn: old/pcc/ccom.vax/code.c 1.9

36 years agoutah rcsid 1.6 87/01/15 01:35:32: Some minor lint fixes.
Donn Seeley [Fri, 11 Dec 1987 16:18:18 +0000 (08:18 -0800)]
utah rcsid 1.6 87/01/15 01:35:32: Some minor lint fixes.

SCCS-vsn: old/pcc/ccom.vax/code.c 1.8

36 years agoutah rcsid 1.5 86/11/28 21:29:44: Add some ARGSUSED comments to shut lint
Donn Seeley [Fri, 11 Dec 1987 16:18:11 +0000 (08:18 -0800)]
utah rcsid 1.5 86/11/28 21:29:44: Add some ARGSUSED comments to shut lint
up.

SCCS-vsn: old/pcc/ccom.vax/code.c 1.7

36 years agoutah rcsid 1.4 86/08/03 00:59:14: Speed hacks -- turn some routines into
Donn Seeley [Fri, 11 Dec 1987 16:18:02 +0000 (08:18 -0800)]
utah rcsid 1.4 86/08/03 00:59:14: Speed hacks -- turn some routines into
macros, don't generate any code after an error.

SCCS-vsn: old/pcc/ccom.vax/code.c 1.6

36 years agoutah rcsid 1.5 86/08/03 00:58:14: Move configuration flags to macdefs.h.
Donn Seeley [Fri, 11 Dec 1987 16:15:54 +0000 (08:15 -0800)]
utah rcsid 1.5 86/08/03 00:58:14: Move configuration flags to macdefs.h.
utah rcsid 1.7 87/01/15 01:34:57: Make 'lintall' entry more reasonable.
utah rcsid 1.8 87/07/07 21:08:55: Move localdefs.h upstairs so that
lint can get at it.

SCCS-vsn: old/pcc/ccom.vax/Makefile 1.17

36 years agocomment decribing how p_cpu decay is computed (with help from shannon)
Kirk McKusick [Fri, 11 Dec 1987 16:13:44 +0000 (08:13 -0800)]
comment decribing how p_cpu decay is computed (with help from shannon)

SCCS-vsn: sys/kern/kern_synch.c 7.6

36 years agoutah rcsid 1.5 87/12/11 00:28:45: Move localdefs.h upstairs so that
Donn Seeley [Fri, 11 Dec 1987 15:36:59 +0000 (07:36 -0800)]
utah rcsid 1.5 87/12/11 00:28:45: Move localdefs.h upstairs so that
lint can get at it.

SCCS-vsn: old/pcc/ccom.tahoe/Makefile 1.8

36 years agoutah rcsid 1.8 87/12/10 20:24:11: A fix analogous to the fix from Jim McKie
Donn Seeley [Fri, 11 Dec 1987 15:25:13 +0000 (07:25 -0800)]
utah rcsid 1.8 87/12/10 20:24:11: A fix analogous to the fix from Jim McKie
for the vax -- add implicit float to double conversion for fortran
comparisons.

SCCS-vsn: old/pcc/ccom.tahoe/table.c 1.14

36 years agoDIV, MOD, ASG DIV, ASG MOD templates with new stuff derived from vax table.
Donn Seeley [Fri, 11 Dec 1987 15:25:05 +0000 (07:25 -0800)]
DIV, MOD, ASG DIV, ASG MOD templates with new stuff derived from vax table.
(12) Delete MUL and ASG MUL oddities; can't see what use they are.  (13)
Fold some MUL templates.  (14) Simplify ASG PLUS and ASG MINUS if REG_CHAR
is not enabled.  (15) Add templates for mixed float/double assignment ops.

SCCS-vsn: old/pcc/ccom.tahoe/table.c 1.13

36 years agochar/short equality/inequality between a memory operand and a constant, so
Donn Seeley [Fri, 11 Dec 1987 15:25:00 +0000 (07:25 -0800)]
char/short equality/inequality between a memory operand and a constant, so
we cull these out.  (6) Fold some INCR and DECR templates together.  (7)
Move the most frequently used ASSIGN template to the top.  (8) Sigh -- add
several ASSIGN templates to handle various combinations with float and
double.  (9) Delete redundant SIREG template for OPLTYPE doubles.  (10)
Properly handle complements of unsigned char and short.  (11)  Replace old

SCCS-vsn: old/pcc/ccom.tahoe/table.c 1.12

36 years agoutah rcsid 1.7 87/11/29 20:51:53: (1) We don't need the first PCONV
Donn Seeley [Fri, 11 Dec 1987 15:24:50 +0000 (07:24 -0800)]
utah rcsid 1.7 87/11/29 20:51:53: (1) We don't need the first PCONV
templates if we don't have REG_CHAR.  (2) Take care of redundant
conversions introduced by reclaim().  (3) Move frequently used SCONV
templates to the top; fold some mutually redundant SCONV templates
together.  (4) If only Fortran uses these GOTO templates, don't compile
them if we don't need them.  (5) Ack -- tahoe won't handle unsigned

SCCS-vsn: old/pcc/ccom.tahoe/table.c 1.11

36 years agoutah rcsid 1.6 87/05/02 15:48:47: A much cheaper way to get the value of a
Donn Seeley [Fri, 11 Dec 1987 15:24:37 +0000 (07:24 -0800)]
utah rcsid 1.6 87/05/02 15:48:47: A much cheaper way to get the value of a
bitfield assignment -- call zzzcode().

SCCS-vsn: old/pcc/ccom.tahoe/table.c 1.10

36 years agoutah rcsid 1.5 87/04/18 01:43:18: Extensive hacking to weed out bugs in
Donn Seeley [Fri, 11 Dec 1987 15:24:25 +0000 (07:24 -0800)]
utah rcsid 1.5 87/04/18 01:43:18: Extensive hacking to weed out bugs in
unsigned/float and float/unsigned conversions.  Unbalanced assignments are
now handled the same way as conversions.

SCCS-vsn: old/pcc/ccom.tahoe/table.c 1.9

36 years agoutah rcsid 1.4 87/04/17 03:57:21: The value of a bitfield assignment is the
Donn Seeley [Fri, 11 Dec 1987 15:24:13 +0000 (07:24 -0800)]
utah rcsid 1.4 87/04/17 03:57:21: The value of a bitfield assignment is the
bitfield, not the rhs.  (Lucky thing we didn't implement signed bitfields
on the tahoe...)

SCCS-vsn: old/pcc/ccom.tahoe/table.c 1.8

36 years agoutah rcsid 1.3 87/03/23 04:38:33: Add zzzcode calls for unsigned => double,
Donn Seeley [Fri, 11 Dec 1987 15:23:57 +0000 (07:23 -0800)]
utah rcsid 1.3 87/03/23 04:38:33: Add zzzcode calls for unsigned => double,
double => unsigned and i *= f.

SCCS-vsn: old/pcc/ccom.tahoe/table.c 1.7

36 years agoutah rcsid 1.2 87/03/18 02:21:30: Extend sconv() usage to integer
Donn Seeley [Fri, 11 Dec 1987 15:23:42 +0000 (07:23 -0800)]
utah rcsid 1.2 87/03/18 02:21:30: Extend sconv() usage to integer
assignments and OPLEAF promotions as well as to conversions; add tab and
newline to SCONV use of ZU and ZV; split special comparison entries for
TCHAR/TUCHAR and TSHORT/TUSHORT so that integer promotions are performed
when the signedness of the operands differs.

SCCS-vsn: old/pcc/ccom.tahoe/table.c 1.6

36 years agoutah rcsid 1.3 87/01/15 01:40:28: Fixed bug in outstruct() which caused it
Donn Seeley [Fri, 11 Dec 1987 15:19:06 +0000 (07:19 -0800)]
utah rcsid 1.3 87/01/15 01:40:28: Fixed bug in outstruct() which caused it
to refer to stab[-1] when dealing with unnamed structures.  Also some minor
lint fixes.

SCCS-vsn: old/pcc/ccom.tahoe/stab.c 1.6

36 years agoutah rcsid 1.2 86/03/27 20:50:15: A problem with dbx and pointers to arrays
Donn Seeley [Fri, 11 Dec 1987 15:18:54 +0000 (07:18 -0800)]
utah rcsid 1.2 86/03/27 20:50:15: A problem with dbx and pointers to arrays
was fixed -- if the outermost type of an object was not an array, then when
the compiler tried to generate the subscript range for the array it got
confused and used the range of the most recently declared array instead of
the one it wanted.

SCCS-vsn: old/pcc/ccom.tahoe/stab.c 1.5

36 years agoutah rcsid 1.4 87/11/29 20:23:26: Fix a syntax error in sucomp() (sigh...).
Donn Seeley [Fri, 11 Dec 1987 15:08:42 +0000 (07:08 -0800)]
utah rcsid 1.4 87/11/29 20:23:26: Fix a syntax error in sucomp() (sigh...).

SCCS-vsn: old/pcc/ccom.tahoe/order.c 1.5

36 years agoutah rcsid 1.3 87/07/19 19:48:42: Minor bug fixes and enhancements from the
Donn Seeley [Fri, 11 Dec 1987 15:08:32 +0000 (07:08 -0800)]
utah rcsid 1.3 87/07/19 19:48:42: Minor bug fixes and enhancements from the
vax compiler.  (1) Add more permitted types for in-memory objects in
sucomp().  (2) Delete redundant SCONV case in sucomp().  (3) Replace sizeof
(int) with SZINT/SCHAR.  (4) Fix bug in call to offstar() in setincr().
(5) Add lint food.

SCCS-vsn: old/pcc/ccom.tahoe/order.c 1.4

36 years agoutah rcsid 1.2 87/05/02 14:40:36: Permit deflab() to be a macro; bump the
Donn Seeley [Fri, 11 Dec 1987 15:08:19 +0000 (07:08 -0800)]
utah rcsid 1.2 87/05/02 14:40:36: Permit deflab() to be a macro; bump the
starting value of crslab so that huge sources don't run out of labels; add
some ARGSUSED lint tidbits.

SCCS-vsn: old/pcc/ccom.tahoe/order.c 1.3

36 years agoutah rcsid 1.3 87/12/10 20:25:17: Move SPRECC from Makefile to macdefs.h;
Donn Seeley [Fri, 11 Dec 1987 15:05:16 +0000 (07:05 -0800)]
utah rcsid 1.3 87/12/10 20:25:17: Move SPRECC from Makefile to macdefs.h;
the tahoe pcc doesn't do the old-style double-only floating arithmetic.

SCCS-vsn: old/pcc/ccom.tahoe/macdefs.h 1.5

36 years agoutah rcsid 1.2 87/05/02 14:42:38: Turn some trivial functions into macros;
Donn Seeley [Fri, 11 Dec 1987 15:05:08 +0000 (07:05 -0800)]
utah rcsid 1.2 87/05/02 14:42:38: Turn some trivial functions into macros;
move Makefile CONFIG flags in here; add a comment to ADDROREG.

SCCS-vsn: old/pcc/ccom.tahoe/macdefs.h 1.4

36 years agoutah rcsid 1.17 87/12/10 21:53:05: fix code for passing structures to
Donn Seeley [Fri, 11 Dec 1987 14:57:50 +0000 (06:57 -0800)]
utah rcsid 1.17 87/12/10 21:53:05: fix code for passing structures to
subroutines (4.3BSD/lib/66) from mcvax!cwi.nl!root@seismo.css.gov (Ed
Gronke)

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.28

36 years agodouble conversions below logical operators, leftovers from the first pass.
Donn Seeley [Fri, 11 Dec 1987 14:57:30 +0000 (06:57 -0800)]
double conversions below logical operators, leftovers from the first pass.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.27

36 years agobase() to permit indexed displacement deferred addressing. (7) Put
Donn Seeley [Fri, 11 Dec 1987 14:57:16 +0000 (06:57 -0800)]
base() to permit indexed displacement deferred addressing.  (7) Put
special() back -- SIREG is useful after all.  (8) Change optim2() to reduce
the range of constant operands to +=, -=, *=, |=, &= and &, and so take
advantage of byte and word arithmetic.  (9) Optimize ASG AND like unsigned
AND since sign extension is not a problem for small lhs.  (10) Optimize
int/unsigned SCONVs above function calls.  (11) Take care of float to

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.26

36 years agoutah rcsid 1.16 87/11/29 20:59:25: (1) Don't put temporary registers into
Donn Seeley [Fri, 11 Dec 1987 14:56:55 +0000 (06:56 -0800)]
utah rcsid 1.16 87/11/29 20:59:25: (1) Don't put temporary registers into
the entry mask in rname().  (2) Simplify ZM macro in zzzcode() for new ediv
templates.  (3) Tahoe has byte and word operands, so MNEGx is only shorter
for the 'literal' addressing mode, which is unsigned; sconv() changed
appropriately.  (4) Print decimal rather than hex masks in sconv().  (5)
Fix sconv() botch with rules for when to pun a source operand.  (6) Change

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.25

36 years agoutah rcsid 1.15 87/07/19 22:46:18: First attack at integrating recent VAX
Donn Seeley [Fri, 11 Dec 1987 14:56:25 +0000 (06:56 -0800)]
utah rcsid 1.15 87/07/19 22:46:18: First attack at integrating recent VAX
fixes...  Too many to list at once.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.24

36 years agoutah rcsid 1.14 87/05/03 21:29:03: Add code from VAX compiler for detecting
Donn Seeley [Fri, 11 Dec 1987 14:56:06 +0000 (06:56 -0800)]
utah rcsid 1.14 87/05/03 21:29:03: Add code from VAX compiler for detecting
ridiculous comparisons between small variables and large constants.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.23

36 years agoutah rcsid 1.13 87/05/02 15:50:50: Add ZI feature -- generate result of
Donn Seeley [Fri, 11 Dec 1987 14:55:45 +0000 (06:55 -0800)]
utah rcsid 1.13 87/05/02 15:50:50: Add ZI feature -- generate result of
bitfield assignment without using a shift.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.22

36 years agoutah rcsid 1.12 87/05/02 13:58:32: Don't delete double => int conversions
Donn Seeley [Fri, 11 Dec 1987 14:55:25 +0000 (06:55 -0800)]
utah rcsid 1.12 87/05/02 13:58:32: Don't delete double => int conversions
on the rhs of assignments to bit fields; we don't want to write double =>
bitfield templates...

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.21

36 years agoutah rcsid 1.11 87/05/01 18:43:57: 'mnegl $1,r0' is one byte shorter than
Donn Seeley [Fri, 11 Dec 1987 14:55:02 +0000 (06:55 -0800)]
utah rcsid 1.11 87/05/01 18:43:57: 'mnegl $1,r0' is one byte shorter than
'movl $-1,r0', so we make an effort to detect negative constant sources in
sconv().  Note that MNEGx is no slower than MOVx in the general case where
the source won't fit in a short literal operand.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.20

36 years agoutah rcsid 1.10 87/04/18 18:20:15: Another screwup -- must distinguish
Donn Seeley [Fri, 11 Dec 1987 14:54:40 +0000 (06:54 -0800)]
utah rcsid 1.10 87/04/18 18:20:15: Another screwup -- must distinguish
constant addresses from constant values in the conversion code.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.19

36 years agoutah rcsid 1.9 87/04/18 02:27:10: Fix a stupid mistake in the previous
Donn Seeley [Fri, 11 Dec 1987 14:54:20 +0000 (06:54 -0800)]
utah rcsid 1.9 87/04/18 02:27:10: Fix a stupid mistake in the previous
rev...

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.18

36 years agoutah rcsid 1.8 87/04/18 01:42:25: Extensive hacking to weed out bugs in
Donn Seeley [Fri, 11 Dec 1987 14:53:56 +0000 (06:53 -0800)]
utah rcsid 1.8 87/04/18 01:42:25: Extensive hacking to weed out bugs in
unsigned/float and float/unsigned conversions.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.17

36 years agoutah rcsid 1.7 87/04/17 03:32:04: Don't zap conversions of function calls
Donn Seeley [Fri, 11 Dec 1987 14:53:35 +0000 (06:53 -0800)]
utah rcsid 1.7 87/04/17 03:32:04: Don't zap conversions of function calls
-- the result of a call isn't quite the type it appears to be.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.16

36 years agoutah rcsid 1.6 87/04/16 23:32:35: Replaced hardops() with VAX PCC version
Donn Seeley [Fri, 11 Dec 1987 14:53:13 +0000 (06:53 -0800)]
utah rcsid 1.6 87/04/16 23:32:35: Replaced hardops() with VAX PCC version
-- fix bugs with computing unsigned remainder when divisor is > 2**31,
multiple evaluation of lhs with asgops.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.15

36 years agoutah rcsid 1.5 87/03/23 04:40:10: Add 'G' zzzcode entry for int *= float
Donn Seeley [Fri, 11 Dec 1987 14:52:51 +0000 (06:52 -0800)]
utah rcsid 1.5 87/03/23 04:40:10: Add 'G' zzzcode entry for int *= float
operations.  Added 'W' and 'Y' entries and float_to_unsigned() and
unsigned_to_float() functions to deal with these conversions.  Deleted the
'A' entry since its function is now handled by the 'U' entry.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.14

36 years agoutah rcsid 1.4 87/03/20 05:10:31: More work on sconv(). For sign extension
Donn Seeley [Fri, 11 Dec 1987 14:52:30 +0000 (06:52 -0800)]
utah rcsid 1.4 87/03/20 05:10:31: More work on sconv().  For sign extension
in registers we use the stack code because shifts are too slow.  We are
less stupid about constants.  We get register source operand lengths right.
We distinguish between mova[bwl] in memory to register shrinking
conversions so that side effects are handled correctly.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.13

36 years agoutah rcsid 1.3 87/03/18 02:20:29: Delete the old sconv() routine (ifdef'ed
Donn Seeley [Fri, 11 Dec 1987 14:52:07 +0000 (06:52 -0800)]
utah rcsid 1.3 87/03/18 02:20:29: Delete the old sconv() routine (ifdef'ed
out in the previous rev); fix initial tabs (assume that the table provides
them).

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.12

36 years agoutah rcsid 1.2 87/03/16 20:03:49: First crack at fixing integer
Donn Seeley [Fri, 11 Dec 1987 14:51:42 +0000 (06:51 -0800)]
utah rcsid 1.2 87/03/16 20:03:49: First crack at fixing integer
conversions.

SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.11

36 years agotahoe release
Keith Bostic [Fri, 11 Dec 1987 13:21:05 +0000 (05:21 -0800)]
tahoe release

SCCS-vsn: games/Makefile 5.9

36 years agotahoe beta release
Keith Bostic [Fri, 11 Dec 1987 13:20:08 +0000 (05:20 -0800)]
tahoe beta release

SCCS-vsn: games/Makefile 5.9

36 years agoutah rcsid 1.6 87/11/29 20:31:47: Remove isitfloat() -- this was broken,
Donn Seeley [Fri, 11 Dec 1987 12:44:01 +0000 (04:44 -0800)]
utah rcsid 1.6 87/11/29 20:31:47: Remove isitfloat() -- this was broken,
yylex() now handles this properly.  Also delete useless SPRECC ifdef.

SCCS-vsn: old/pcc/ccom.tahoe/local.c 1.10

36 years agoutah rcsid 1.5 87/07/17 19:21:48: (1) Replaced SCONV code in clocal() with
Donn Seeley [Fri, 11 Dec 1987 12:43:53 +0000 (04:43 -0800)]
utah rcsid 1.5 87/07/17 19:21:48: (1) Replaced SCONV code in clocal() with
VAX version.  (2) Deleted the 'float percolation' code in clocal() -- it's
simply wrong.  (3) Deleted the QUEST case in clocal() which hacks around
the funny trees created by the deleted 'float percolation'.  (4) Added 'if
(nerrors) return' to vfdzero().  (5) Changed %X to %lx in incode() and
vfdzero().  (6) Cleaned up some comments, to make this code more easily
diffable with the VAX version.

SCCS-vsn: old/pcc/ccom.tahoe/local.c 1.9

36 years agoutah rcsid 1.4 87/05/02 14:58:59: Stop generating code after errors; add
Donn Seeley [Fri, 11 Dec 1987 12:43:45 +0000 (04:43 -0800)]
utah rcsid 1.4 87/05/02 14:58:59: Stop generating code after errors; add
some lint tidbits.

SCCS-vsn: old/pcc/ccom.tahoe/local.c 1.8

36 years agoutah rcsid 1.3 87/04/17 21:32:02: Oops -- we still want to clobber constant
Donn Seeley [Fri, 11 Dec 1987 12:43:38 +0000 (04:43 -0800)]
utah rcsid 1.3 87/04/17 21:32:02: Oops -- we still want to clobber constant
conversions...

SCCS-vsn: old/pcc/ccom.tahoe/local.c 1.7

36 years agoutah rcsid 1.2 87/04/17 03:31:22: Let optim2() handle conversion
Donn Seeley [Fri, 11 Dec 1987 12:43:31 +0000 (04:43 -0800)]
utah rcsid 1.2 87/04/17 03:31:22: Let optim2() handle conversion
optimizations for variables.

SCCS-vsn: old/pcc/ccom.tahoe/local.c 1.6

36 years agoutah rcsid 1.2 87/05/02 14:44:07: Permit some tiny functions to be macros;
Donn Seeley [Fri, 11 Dec 1987 12:30:07 +0000 (04:30 -0800)]
utah rcsid 1.2 87/05/02 14:44:07: Permit some tiny functions to be macros;
change select() to selectheap() to avoid Unix problems; add 'if (nerrors)'
tests to avoid output after errors; some lint tidbits.
utah rcsid 1.4 87/07/17 19:09:35: Minor tweaking to bring format in line
with vax version.

SCCS-vsn: old/pcc/ccom.tahoe/code.c 1.5

36 years agoutah rcsid 1.2 87/05/02 14:41:45: Push CONFIG parameters into macdefs.h;
Donn Seeley [Fri, 11 Dec 1987 12:21:03 +0000 (04:21 -0800)]
utah rcsid 1.2 87/05/02 14:41:45: Push CONFIG parameters into macdefs.h;
fix lint action.
utah rcsid 1.3 87/12/10 20:26:31: The single-precision compiler is the
standard tahoe compiler; delete all the junk for two compilers.

SCCS-vsn: old/pcc/ccom.tahoe/Makefile 1.7

36 years agowatch out for bogus combinations of vax options with compat mode
Mike Karels [Fri, 11 Dec 1987 10:44:03 +0000 (02:44 -0800)]
watch out for bogus combinations of vax options with compat mode

SCCS-vsn: sys/kern/sys_process.c 7.4
SCCS-vsn: sys/vax/vax/machdep.c 7.10
SCCS-vsn: sys/vax/include/psl.h 7.2

36 years agoavoid SCCS key word expansion in odd places
Keith Bostic [Fri, 11 Dec 1987 09:01:40 +0000 (01:01 -0800)]
avoid SCCS key word expansion in odd places

SCCS-vsn: contrib/ansi/ansitape.c 1.6

36 years agoupdate for new version from Timothy Stoehr
Kirk McKusick [Fri, 11 Dec 1987 05:03:05 +0000 (21:03 -0800)]
update for new version from Timothy Stoehr

SCCS-vsn: games/rogue/USD.doc/rogue.me 6.3

36 years agoupdate for new version from Tim Stoehr
Kirk McKusick [Fri, 11 Dec 1987 05:01:25 +0000 (21:01 -0800)]
update for new version from Tim Stoehr

SCCS-vsn: games/rogue/rogue.6 6.3

36 years agoutah rcsid 1.30 87/07/06 13:19:17: Preserve LONG and ULONG through constant
Donn Seeley [Thu, 10 Dec 1987 16:53:00 +0000 (08:53 -0800)]
utah rcsid 1.30 87/07/06 13:19:17: Preserve LONG and ULONG through constant
expression folding.

SCCS-vsn: old/pcc/mip/trees.c 4.34

36 years agoutah rcsid 1.29 87/04/24 18:51:39: Changed tymatch() to force propagation
Donn Seeley [Thu, 10 Dec 1987 16:52:49 +0000 (08:52 -0800)]
utah rcsid 1.29 87/04/24 18:51:39: Changed tymatch() to force propagation
of unsigned type from one operand to another in an expression where only
one operand is unsigned.  This cuts down on the number of combinations of
types which need to be handled in the code table in the second pass, at a
cost of some flexibility.

SCCS-vsn: old/pcc/mip/trees.c 4.33

36 years agoutah rcsid 1.28 87/04/17 21:32:38: Simplify handling of integer promotions
Donn Seeley [Thu, 10 Dec 1987 16:52:38 +0000 (08:52 -0800)]
utah rcsid 1.28 87/04/17 21:32:38: Simplify handling of integer promotions
in conval().

SCCS-vsn: old/pcc/mip/trees.c 4.32

36 years agoutah rcsid 1.27 87/04/01 14:00:45: Remove TVOID case in moditype so that
Donn Seeley [Thu, 10 Dec 1987 16:52:26 +0000 (08:52 -0800)]
utah rcsid 1.27 87/04/01 14:00:45: Remove TVOID case in moditype so that
void functions can properly be converted to pointers to void functions when
used as operands.

SCCS-vsn: old/pcc/mip/trees.c 4.31

36 years agoutah rcsid 1.26 87/03/24 01:47:26: Remove tahoe ifdefs; the code table
Donn Seeley [Thu, 10 Dec 1987 16:52:14 +0000 (08:52 -0800)]
utah rcsid 1.26 87/03/24 01:47:26: Remove tahoe ifdefs; the code table
handles this correctly now.

SCCS-vsn: old/pcc/mip/trees.c 4.30

36 years agoutah rcsid 1.25 87/03/18 00:09:50: From Sam Kendall (sam@think.com): don't
Donn Seeley [Thu, 10 Dec 1987 16:52:02 +0000 (08:52 -0800)]
utah rcsid 1.25 87/03/18 00:09:50: From Sam Kendall (sam@think.com): don't
let structs, unions, floats, doubles or voids be cast into pointers.

SCCS-vsn: old/pcc/mip/trees.c 4.29

36 years agoutah rcsid 1.24 87/01/15 05:29:21: Fix brace balancing in ifdefs so that
Donn Seeley [Thu, 10 Dec 1987 16:51:50 +0000 (08:51 -0800)]
utah rcsid 1.24 87/01/15 05:29:21: Fix brace balancing in ifdefs so that
ctags works.

SCCS-vsn: old/pcc/mip/trees.c 4.28

36 years agoutah rcsid 1.23 87/01/15 02:12:21: Some minor lint fixes.
Donn Seeley [Thu, 10 Dec 1987 16:51:38 +0000 (08:51 -0800)]
utah rcsid 1.23 87/01/15 02:12:21: Some minor lint fixes.

SCCS-vsn: old/pcc/mip/trees.c 4.27

36 years agoutah rcsid 1.22 86/11/28 21:21:08: Fix test for type puns when comparing
Donn Seeley [Thu, 10 Dec 1987 16:51:25 +0000 (08:51 -0800)]
utah rcsid 1.22 86/11/28 21:21:08: Fix test for type puns when comparing
constant enum values.  Also moved counter declaration into an ifdef.  Lint
IS worth something!

SCCS-vsn: old/pcc/mip/trees.c 4.26

36 years agoutah rcsid 1.21 86/11/27 19:34:28: upgrade to ucb sid 4.11 -- 'take care
Donn Seeley [Thu, 10 Dec 1987 16:51:12 +0000 (08:51 -0800)]
utah rcsid 1.21 86/11/27 19:34:28: upgrade to ucb sid 4.11 --  'take care
with unsigned constant compression (for tahoe); put back PRTDCON
redefinition; ifdef asgop optimizations (tahoe can't handle them in code
generation)' (sam).

SCCS-vsn: old/pcc/mip/trees.c 4.25

36 years agoutah rcsid 1.20 86/11/21 22:22:26: Changed 'illegal lhs of assignment
Donn Seeley [Thu, 10 Dec 1987 16:50:57 +0000 (08:50 -0800)]
utah rcsid 1.20 86/11/21 22:22:26: Changed 'illegal lhs of assignment
operator' to 'illegal lvalue operand...' because there are unary assignment
operators like ++ and --.

SCCS-vsn: old/pcc/mip/trees.c 4.24

36 years agoutah rcsid 1.19 86/11/10 09:21:58: More of the same -- unsigned compares
Donn Seeley [Thu, 10 Dec 1987 16:50:42 +0000 (08:50 -0800)]
utah rcsid 1.19 86/11/10 09:21:58: More of the same -- unsigned compares
between constants weren't unsigned.

SCCS-vsn: old/pcc/mip/trees.c 4.23

36 years agoutah rcsid 1.18 86/11/08 20:51:18: Argh -- restore commented-out cast which
Donn Seeley [Thu, 10 Dec 1987 16:50:30 +0000 (08:50 -0800)]
utah rcsid 1.18 86/11/08 20:51:18: Argh -- restore commented-out cast which
bollixed unsigned -> double (and float) conversions for constants.

SCCS-vsn: old/pcc/mip/trees.c 4.22

36 years agoutah rcsid 1.17 86/08/11 09:27:37: Oops -- void type is now represented by
Donn Seeley [Thu, 10 Dec 1987 16:50:16 +0000 (08:50 -0800)]
utah rcsid 1.17 86/08/11 09:27:37: Oops -- void type is now represented by
MVOID, not 0, in opact()...

SCCS-vsn: old/pcc/mip/trees.c 4.21

36 years agoutah rcsid 1.16 86/08/05 19:59:17: Permit void expressions in the colon
Donn Seeley [Thu, 10 Dec 1987 16:50:02 +0000 (08:50 -0800)]
utah rcsid 1.16 86/08/05 19:59:17: Permit void expressions in the colon
part of a question mark operator (only, of course, if both subexpressions
are type void).

SCCS-vsn: old/pcc/mip/trees.c 4.20

36 years agoutah rcsid 1.15 86/07/11 13:19:14: More changes for enums. Did some tuning
Donn Seeley [Thu, 10 Dec 1987 16:49:42 +0000 (08:49 -0800)]
utah rcsid 1.15 86/07/11 13:19:14: More changes for enums.  Did some tuning
in opact() to remove clutter and handle unary operators.

SCCS-vsn: old/pcc/mip/trees.c 4.19

36 years agoutah rcsid 1.14 86/07/09 19:15:24: Guy Harris's fix for making chkpun()
Donn Seeley [Thu, 10 Dec 1987 16:49:27 +0000 (08:49 -0800)]
utah rcsid 1.14 86/07/09 19:15:24: Guy Harris's fix for making chkpun()
distinguish char **cpp and char c2a[10][20].

SCCS-vsn: old/pcc/mip/trees.c 4.18

36 years agoutah rcsid 1.13 86/07/08 16:05:37: Get more determined about 'usual type
Donn Seeley [Thu, 10 Dec 1987 16:49:12 +0000 (08:49 -0800)]
utah rcsid 1.13 86/07/08 16:05:37: Get more determined about 'usual type
conversions' in conval() -- if we don't have the usual simple case, do the
same type guessing that we would perform for non-constants.

SCCS-vsn: old/pcc/mip/trees.c 4.17