File:  [MW Coherent from dump] / coherent / b / bin / c / Changes.1992
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:36 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

Steve's cc386 compiler change log
Begun 11/22/91

Fri Nov 22 11:51:35 1991 PST
n1/i386/tables/assign.t
		Fixed bug which produced no match in /usr/src/cmd/rmdir.c
		on line "if ((int)(ptr = ptr) < 0) ...".

Fri Nov 22 12:07:23 1991 PST
n1/i386/tables/aaddsub.t
		Deleted bogus SHORT op= REG LONG entry, which produced
		collect errors on /usr/src/cmd/[mkfs.c|typo.c].

Fri Nov 22 23:34:12 1991 PST
n1/i386/table1.c
n1/i386/tables/assign.t
n1/i386/tables/leaves.t
n1/i386/tables/relop.t
		Cleaned up shrink table and improved coding for word and byte
		operations.

Mon Nov 25 17:33:11 1991 PST
common/i386/geno.c
h/cc1.h
h/i386/cc0mch.h
h/i386/cc1mch.h
h/i386/cc2mch.h
h/i386/cppmch.h
h/i386/mch.h
n0/i386/bind.c
n1/i386/altemp.c
n1/i386/amd.c
n1/i386/tables/Read_me
n1/i386/tables/aaddsub.t
n1/i386/tables/adiv.t
n1/i386/tables/aft.t
n1/i386/tables/alogic.t
n1/i386/tables/amul.t
n1/i386/tables/arem.t
n1/i386/tables/mul.t
n2/i386/afield.c
n2/i386/asm.c
n2/i386/emit1.c
n2/i386/outcoff.c
n2/i386/peep.c
n2/i386/unasm.c
n3/i386/igen.c
		Numerous changes, mostly of a cleanup nature,
		nothing dramatically substantive.

Tue Nov 26 17:36:56 1991 PST
common/i386/geno.c
		Changed genafield() OFFS case to fetch ival_t and bump
		pointer accordingly, to allow writing correct code with
		286-based cross compiler.
h/cc0.h
n0/expr.c
		Changed ivalexpr() from int to ival_t.
n0/i386/bind.c
		Corrected fieldalign() alignment for members of array type.
h/i386/cc2mch.h
n1/i386/gen1.c
n1/i386/outmch.c
n2/i386/emit1.c
		Changed genone(), gentwo() calls to pass ival_t args correctly.
		Changed framesize from int to ival_t.
n2/i386/peep.c
		Added code to simplify "cmp %eax, $0" to "or %eax, %eax",
		similarly for byte and word compares.
n1/i386/tables/ashift.t
n1/i386/tables/shift.t
		Added comments.
n1/i386/tables/assign.t
		Added PREL cases to improve byte = byte and word = word
		in relation contexts; this produces better code for
			while (*cp1++ = *cp2++);
n3/i386/igen.c
		Minor change to output format for align ops.		

Wed Nov 27 15:16:14 1991 PST
n1/i386/tables/leaves.t
		Added ADR entries to the shrink table to handle shrinks
		of auto items.
n1/i386/tables/shift.t
		Changed shift node types from LONG to DWORD, because
		e.g. "cp = (char *)(n * 2);" produced a no match before;
		the multiply optimized to a left shift node with type PTR.

Fri Nov 29 11:23:11 1991 PST
n0/cc0key.c
n0/sharp.c
n0/i386/bind.c
		Implemented "#pragma alien [n]".

Mon Dec  2 15:48:34 1991 PST
n0/sharp.c
		Fixed implementation of #pragma alien.
h/i386/mch.h
n2/i386/peep.c
n2/i386/asm.c
		Moved macro definitions from peep.c to mch.h to clarify
		code, simplified asm.c accordingly.		
h/i386/cc2mch.h
n0/i386/bind.c
n1/i386/gen1.c
n2/i386/emit1.c
n2/i386/getcod.c
		Allow EBX as register variable.  Change prolog and epilog
		to save/restore EBX/ESI/EDI only if required, after the
		stack auto adjust rather than before.

Tue Dec  3 10:19:01 1991 PST
h/i386/cc1mch.h
h/i386/cc2mch.h
h/i386/cc3mch.h
h/i386/mch.h
		Changed coding of address mode bits to support SIB.
		Moved common type definitions into mch.h.
n1/i386/gen1.c
		Simplified coding of register -> index register correspondence.
n0/i386/bind.c
n1/i386/amd.c
n1/i386/gen2.c
n2/i386/afield.c
n2/i386/asm.c
n2/i386/emit1.c
n2/i386/peep.c
n3/i386/icode.c
		Changes for new SIB tree flag encoding and new macros.

Wed Dec  4 19:37:08 1991 PST
n1/i386/tables/prefac.f
		Deleted unused pattern abbreviations.

n1/i386/tables/addsub.t
n1/i386/tables/shift.t
		Fixed minor (but deadly) code table bugs.

Wed Dec  4 21:32:55 1991 PST
n2/i386/optab.c
		Changed addw, and, andw, or, orw, xor, xorw type from OF_DOP
		to OF_DOPS.  This tells the assembler to use short form
		with sign-extended immediate byte operand, saving 3 bytes each.

Thu Dec  5 12:40:50 1991 PST
h/cc1.h
h/i386/cc1mch.h
n0/i386/bind.c
n1/i386/altemp.c
n1/i386/gen1.c
n2/i386/emit1.c
n3/i386/igen.c
		Changes to allow >64K autos.  Changed int -> ival_t in
		various places in bind.c and gen1.c, recognized ival_t AUTOS
		items in igen.c, and changed the prolog/epilog in emit1.c
		to avoid ENTER if framesize >64K.

Thu Dec  5 14:58:57 1991 PST
n1/i386/tables/leaves.t
		Added widen entry for char->word, caught by a no match
		when compiling cef's unop.c.

Sun Dec  8 11:47:00 1991 PST
h/i386/cc1mch.h
n1/i386/tables/aaddsub.t
n1/i386/tables/adiv.t
n1/i386/tables/aft.t
n1/i386/tables/alogic.t
n1/i386/tables/amul.t
n1/i386/tables/ashift.t
n1/i386/tables/assign.t
n1/i386/tables/bef.t
n1/i386/tables/leaves.t
n1/i386/tables/relop.t
n1/i386/reg1.c
		Changed PSHORT to PBYTE.  In tables, deleted PSHORT on word
		patterns (LO works on any register, including EDI and ESI),
		left PBYTE on byte patterns (LO LO requires EAX EBX ECX EDX).
