unix-history/.git
36 years agodate and time created 87/12/11 19:08:47 by donn
Donn Seeley [Sat, 12 Dec 1987 11:08:47 +0000 (03:08 -0800)]
date and time created 87/12/11 19:08:47 by donn

SCCS-vsn: lib/libc/tahoe/gen/urem.s 1.1

36 years agoAdd audiv() routine similar to vax's.
Donn Seeley [Sat, 12 Dec 1987 11:05:24 +0000 (03:05 -0800)]
Add audiv() routine similar to vax's.

SCCS-vsn: lib/libc/tahoe/gen/udiv.s 1.2

36 years agodisallow names consisting entirely of digits/dots unless they
Keith Bostic [Sat, 12 Dec 1987 02:51:02 +0000 (18:51 -0800)]
disallow names consisting entirely of digits/dots unless they
end in a trailing dot

SCCS-vsn: lib/libc/net/gethostnamadr.c 6.27

36 years agoutah rcsid 1.25 87/12/10 19:48:54: Fortran also needs implicit float to
Donn Seeley [Fri, 11 Dec 1987 16:59:36 +0000 (08:59 -0800)]
utah rcsid 1.25 87/12/10 19:48:54: Fortran also needs implicit float to
double conversions before comparisons; passed on by Jim McKie.

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

36 years agoutah rcsid 1.24 87/09/21 16:44:54: Quick hack to save f77 -- perform
Donn Seeley [Fri, 11 Dec 1987 16:59:24 +0000 (08:59 -0800)]
utah rcsid 1.24 87/09/21 16:44:54: Quick hack to save f77 -- perform
automatic float-to-double promotion in OPFLOAT but only for f77.

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

36 years agoutah rcsid 1.23 87/08/25 00:00:20: Some SCONV templates were removed in
Donn Seeley [Fri, 11 Dec 1987 16:59:11 +0000 (08:59 -0800)]
utah rcsid 1.23 87/08/25 00:00:20: Some SCONV templates were removed in
favor of hacking in sconv().  Since it's tough to predict which FORARG
conversions will require a temporary register, we just assume that all
will.  The conversion from UCHAR or USHORT to floating is now done in
sconv() so that e.g. ZG can take advantage of it; since this conversion
requires a temporary register, a new ASSIGN template was added specifically
to handle it.

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

36 years agoCC templates were collapsed into two ZZ entries for ease of optimization.
Donn Seeley [Fri, 11 Dec 1987 16:58:58 +0000 (08:58 -0800)]
CC templates were collapsed into two ZZ entries for ease of optimization.
(7) Some redundant RESCCs were removed from templates which had no FORCC
goal.

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

36 years agoutah rcsid 1.22 87/08/24 02:42:48: (1) Many, many redundant or useless
Donn Seeley [Fri, 11 Dec 1987 16:58:48 +0000 (08:58 -0800)]
utah rcsid 1.22 87/08/24 02:42:48: (1) Many, many redundant or useless
templates were deleted.  (2) Conversions to FLOAT now go to the effort of
trimming excess precision from DOUBLE and INT operands.  (3) DOUBLE to
DOUBLE conversions introduced by reclaim() are disposed of.  (4) 'Fortran'
GOTOs are now conditionally compiled on FORT.  (5) A few movd's were turned
into movq's.  More work needs to be done on this, I think.  (6) The AND for

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

36 years agoutah rcsid 1.21 87/07/16 19:39:42: Better handling of stack pushes with the
Donn Seeley [Fri, 11 Dec 1987 16:58:37 +0000 (08:58 -0800)]
utah rcsid 1.21 87/07/16 19:39:42: Better handling of stack pushes with the
ZV macro.

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

36 years agoutah rcsid 1.20 87/07/07 20:33:08: Hack the INCR and DECR templates to take
Donn Seeley [Fri, 11 Dec 1987 16:58:24 +0000 (08:58 -0800)]
utah rcsid 1.20 87/07/07 20:33:08: Hack the INCR and DECR templates to take
a NAME increment operand, so that FLOAT and DOUBLE operations can be
handled (floating constants are NAMEs).

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

36 years agoutah rcsid 1.19 87/05/15 17:01:21: Fix UCHAR/USHORT complements.
Donn Seeley [Fri, 11 Dec 1987 16:58:11 +0000 (08:58 -0800)]
utah rcsid 1.19 87/05/15 17:01:21: Fix UCHAR/USHORT complements.

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

36 years agoutah rcsid 1.18 87/05/14 19:11:17: Hacks for handling UCHAR/USHORT div/mod
Donn Seeley [Fri, 11 Dec 1987 16:58:03 +0000 (08:58 -0800)]
utah rcsid 1.18 87/05/14 19:11:17: Hacks for handling UCHAR/USHORT div/mod
ops.

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