n1/i386/mtree2.c
		Fixed modoptab[].

Mon Dec 16 12:26:39 1991 PST
		The following changes were made at MWC 12/9-13/91:
h/cc0.h
n0/cc0key.c
n0/sharp.c
		Added "#ident" keyword, as requested by hal.
n0/gdecl.c
n0/i386/bind.c
		Changed parser to round up structure sizes
		as required for BCS compatability.
		Corrected bug in finding alignment of array structure members.
h/i386/cppmch.h
		Changed MACHINE from "I386" to "_I386".
h/i386/mch.h
		Corrected definition of NRREGS, deleted NBPSTRG.
h/i8086/mch.h
		Deleted NBSTRG, added saligntype() macro instead.
n1/i386/gen2.c
		Added sleazy hack to allow initializers like
		"int i = (int)&foo;", used by Ciaran in the system.
n1/i386/tables/adiv.t
n1/i386/tables/aft.t
n1/i386/tables/amul.t
n1/i386/tables/and.t
n1/i386/tables/orxor.t
n1/i386/tables/rem.t
		Recoded table entries using EDXEAX as node register.
		Changed code table entries to fix minor bugs discovered
		while recompiling system, mostly by changing node types
		from LONG to DWORD to include nodes cast to (char *).
n3/i386/icode.c
n3/i386/igen.c
		Changed assembler output symbols to correspond with Esix
		assembler, as required by cef's as386.

Mon Dec 16 14:48:24 1991 PST
n2/i386/asm.c
		At cef's suggestion, changed asm() to use the imm8 form
		for add/sub/cmp/and/or/xor with EAX as left operand.
		Saves two bytes per opcode.

Mon Dec 16 15:27:44 1991 PST
h/coff.h
		Added "#pragma align" lines to avoid unwanted padding of
		structures defining parts of COFF file.

Wed Dec 18 17:36:41 1991 PST
		Extensive changes to implement IEEE software fp,
		using support routines called directly from code
		tables rather than calls generated in modify phase.

common/i386/regnam.c
h/i386/cc1mch.h
h/i386/mch.h
n1/i386/gen1.c
n1/i386/table1.c
		Deleted register FPAC, software fp now uses EDXEAX instead.

n1/i386/gen1.c
		In coderinit(), added code similar to i8086 cc code.
		This code zaps DECVAX or NDP code table entries if the
		compiler is using IEEE software fp.
		Corrected DCON code, which passed 16-bit pieces of DCON
		rather than 32-bit pieces.

n1/i386/mtree2.c:
		Extensively simplified modoper() and modxfun(), because
		DECVAX or IEEE software fp no longer require modify phase
		to insert calls.  Generating the calls directly from the
		code tables allows more efficient calling sequence (using
		registers to pass parameters) and allows the code selector
		to generate stack temp save/restore for intermediate results
		as required.

n1/i386/outmch.c
		Modified maptype() so that [TL ZMOVSX] just means ZMOV
		for 32-bit operand; allows simpler table encoding.

n1/i386/Makefile
n1/i386/tables/aadd.t
n1/i386/tables/add.t
n1/i386/tables/asub.t
n1/i386/tables/sub.t
		Split aaddsub.t into aadd.t and asub.t;
		split addsub.t into add.t and sub.t.
		Added DECVAX/IEEE software floating point entries.
		These changes were required by the (trivial) difference
		between software fp calls to _dadd and _dsub,
		it would be nice to merge the tables again but I don't
		see how to do it right now.

n1/i386/tables/adiv.t
n1/i386/tables/amul.t
n1/i386/tables/assign.t
n1/i386/tables/div.t
n1/i386/tables/leaves.t
n1/i386/tables/mul.t
n1/i386/tables/neg.t
n1/i386/tables/relop.t
		Added DECVAX/IEEE software floating point entries.

Thu Dec 19 14:27:26 1991 PST
n1/i386/mtree2.c
		Corrected bug introduced yesterday causing bad AID/PID offsets.
n2/i386/asm.c
		Corrected bug in code generation for immediate shifts
		by 16 or more.

Thu Dec 19 15:51:39 1991 PST
n2/i386/emit1.c
		Changes for -VPROF option: profile block is 12 bytes, not 8;
		use register %ecx, not %ebx.

Tue Jan  7 14:14:38 1992 PST
h/i386/cppmch.h
h/i8086/cppmch.h
n0/cc0.c
		At cef's request, made cpp automatically define "_IEEE"
		or "_DECVAX" to indicate the selected fp format.

n1/i386/tables/Read_me.fp
n1/i386/tables/aadd.t
n1/i386/tables/add.t
n1/i386/tables/adiv.t
n1/i386/tables/amul.t
n1/i386/tables/asub.t
n1/i386/tables/div.t
n1/i386/tables/leaves.t
n1/i386/tables/mul.t
n1/i386/tables/neg.t
n1/i386/tables/relop.t
n1/i386/tables/sub.t
		Further changes for IEEE software fp.
		
n1/i386/tables/leaves.t
		Fixed bug reported by cef: the widen entries incorrectly
		specified ADR|IMM rather than ADR as operand for "movsxb",
		so asmgen() correctly complained about the generated opcode.

Thu Jan  9 14:33:05 1992 PST
n1/i386/tables/leaves.t
		Fixed another bug reported by cef: no match for shrink
		of double to short.  The shrink tables included double->[u]int
		and float->[u]int for IEEE software fp; changed node flags
		so the same entries work for double|float->[u]short|[u]char.

Wed Jan 15 14:17:24 1992 PST
n0/ddecl.c
n0/i386/bind.c
		Fixed bug related to bitfield alignment.  For an int bitfield
		starting at bit 15 of a 4-byte struct, the compiler previously
		incorrectly generated dword AND and OR instructions starting
		at bit 7 of byte 1, rather than bit 15 of byte 0; thus, the
		AND and OR could run past the end of the structure.  Added
		routine "int faligntype(t)" in bind.c, called from ddecl.c.
h/i8086/cc0mch.h
		Added "#define faligntype(t) 1" in keeping with above change.

Thu Jan 16 00:08:47 1992 PST
coh/cc.c
		Added definition of DTEFG ("_dtefg_" or "_dtefg") and
		made -f use it, so cc386 -f undefines the right name.
n1/i386/tables/leaves.t
		Reordered HI and LO halves of fp loads, for consistency.
n1/i386/tables/relop.t
		Changed _dcmp call to not adjust ESP on return;
		_dcmp now pops its argument, making it easier for the call
		to leave the flags and all registers unchanged.

Fri Jan 17 15:24:06 1992 PST
n1/i386/tables/leaves.t
		Hacked double->int shrink entries to avoid nasty EDX bug.

Thu Jan 30 12:07:01 1992 PST
		Fixed bug reported by piggy, incorrect code for e.g.
		"foo == -1" conditional when foo is unsigned short.
h/i386/cc1mch.h
		Changed tree flags T_BYTE and T_WORD to T_SBYTE, T_UBYTE,
		T_SWORD, T_UWORD with appropriate ranges; in passing, added
		T_SHCNT for shift counts (0 to 31).
n1/i386/amd.c
		Changed amd() to set new byte, word and shift count tree flags.
n1/i386/tables/amul.t
n1/i386/tables/mul.t
		Changed multiplication by immediate byte to use T_SBYTE.
n1/i386/tables/ashift.t
n1/i386/tables/shift.t
		Changed shift tables to use T_SHCNT flag rather than T_BYTE.
n1/i386/tables/relop.t
		Split relational T_WORD and T_BYTE table entries to fix
		the reported problem.

Thu Jan 30 16:55:26 1992 PST
h/i386/cc1mch.h
		Nonsubstantive changes to composite tree flag definitions,
		for readability.
n1/i386/amd.c
		Modified amd() so REG does not set T_DIR flag, to allow
		code tables to distinguish T_DIR from T_REG.
n1/i386/tables/leaves.t
		Modified widen and shrink tables by splitting T_DIR entries
		from T_REG entries, allowing correct register specifications
		on the latter.
n2/i386/asm.c
		Added aerr() checking to ZMOV (register/register)
		and ZMOVSX/ZMOVZX opcodes; these checks detect the cases
		which were producing incorrect code before the above fixes.

Mon Feb  3 12:59:57 1992 PST
n1/i386/tables/ashift.t
		Modified entries using ECX for shift count.  cef's binop.c
		revealed that the old versions sometimes clobbered ECX while
		it was being used for indexing.
n2/i386/asm.c
		Improved ZMOV error checking code to report more bogus cases.

Tue Feb  4 17:34:47 1992 PST
n1/pool.c
		Added "p_type" member to pool struct; save and compare type
		of pooled constants.  This prevents e.g.
		(char)0 creating pooled .byte 0, to which subsequent dword
		constant 0 would incorrectly refer.
n1/i386/tables/leaves.t
		Added immediate S32 and U32 entries to widen to double
		table, to prevent S32 and U32 constants from being pooled.

Wed Feb  5 00:58:43 1992 PST
n0/expr.c
		In build(), corrected ASHL/ASHR/SHL/SHR parsing.  The old
		code generated an unsigned shift for e.g. int >> uint.

Thu Feb  6 09:53:44 1992 PST
n1/i386/tables/leaves.t
		In IEEE/DECVAX software fp load addressible double entry,
		added bogus left spec EDX to prevent EDX from being used
		for indexing (which would make the second fetch invalid).

Thu Feb  6 10:35:24 1992 PST
n2/i386/optab.c
		Corrected incorrect opbits for salw, sarw, shlw, shrw.
		The compiler was putting out byte move bits rather than
		word move bits.

Thu Feb  6 11:58:45 1992 PST
n1/pool.c
		Rewrote DCON compare and copy loops using memcmp() and memcpy().
common/talloc.c
		Rewrote talloc() to zero tree node with memset().

Thu Feb  6 14:13:54 1992 PST
h/cc0.h
		Added macros sgn2uns() and uns2sgn() used by expr.c kludge.
n0/expr.c
		In build(), added ADIV/AREM code to preserve unsigned right
		operands, with lengthy explanatory comment.
n1/i386/tables/adiv.t
n1/i386/tables/arem.t
		Modified to do unsigned divide if either operand is unsigned.

Fri Feb  7 15:38:43 1992 PST
n1/i386/tables/adiv.t
n1/i386/tables/arem.t
		Corrected signed [char|short] / unsigned to sign-extend the
		result in value context.
Fri Feb  7 16:49:40 1992 PST
n1/out.c
		Added code at label outadr to call new function mappfx()
		if opv is nonzero; mappfx() generates LO LO or LO prefix
		bytes for byte or word operands.  This allows the code tables
		to apply the TL, TR and TN macros to register operands,
		so similar code table entries can be merged.
		This greatly simplifies the tables.
n1/i386/outmch.h
		Added function mappfx().
		Added ZTEST to opcode list understood by maptype().
h/i8086/cc1mch.h
		Defined mappfx() to cause a cbotch() error; the i8086 code
		tables do not currently use TL, TR or TN as outlined above.
n1/i386/tables/prefac.f
		Added definitions SINT, UINT and FLD, useful in merged
		code table entries.
n1/i386/tables/div.t
n1/i386/tables/rem.t
		Added comments, no significant changes.
n1/i386/tables/aadd.t
n1/i386/tables/adiv.t
n1/i386/tables/add.t
n1/i386/tables/aft.t
n1/i386/tables/alogic.t
n1/i386/tables/amul.t
n1/i386/tables/and.t
n1/i386/tables/arem.t
n1/i386/tables/ashift.t
n1/i386/tables/assign.t
n1/i386/tables/asub.t
n1/i386/tables/bef.t
n1/i386/tables/leaves.t
n1/i386/tables/sub.t
		Simplified by merging code table entries with TL macro.

Sun Feb  9 13:27:52 1992 PST
n1/i386/tables/leaves.t
n1/i386/tables/relop.t
		Combined a few more code table entries using TL.
n1/i386/reg1.c
		Added test for byte left or right type in bytereg();
		the modified code tables use PBYTE on entries which can
		be used for dword and word as well as for byte.