36 years agoutah rcsid 1.17 87/05/01 13:46:29: Deleted a large number of redundant
Donn Seeley [Fri, 11 Dec 1987 16:57:48 +0000 (08:57 -0800)]
utah rcsid 1.17 87/05/01 13:46:29: Deleted a large number of redundant
table entries in the new unsigned div/mod code.

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

36 years agoutah rcsid 1.16 87/04/24 19:26:03: Bleah -- double the number of ASG DIV
Donn Seeley [Fri, 11 Dec 1987 16:57:34 +0000 (08:57 -0800)]
utah rcsid 1.16 87/04/24 19:26:03: Bleah -- double the number of ASG DIV
and ASG MOD entries so that we can handle unsigned rhs's.

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

36 years agoutah rcsid 1.15 87/04/24 18:59:25: (1) OPLOG templates were modified to
Donn Seeley [Fri, 11 Dec 1987 16:57:18 +0000 (08:57 -0800)]
utah rcsid 1.15 87/04/24 18:59:25: (1) OPLOG templates were modified to
compare only like against like for short integral types with constant rhs's
-- an unsigned char can't be compared directly with a char constant since
the latter will be sign- extended and converted to unsigned by C's type
promotion rules.  (2) Constant shift counts, increments and decrements may
have unsigned type.

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

36 years agoutah rcsid 1.14 87/04/20 16:58:25: Fix stupidity with use of ediv
Donn Seeley [Fri, 11 Dec 1987 16:57:06 +0000 (08:57 -0800)]
utah rcsid 1.14 87/04/20 16:58:25: Fix stupidity with use of ediv
instructions -- the order is 'divisor, dividend' not 'dividend,divisor'.
Argh.

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

36 years agoutah rcsid 1.13 87/04/19 23:51:15: New templates for handling unsigned
Donn Seeley [Fri, 11 Dec 1987 16:56:54 +0000 (08:56 -0800)]
utah rcsid 1.13 87/04/19 23:51:15: New templates for handling unsigned
division and modulus inline when the divisor is a constant.

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

36 years agoutah rcsid 1.12 87/04/13 20:09:27: Speed up ASG OPSIMP operations with
Donn Seeley [Fri, 11 Dec 1987 16:56:40 +0000 (08:56 -0800)]
utah rcsid 1.12 87/04/13 20:09:27: Speed up ASG OPSIMP operations with
narrow lhs's by punning the type of the rhs.  We have to be careful about
rhs side effects...

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

36 years agoutah rcsid 1.11 87/03/08 19:55:07: Distinguish between signed and unsigned
Donn Seeley [Fri, 11 Dec 1987 16:56:28 +0000 (08:56 -0800)]
utah rcsid 1.11 87/03/08 19:55:07: Distinguish between signed and unsigned
fields in the lhs of assignments whose value is used.

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

36 years agoutah rcsid 1.10 87/02/08 22:45:04: Add INTEMP templates for OREG nodes --
Donn Seeley [Fri, 11 Dec 1987 16:56:13 +0000 (08:56 -0800)]
utah rcsid 1.10 87/02/08 22:45:04: Add INTEMP templates for OREG nodes --
OREGs which are too complex must be pushed on the stack.

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