Tue Feb 11 11:44:27 1992 PST
n1/i386/tables/sub.t
		Corrected node type of DWORD - DWORD from LONG to DWORD,
		so that pointer - int subtraction works.

Thu Feb 20 17:02:07 1992 PST
n0/i386/bind.c
		At cef's instigation, forward struct/union/enum references
		now generate a cerror() complaining that the alignment of
		the object is unknown rather than a cbotch().
n1/i386/tables/leaves.t
		Added PTX to _ducvt patterns to avoid no match on
		pointer to double conversions; yuck.
n1/i386/outmch.c
		In outargs(), corrected stack adjust after memcpy() call
		from 8 to 12 bytes; structure args were simply wrong before.

Thu Feb 20 22:40:58 1992 PST
n0/gdecl.c
		In genum(), added local envmin to keep track of min value of
		enumeration.  The type was previously set to unsigned char
		(incorrectly) when enumeration contained a value less than 0.

Thu Feb 20 23:41:23 1992 PST
n2/i386/asm.c
		In BLOCK code, added "if (pass != 0)" to else statement.
		The old code was incorrectly writing BLOCK bytes more than once.

Fri Feb 21 08:49:11 1992 PST
h/cc1.h
n1/mtree1.c
n1/i386/mtree2.c
n1/i8086/mtree2.c
		Added new routine lval_t constcvt(t, val) to convert
		lval_t constant val to type t; called from machine-independent
		tree modifier in mtree1.c for casts and conversion nodes.
		For code like
			int x = (unsigned char)-1;
		the code generator was previously modifying the rhs from
		(S32)(U8)((S32)-1) to (S32)((U8)-1) to ((S32)-1),
		without actually truncating the bits in the constant.
		constcvt(U8, (lval_t)-1) now converts the bits to 255,
		giving the expected result.

Wed Mar  4 15:11:14 1992 PST
n0/get.c
		In get(), changed case DIV to not perform special comment
		processing if cstate!=0, i.e. in false conditionals.
		michael reported a bug with incorrect processing of the
		quoted string "/*.*" in a false conditional.

Fri Apr  3 23:11:18 1992 PST
		Fairly extensive changes to allow building i386
		compiler as monolithic compiler rather than as driver
		with exec'ed phases.  To build a monolithic compiler,
		OVERLAID and MONOLITHIC in "host.h" must both be 1.
		For in-core tempfiles, TEMPBUF in "mch.h" must also be 1.
Makefile
coh/Makefile
common/Makefile
n0/Makefile
n1/Makefile
n2/Makefile
n3/Makefile
		Add target "mcc" for monolithic COHERENT compiler.
		Added targets cc[0123].a used in building monolithic compiler.
		Change "ar" references to "$(AR)" to allow building
		native cc386 compiler on cross system.
coh/cc.c
		Revised to produce monolithic COHERENT compiler
		with in-core tempfiles.  Added -Lpathname option,
		passed to linker.  Added -T[value] option to specify
		size of in-memory tempfiles (default: 64K).
common/talloc.c
		Add routine freetree() to free tree nodes if monolithic.
h/host.h
		Define OVERLAID and MONOLITHIC as 1 if _I386,
		to make i386 compiler monolithic instead of phases.
h/i386/mch.h
		Change TEMPBUF to 1 for monolithic compiler.
n0/cc0.c
		Modified fairly extensively for monolithic compiler.
		Added cppfinal().
n0/cc0key.c
		Changed keyword initialization extensively
		to work correctly for monolithic compiler.
n0/cc0sym.c
		Added code to free INFO and DIM pointer chains of symbols
		in downlex().
n0/cpp.c
		Added code to free hide sets if monolithic.
n0/gdecl.c
		In cast(), added xdropinfo() call so that INFO items
		get dropped appropriately after cc0.
		Added code to allow (with warning) trailing ',' in enum list.
n0/i386/bind.c
		Added MONOLITHIC initialization in vinit().
n1/cc1.c
		Changed freenode() calls to freetree().
n1/node.c
		Delete freenode().  Other minor cosmetic changes.

n2/i386/outcoff.c
		Added MONOLITHIC initialization.
		
h/cc0.h
		Changed size of define buffer for _I386 only, from 1K to 2K,
		as requested by Esa Ahola via norm.

Tue Apr 28 11:01:52 1992 PDT
n0/cc0key.c
n0/expand.c
		Conditionalized out __STDC__.  The ANSI C Standard says
		a nonconforming compiler should define __STDC__ as 0,
		which the source did (correctly), but too many sources
		use #ifdef __STDC__ (incorrectly) rather than #if __STDC__,
		so the source now does what the misguided users expect.

Tue Apr 28 11:43:32 1992 PDT
n0/expr.c
		In build(), added code to allow users to write
			(sp->fn)();
		(horseshit code, sez norm) when they really mean
			(*(sp->fn))();
		This now gives an "implicit '*' added to function call"
		warning when this happens.

Tue Apr 28 11:47:46 1992 PDT
h/ops.h
		Changed NCSYMB from 128 to 256, to allow longer symbols,
		as requested by norm.

Tue Apr 28 14:32:19 1992 PDT
n1/i386/mtree2.c
		In modcall(), added call to fixtoptype().
		This fixes a bug which caused e.g.
			return (*(sp->pcf))();
		to fail with an aerr; here pcf is a pointer to a function
		returning char (not int).   I think it's wrong in the parser,
		but the fix in cc1 was the simplest I could find.

Tue Apr 28 15:01:07 1992 PDT
common/bput.c
		Added #if TEMPBUF code to realloc temporary buffers when
		cc runs out of space.
h/stream.h
		Added definition of tempsize, required by bput.c change.

Tue Apr 28 16:06:56 1992 PDT
coh/cc.c
n2/i386/outcoh.c
n2/i386/outcoff.c
n3/cc3.c
n3/i8086/igen.c
n3/i386/igen.c
		Modified compiler to put strings in text segment by default.
		Set -VPSTR by default, and put strings in data segment if
		-VPSTR is toggled (reset).  Modify the disassembler accordingly.

Wed Apr 29 13:04:12 1992 PDT
coh/cc.c
		Changed driver to exec ld rather than forking if _I386.
		Pass new -Z option to ld to remove object if appropriate.
		Added _addargs() call to process CCHEAD and CCTAIL.

Wed Apr 29 15:52:30 1992 PDT
n0/i386/bind.c
		Corrected fieldalign().  This fixes a bug discovered by michael:
		a #pragma align, the old code sometimes bumped bitfields to the
		next char/word/dword boundary inappropriately.
coh/cc.c
		Fixed driver to do -A correctly if monolithic and to
		reinitialize global nerr (diag.c error count) appropriately.

Thu Apr 30 16:41:26 1992 PDT
coh/cc.c
		Added -f option in runas() for _I386.
n3/i386/icode.c
n3/i386/igen.c
		Added routine istring() to disassemble strings as readable text.
		Changed assembler -S output to write .link and .string for
		SLINK and SSTRN, because otherwise they end interspersed with
		code in the text segment.

Thu Apr 30 17:13:56 1992 PDT
n2/i386/unasm.c
		Fixed bogus branch over branch code, a vestige of i8086,
		no longer required.

Thu Apr 30 17:56:56 1992 PDT
n0/sharp.c
		Added code (flying jump into middle of switch, gak) to
		allow "# 123" as alternative to "#line 123" per ATT.

Fri May  1 13:59:28 1992 PDT
n1/i386/tables/leaves.t
		Corrected floating -> integer shrink entries to fix
		regression suite bug discovered by cef.

Thu May  7 00:41:04 1992 PDT
n0/cc0.c
		Rewrote cppfinal() slightly to correct bug: e.g.
			#define	void	int
		resulted in "Bad pointer in free" when cppfinal()
		tried to free the keyword table entry by mistake.

Thu May  7 12:32:35 1992 PDT
coh/cc.c
		Added code to err_close() to copy warning messages
		to stdout; cef noted that they were disapearing
		under -A if parsing was otherwise successful.

Thu May  7 14:31:59 1992 PDT
n3/cc3.c
n3/i386/igen.c
n3/i8086/igen.c
		Added cc3close() to cc3.c and dummy cc3close() in i8086/igen.c.
		Modified i386/igen.c to write each output segment to a
		separate temp file, then combine the files at the end.
		This allows the assembler to assemble the .s output and
		produce (we hope) the same bits as the compiler .o output.

Tue May 12 11:52:14 1992 PDT
h/cc0.h
		Bumped _I386 value of NDBUF (again) from 2048 to 4096,
		Esa Ahola reported that Gnu code included horrible
		macros which expanded to more than 2K characters.

Tue May 12 13:25:41 1992 PDT
n1/output.c
		In output() isrelop code, added test for op==QUEST at end.
		The code output routine contained a longstanding bug:
		in a relational context, a comma operator with a ?: on
		the rhs produced a "no patp" botch (because it called
		outtree() on the QUEST tree, rather than trying output() again).

Tue May 12 15:58:13 1992 PDT
h/i8086/cc3mch.h
n3/i8086/igen.c
		Defined cc3init() and cc3close() as empty macros in cc3mch.h
		rather than as empty routines in igen.c, for efficiency.
		These routines are unused for i8086 compiler.

Wed May 13 13:12:55 1992 PDT
n1/i386/tables/shift.t
		Changed entry using "shift by %cl" form from ANYR to explicitly
		use EAX as temp.  norm and epstein found a nasty code generation
		bug caused by using ECX as temp and CL (simultaneously) as
		shift count, causing incorrect code to be omitted.

Thu May 21 09:51:31 1992 PDT
n1/i386/tables/shift.t
		Changed left arg types of both entries from LONG to DWORD.
		LaMonte discovered that the code
		        ((unsigned long)( &foo )) << 1;
		gave a no match error.

Tue May 26 12:24:41 1992 PDT
coh/cc.c
		At cef's request, modified runld() and runas() #if _I386
		to supply arguments -q to ld and -w to as if cc -Q used.

Tue May 26 15:08:32 1992 PDT
cpp/cpp.c
		Removed test for argc > 1, which allows cpp to be used
		purely as filter.
n0/cc0.c
		If !MONOLITHIC, added test of argument filename for "-",
		to allow invocation from cpp with args "cc0 var - -",
		so cpp can act purely as a filter.
host.h
		Changed MONOLITHIC conditionalization, the right values
		now depend on how you want to build it.

Tue May 26 17:40:13 1992 PDT
n1/mtree0.c
		In modtree(), added code to change "&(a,b)" to "a,&b".
		Esa reported a fatal collect error due to code like
			return i = 0, s;
		where s is a structure type.

Wed May 27 08:59:03 1992 PDT
n2/i386/asm.c
n2/i386/emit1.c
n2/i386/outcoff.c
		At norm's request, modified output writer to emit NOP
		(0x90, i.e. xchg %eax, %eax) rather than 0 to perform
		alignment in code segment.  This is helpful to disassemblers.
		outnzb() now takes extra flag arg to indicate segment.

Mon Jun  1 15:49:51 1992 PDT
n0/gdecl.c
		In gstruct() and genum(), added code to save and restore
		global TOK *idp around calls to lex().  This fixes a very
		venerable bug which cef's test suite calls trevor.c:
			#define	begin	{
			#define	end	}
			struct	s	begin
				int	s_i;
			end
		mistakenly defined the struct tag "begin" rather than "s".

Mon Jun  1 16:48:26 1992 PDT
h/i386/mch.h
		Corrected definition of UIMASK from 0xFFFFFFFL to 0x00000000L.
		The definition resulted in bogus promotion warnings.

Tue Jun  2 14:49:01 1992 PDT
n3/i386/igen.c
		Added missing "ofp = sfp[SCODE];" in cc3close().
		The disassembler changes which write each segment to a
		different temp file needs this, otherwise (as norm noted)
		files which do not end with code send the final segment
		to the disassembler bit bucket.

Wed Jun  3 08:34:20 1992 PDT
coh/cc.c
		At cef's request, changed runld() to invoke ld -Q rather
		than ld -q when cc is invoked with -Q.

Wed Jun  3 15:46:51 1992 PDT
n1/mtree1.c
		For Promula's benefit, modified NLNODE and NONODE #if _I386
		from 20 to 128.  This allows more complex associative
		expressions.