36 years agoutah rcsid 1.9 86/09/18 17:12:43: A (revised) fix for bit-field assignments
Donn Seeley [Fri, 11 Dec 1987 16:56:02 +0000 (08:56 -0800)]
utah rcsid 1.9 86/09/18 17:12:43: A (revised) fix for bit-field assignments
-- the result is the value of the field, not the value of the rhs.

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

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 16:52:58 +0000 (08:52 -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.vax/stab.c 1.13

36 years agoutah rcsid 3.11 87/07/17 17:11:47: Change uses of 'sizeof (int)' to
Donn Seeley [Fri, 11 Dec 1987 16:49:15 +0000 (08:49 -0800)]
utah rcsid 3.11 87/07/17 17:11:47: Change uses of 'sizeof (int)' to
SZINT/SZCHAR to reflect target machine characteristics instead of local
ones.

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

36 years agoutah rcsid 3.10 87/07/12 18:33:19: Several minor changes from Sam Leffler's
Donn Seeley [Fri, 11 Dec 1987 16:49:08 +0000 (08:49 -0800)]
utah rcsid 3.10 87/07/12 18:33:19: Several minor changes from Sam Leffler's
tahoe compiler.  (1) Deleted lots of old, commented-out code.  (2) Added
missing 'int' types where (legally) omitted.  (3) Deleted special case for
FLOAT and DOUBLE in rallo().  (4) Put '#ifndef SPRECC' around FLOAT test in
setbin().

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

36 years agocode for INCR from updating its lvalue operand...
Donn Seeley [Fri, 11 Dec 1987 16:48:59 +0000 (08:48 -0800)]
code for INCR from updating its lvalue operand...

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

36 years agoutah rcsid 3.9 87/07/07 20:26:30: Fixed a goof in setincr(). If the
Donn Seeley [Fri, 11 Dec 1987 16:48:52 +0000 (08:48 -0800)]
utah rcsid 3.9 87/07/07 20:26:30: Fixed a goof in setincr().  If the
operand of INCR is a UNARY MUL, the routine offstar() should be called to
move the operand of UNARY MUL into a register, producing an OREG which
might be matched by a template.  The old code called offstar() with the
UNARY MUL as an argument rather than the UNARY MUL's operand, and that
caused the operand of INCR to be put in a register, preventing the eventual

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

36 years agoutah rcsid 3.8 87/04/24 18:53:26: Changed autoincr() -- due to changes
Donn Seeley [Fri, 11 Dec 1987 16:48:44 +0000 (08:48 -0800)]
utah rcsid 3.8 87/04/24 18:53:26: Changed autoincr() -- due to changes
upstream, an expression like 'register char *cp; unsigned char uc; uc =
*cp++;' will result in a tree for '*cp++' which has unsigned char type but
dereferences a char * pointer.  The test is now less stringent: the result
of the dereference must match the base type of the pointer only in size,
since only size is relevant to side effects like auto-increment.

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

36 years agoutah rcsid 3.7 87/04/20 16:57:26: Simplify the su computation in the last
Donn Seeley [Fri, 11 Dec 1987 16:48:34 +0000 (08:48 -0800)]
utah rcsid 3.7 87/04/20 16:57:26: Simplify the su computation in the last
rev -- constants use no registers.

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

36 years agoutah rcsid 3.6 87/04/20 16:22:28: Moved test for unsigned DIV/MOD up higher
Donn Seeley [Fri, 11 Dec 1987 16:48:21 +0000 (08:48 -0800)]
utah rcsid 3.6 87/04/20 16:22:28: Moved test for unsigned DIV/MOD up higher
in sucomp() to avoid asgop() test.

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

36 years agoutah rcsid 3.5 87/04/19 23:39:34: Now that unsigned div/mod with constant
Donn Seeley [Fri, 11 Dec 1987 16:48:10 +0000 (08:48 -0800)]
utah rcsid 3.5 87/04/19 23:39:34: Now that unsigned div/mod with constant
divisors are done inline with the ediv instruction, we have to flag the
register pair which ediv uses.

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

36 years agoutah rcsid 3.4 87/01/15 01:34:22: Lint fixes.
Donn Seeley [Fri, 11 Dec 1987 16:48:02 +0000 (08:48 -0800)]
utah rcsid 3.4 87/01/15 01:34:22: Lint fixes.

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

36 years agoutah rcsid 3.3 86/08/03 00:57:47: Permit deflab() to be a macro.
Donn Seeley [Fri, 11 Dec 1987 16:47:53 +0000 (08:47 -0800)]
utah rcsid 3.3 86/08/03 00:57:47: Permit deflab() to be a macro.

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

36 years agoutah rcsid 1.5 87/07/11 21:48:46: A little tweak from Sam Leffler's tahoe
Donn Seeley [Fri, 11 Dec 1987 16:46:08 +0000 (08:46 -0800)]
utah rcsid 1.5 87/07/11 21:48:46: A little tweak from Sam Leffler's tahoe
compiler (produce 'clrd -8(fp)' not 'L17: .double 0d0e+00; .text; movd
L17,-8(fp)').

SCCS-vsn: old/pcc/ccom.vax/macdefs.h 4.4

36 years agoutah rcsid 1.4 86/08/03 01:03:22: Add 'configuration' flags which are
Donn Seeley [Fri, 11 Dec 1987 16:46:01 +0000 (08:46 -0800)]
utah rcsid 1.4 86/08/03 01:03:22: Add 'configuration' flags which are
really 'assembler style' flags, clean up makefile.  Add macros to replace
some trivial functions.  Change FIX macros to punt if errors have been
seen.

SCCS-vsn: old/pcc/ccom.vax/macdefs.h 4.3

36 years agoutah rcsid 1.33 87/11/28 02:59:18: Be cooperative with SCCON and SSCON by
Donn Seeley [Fri, 11 Dec 1987 16:40:12 +0000 (08:40 -0800)]
utah rcsid 1.33 87/11/28 02:59:18: Be cooperative with SCCON and SSCON by
masking and sign-extending ASG OPSIMP constant operands.  Added a few
comments in the tortuous AND code too.

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

36 years agoutah rcsid 1.32 87/09/24 22:24:49: Missing case for FORARG in sconv() --
Donn Seeley [Fri, 11 Dec 1987 16:39:53 +0000 (08:39 -0800)]
utah rcsid 1.32 87/09/24 22:24:49: Missing case for FORARG in sconv() --
floating to short integral conversions.

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

36 years agoutah rcsid 1.31 87/09/08 19:12:14: Fix bug where stack push of 0.0 only
Donn Seeley [Fri, 11 Dec 1987 16:39:33 +0000 (08:39 -0800)]
utah rcsid 1.31 87/09/08 19:12:14: Fix bug where stack push of 0.0 only
pushes one word of zeroes...  Ack.

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

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