Fri Jun  5 09:21:47 1992 PDT
n1/i386/gen2.c
		In the double to float conversion routine flvaldval(),
		added code to perform mantissa rounding.  Promula reported
		that the values produced by float and double initializations
		were different, because the old code truncated the mantissa.

Fri Jun 12 13:16:16 1992 PDT
n3/i386/igen.c
		At cef's request, added "\t.alignoff\n" to cc -S output
		(after module name).  The compiler puts out explicit
		.align requests as needed, so the assembler should not
		be performing alignment on its own.

Wed Jun 24 11:07:56 1992 PDT
n0/cc0.c
		In cc0() arg handling code, case 'D', add
			*--p = '+';
		to restore cpp arg "-DFOO=foo" to its previous state.
		cc0() was replacing the '=' with NUL, which caused
		incorrect results for mcc with multiple file args.

Wed Jun 24 11:35:40 1992 PDT
coh/cc.c
		In chkofile(), change to allow special case
			cc -c -o a.out foo.c
		for the benefit of AT&T Cfront script.  Previously,
		the compiler complained about the funny output name.
		[This change withdrawn 6/25/92, see next entry.]

Thu Jun 25 12:18:44 1992 PDT
coh/cc.c
		Withdrew yesterday's a.out-specific hack.
		Instead, added new option "-a", which tells cc
		not to generate a ld output name automatically.
		Thus, "cc -a foo.c" ends up creating "a.out", as desired.

Fri Jun 26 09:08:59 1992 PDT
n0/cc0.c
		6/24/92 fix for -DFOO=foo caused cc to core dump,
		now fixed correctly.

Mon Jun 29 11:34:16 1992 PDT
		Changes to allow NDP coprocessor floating point code
		generation, as follows:
h/i386/mch.h
		Added register FPAC, meaning the coprocessor stacktop %st.
		Renumbered pseudoregisters accordingly.  Added BPFAC.
common/i386/regnam.c
n1/i386/gen1.c
n1/i386/table1.c
		Modified register tables to include FPAC.
		Modified pertype table in table1.c to indicate that
		double functions return value in FPAC #if NDP.
n1/i386/tables/leaves.t
		Changed globals tstccp() and dp87() to _tstccp() and _dp87().
n1/i386/tables/relop.t
		Changed global cfcc() to _cfcc().
n1/i386/tables/add.t
n1/i386/tables/sub.t
n1/i386/tables/aadd.t
n1/i386/tables/asub.t
		Corrected NDP table entries using OP1 to use appropriate
		fp opcode instead.
n1/i386/mtree2.c
		Deleted bogus '{' in #if NDP code.
		Added missing #if NDP modxfun() call for float->fixed casts.
n2/i386/asm.c
		Corrected bogus "outsb()" call and A_PREFX code,
		both artifacts of i8086 NDP code.

Wed Jul  1 16:26:09 1992 PDT
n2/i386/asm.c
		Simplified V80287 code, another i8086 remnant.  Since the
		processor is always 80x86, the extra FWAITs preceding
		coprocessor instructions in i8086 are no longer required.
n3/i386/icode.c
		Renamed NDP floating point opcodes to conform to assembler.

Wed Jul  8 15:21:28 1992 PDT
n0/stat.c
		Added code to SWITCH to allow long or unsigned long switch
		expressions when sizeof(int)==sizeof(long), i.e. for i386.
		A switch with long switch expression failed before, now works;
		issues "Strict" warning if -VS specified, silent otherwise.

Wed Jul  8 17:08:40 1992 PDT
n0/ddecl.c
		A beta site reported that e.g.
			enum e { ONE, TWO, THREE };
			struct s {
				int	s_i;
				enum e	s_e:8;
			};
		died with an internal error, traced to fieldalign botch.
		Changed declare() to adjust the type of a {struct|union} member
		which is an enum to the base type of the enum, now at least
		the above example works.

Mon Jul 13 11:25:22 1992 PDT
common/bput.c
		Changed error message
			out of space in memory buffer
		to
			out of space in memory buffer; try "-T0" option
		for the benefit of the poor user.
n0/stat.c
		At norm's suggestion, changed VSCCON code in truth() to
		run down a list of assignments, so that e.g.
			if (i = 1)...
		rather than
			if (i == 1)...
		generates a strict message if VSCCON is turned on.
h/cc1.h
		Changed NSTORE from 20 to 100 for i386 only.
		A beta user reported a "too many stores" internal error
		on a horrendous line (GNU, of course).

Tue Jul 14 13:16:21 1992 PDT
n0/gdecl.c
		In gstruct(), fixed "nbpstrg" code to make sure nbpstrg is
		nonzero.  The old code caused a zero-divide core dump on e.g.
			typedef	union	node {
				struct s1 {
					int	n_type;		 
					union	node *n_next;	 
				};
			} NODE;
		when compiled without -VSINU.

Thu Jul 16 09:05:41 1992 PDT
n0/i386/bind.c
		In fieldalign(), fixed alignment code yet again.
		Nested structs or unions were getting dword-aligned
		rather than aligned according their widest member.  Thus,
			typedef	struct	match {
				short	ma_dist;
			        union	{
			  		unsigned short	ma_length; 
			  		unsigned char	ma_litc[2];
				} l;
			} MATCH;
		resulted in sizeof(MATCH) being 6, because the union was
		dword-aligned instead of word-aligned; now sizeof(MATCH) is 4.
		In aligntype(), recoded loop which runs down DIM list to
		avoid dereferencing (NULL)->d_type.

Thu Jul 16 10:00:33 1992 PDT
n3/i386/icode.c
		In opcode table, changed "movzx" to "movzxw" and
		"movsx" to "movsxw" to avoid operand length ambiguity.

Thu Jul 16 14:57:40 1992 PDT
coh/cc.c
		Recognize new option -VCPPC.
h/var.h
		Added new variant VCPPC, renumbered other variants accordingly.
cpp/cpp.c
		New options -C (invoke cc0 with -VCPPC) and -P (same as -E).
		Cleaned up code slightly.
n0/get.c
		Added code to not suppress comments if -VCPP and -VCPPC.

Wed Jul 29 10:31:39 1992 PDT
n0/stat.c
		In dolabel(), added line to set s_dline field for labels.

Wed Jul 29 12:49:49 1992 PDT
h/cc0.h
		At hal's request, bumped NDLEV for i386 from 128 to 256,
		for the benefit of some C++-generated headers.

Wed Aug  5 09:04:53 1992 PDT
coh/cc.c
		Added -g option, same meaning as -VDB, for Unix compatability.
n2/i386/outcoff.c
		Extensive changes to add debug output support.

Wed Aug  5 20:17:13 1992 PDT
n0/sharp.c
		Changed cppexpr() to read constant expressions with cstate==0,
		so that comments are handled correctly.

Thu Aug  6 11:37:45 1992 PDT
n0/init.c
		hal noted that the one-liner
			char c[] = "abc/*defg";
		died with a bogus "EOF in comment" error.
		The code which reads a string initializer
		now sets the "instring" flag to tell the cc0 lexer
		to treat "/*" as ordinary characters, so now it works.

Fri Aug  7 09:49:26 1992 PDT
n2/i386/outcoff.c
		Added "incomplete debug information" fatal messages
		for modules compiled with e.g. -VDSYMB rather than -VDB.

Mon Aug 10 13:13:47 1992 PDT
coh/cc.c
		In runld(), changed unconditional arg -X to either
		-X (if !-VDB) or -g (if -VDB).

Mon Aug 11 10:26:58 1992 PDT
coh/cc.c
		Changed PTMP from 16 to 32 to allow longer pathnames.

Tue Aug 11 10:48:09 1992 PDT
n0/init.c
		Corrected above change for string initializers to handle
			char a[] = "one line and "
				   "another line\n";
		without complaining about newline in string literal.

Thu Aug 13 15:17:31 1992 PDT
n2/i386/outcoff.c
		Modified db_func() to write LNNUM entry for each function.

Fri Aug 14 12:50:05 1992 PDT
n2/i386/outcoff.c
		V4.0.2: Modified to write .comment section containing
		translator id and version number if debug.
n1/i386/tables/aft.t
n1/i386/tables/bef.t
		Changed node type pointer bumping code table entries from
		PTX to DWORD.  cef discovered that code like
			l = (long)++lp;
		caused a no match error.

Tue Aug 25 10:32:36 1992 PDT
n1/mtree0.c
		V4.0.3: In modtree(), in the relational section,
		added code to modify
			(a ? b : c) op 0
		to
			a ? b op 0 : c op 0
		This fixes a "no match" botch reported by cef for the code
			if (!(a ? b : (c & 1)))
				;

Tue Aug 25 14:11:06 1992 PDT
n0/get.c
		V4.0.4: In get(), check cstate in HIGH* case so high-bit-set
		characters get ignored inside false conditionals.
n0/lex.c
		In lex(), case QUOTE, set 'instring' before reading char
		so single-quoted high-bit-set characters work.

Wed Aug 26 09:21:29 1992 PDT
n0/fold.c
		Cosmetic changes only, no substantive change.

Thu Aug 27 09:34:46 1992 PDT
n0/cc0.c
		V4.0.5: Added local argv2, a modified copy of argv[2],
		to prevent MONOLITHIC compiler problems with cc -A filename.
		Added missing "notskip" initialization #if MONOLITHIC.

Wed Sep  2 13:26:33 1992 PDT
n3/cc3.c
		In main(), added missing "dotseg = -1;" for non-MONOLITHIC.

Mon Sep 21 10:46:58 1992 PDT
n1/i386/mtree2.c
		V4.0.6: In modefld(), fixed bug reported by cef involving
		unsigned bitfields (an enum bitfield in the case he discovered
		while compiling gcc); basically,
			struct s1 { unsigned char c : 2; } s1;
			struct s2 { unsigned char c;     } s2;
			if (s1.c != s2.c) ...
		produced a fatal "no match" error which did not happen
		if the bitfields were signed rather than unsigned.

Thu Sep 24 09:26:35 1992 PDT
n0/i386/bind.c
		V4.0.7: cef reported another problem from gcc compilation:
			enum e { foo, baz, bar };
			struct s { enum e s_e:16; }
		died on the second line with a fatal "field too wide" error,
		because the parser didn't like putting the 8-bit wide enum
		into a 16-bit field.  I see no reason for this restriction,
		so I eliminated the "field too wide" check entirely.

Wed Sep 30 14:08:21 1992 PDT
coh/cc.c
h/var.h
		V4.0.8: Replaced the unimplemented variant option -VCHASM
		(generate C-style assember, which rec planned but
		never executed, at least in this compiler base) with -VCPLUS.
		The latter tells the compiler to ignore
		C++ style //-delimited online comments.
n0/get.c
		In get(), case DIV, added code to recognize C++ online comments.

Thu Oct  1 14:36:09 1992 PDT
n1/i386/mtree2.c
		V4.0.9: in modlfld(), added code to make the top type
		of modified lvalue field tree computation.  This fixes
		a no match bug reported by cef for assignment of
		non-immediate values to char or short bitfields.

Thu Oct  1 17:10:16 1992 PDT
coh/cc.c
		V4.0.A: added missing VWIDEN to variant list to enable
		warnings on adjusted formal parameter types.

Tue Oct 20 07:40:09 1992 CDT
n1/i386/tables/asub.t
		Modified NDP code table entry, the old version used ZFSUB
		rather than ZFSUBR and thus got the incorrect result sign.

Wed Oct 21 17:07:42 1992 CDT
h/i386/mch.h
		Conditionalized NRREG on #if NDP so that isrealreg() is
		true for the FPAC (%st) in the NDP compiler.
n1/i386/table1.c
		Conditionalized register table entry for EDXEAX so that
		the register kind is 0 #if NDP, KD otherwise, to avoid having
		the code generator try to stick NDP doubles in %edx:%eax.

Thu Oct 22 12:09:24 1992 CDT
h/i386/opcode.h
		V4.0.B:  added is_ndp_op() macro.
n1/i386/outmch.c
		Changed #if NDP code to use is_ndp_op() to determine if
		a given opcode is an NDP operation, for the benefit of the
		TL/TR/TN macros.

Mon Nov  2 21:47:00 1992 PST
n2/cc2.c
		V4.0.C:  Added "gendbgt(-1);" call to reinitialize debug item
		count #if MONOLITHIC.
n2/dbgt2.c
		Added #if MONOLITHIC code to getdbgt() to reset drefnum = 0;
		for arg -1.  This fixes a bug reported by CAD-UL:
		"cc -g *.c" would botch after the first source file.
n2/i386/outcoff.c
		In outdloc(), before the recursive call of outdloc() while
		processing member list, added "--refnum;" to fudge the
		reference number.  This fixes another debug info (-g) problem
		reported by CAD-UL: local struct or union declarations
		confused the refnum count, so e.g.
			f(){ struct s { int s_i; } s; s.s_i = 1; }
		caused a compiler botch when compiled with -g.

Wed Nov 11 16:47:34 1992 PST
n0/expr.c
		V4.0.D:  Changed the way the expression builder build()
		handles voids.  nigel motivated this by complaining about
			extern void void_fn();
			(a) ? (void)0 : voidfn();
		not compiling; a more dramatic form of the same problem is
			extern void void_fn1(), void_fn2();
			(a) ? void_fn1() : void_fn2();
		In the old code, void was legal on either side of ","
		or lhs of ":" (don't ask why, I don't get it either),
		any other usage produced "illegal operation on void type" error.
		Now, ":" can have void on both sides (but not on just one side),
		"?" can have void on rhs (i.e. on both sides of its ":"),
		and "," can have void on either side as before;
		all other usages are illegal.

Fri Nov 13 16:37:30 1992 PST
n2/i386/peep.c
		V4.0.E: at cef's suggestion, modified noeffect() to note
		that "add %esp, $n" or "pop %ecx" before "leave" has
		no effect.
n2/i386/emit1.c
		Added comment noting that peep.c/noeffect() knows details
		of the epilogue code generation; no substantive changes.

Mon Nov 23 10:29:05 1992 PST
n2/i386/outcoff.c
		V4.0.F: Fixed setrefnum() to create symbol entries for
		items with no associated debug information.  In particular,
		internally generated calls (e.g. "_dicvt" for fp or "memcpy"
		for structure assignment) caused fatal errors with -g.
		This fixes a bug reported by user H. C. Pulley.

Wed Dec  2 11:16:19 1992 PST
n0/stat.c
		In statement(), case RETURN, added code to check if cfsym==NULL
		before fetching through it.  The old code produced segmentation
		violation core dumps in code where an inadvertent extra '}'
		caused the parser to get confused.
n2/optim.c
		In fixbr(), added code to optimize out conditional branch
		followed by unconditional branch to same location.
n1/mtree0.c
		V4.0.G: In modtree(), rearranged code added on 8/23/92
		(cf. above) slightly.  This fixes a bug reported by
		Bill Raudabaugh, namely a no match on code like:
			if (!((a ? b : c) != 0))
				;

Wed Dec  2 14:08:53 1992 PST
n1/i386/leaves.t
		V4.0.H: Added "|PTX" to flag bits for unsigned to
		non-NDP double or float conversion entries.
		Previously, the compiler produced a no match error on e.g.
			char *f() { return 1.0; }

Thu Dec  3 12:12:24 1992 PST
n2/i386/outcoff.c
		V4.0.I: Fixed db_strcmp() after user H. C. Pulley reported
		fatal error caused by incorrect comparison of long C name
		to 8-character debug name matching the first 8 characters.
h/i386/cc1mch.h
		Deleted getstar() definition, typo for genstar() and unused.
coh/cc.c
h/i386/varmch.h
		Added variant VXSTAT for Comeau.
n2/i386/outcoff.c
		Added code to write static external items if isvariant(VXSTAT),
		for Comeau.

Wed Dec 16 13:04:25 1992 PST
n2/i386/outcoff.c
		V4.0.J: In copycode(), do not set F_LSYMS and F_LNNO flags in
		COFF header only if compiled -g; cc always set them previously.

Fri Dec 18 13:15:58 1992 PST
coh/cc.c
		V4.0.K: In makelib(), add #if _I386 code to simply pass "-lfoo"
		to ld rather than trying to expand it; this allows -L to work
		as expected.

Wed Dec 23 13:14:37 1992 PST
		V4.0.L: Previously, the choice of software fp vs. NDP hardware
		fp was made when the compiler was built (NDP in mch.h and
		NDPDEF during tabgen).  The following extensive changes allow
		a single compiler executable to write either software fp
		(default, no -VNDP) or NDP fp (if -VNDP).
coh/cc.c
		Add option VNDP.
h/i386/cc2mch.h
		Remove #if NDP conditionalization on extern int hasfloat.
h/i386/mch.h
		Remove NDP definition.  Change !NDP NRREG definition from
		25 to 26, corresponding to change in table1.c below.
h/i386/opcode.h
		Remove #if NDP conditionalization of NDP opcodes.
h/i386/varmch.h
		Add option VNDP.
n1/i386/gen1.c
		In coderinit(), modify table entries in table1.c if -VNDP.
		Change "#if NDP" compile-time conditionalization to
		"if (isvariant(VNDP))" run-time conditionalization
		in code which zaps inappropriate code table entries.
n1/i386/mtree2.c
		Change #if NDP conditionalization, as above.
n1/i386/outmch.c
		Remove #if NDP conditionalization.
n1/i386/table1.c
		Change #if NDP conditionalization on table entries for
		registers EDX:EAX and FPAC and type F64.  The entries now
		assume software fp by default, n1/i386/gen1.c/coderinit()
		modifies them if -VNDP.
n1/i386/tables/aadd.t
n1/i386/tables/add.t
n1/i386/tables/adiv.t
n1/i386/tables/amul.t
n1/i386/tables/assign.t
n1/i386/tables/asub.t
n1/i386/tables/div.t
n1/i386/tables/leaves.t
n1/i386/tables/mul.t
n1/i386/tables/neg.t
n1/i386/tables/relop.t
n1/i386/tables/sub.t
		Remove #ifndef NDPDEF and #ifdef NDPDEF code table conditionals.
n2/i386/asm.c
n2/i386/emit1.c
		Remove or change #if NDP conditionalization appropriately.
		Add #if 0 conditionalization on VEMU87 code, currently unused.
n2/i386/optab.c
		Remove #if NDP conditionalization of NDP opcodes.
n2/i386/unasm.c
		Add #if 0 conditionalization on VEMU87 code, currently unused.
n3/i386/icode.c
		Remove #if NDP conditionalization.


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.