|
|
1.1 ! root 1: Steve's cc386 compiler change log ! 2: Begun 1/4/93, earlier logs in Changes.1992. ! 3: ! 4: Tue Jan 5 12:14:38 1993 PST ! 5: n0/gdecl.c ! 6: In gdecl(), s==LPAREN, deleted "aok = 0;" line. ! 7: nigel complained that e.g. ! 8: int (f)(arg) int arg; {} ! 9: confused the parser (because of the parens around the "f"). ! 10: This line looks odd to me, but nigel had a good reason for ! 11: wanting it to work, and more to the point it is perfectly ! 12: acceptible syntax for both K&R and ANSI. ! 13: Also trivial cosmetic changes. ! 14: ! 15: Tue Jan 5 17:35:34 1993 PST ! 16: n1/i386/tables/leaves.t ! 17: V4.0.N: added PNDP to code table entry to load addressible ! 18: doubles in argument context, so that e.g. fn(d) generates ! 19: push d+4 ! 20: push d ! 21: for addressible d rather than ! 22: fldl d ! 23: call _dp87 ! 24: as before. ! 25: ! 26: Tue Jan 5 21:08:45 1993 PST ! 27: coh/cc.c ! 28: In runld(), added isvariant(VNDP) code to look for rts ! 29: in /lib/ndp and pass -L/lib/ndp to ld, as suggested by cef. ! 30: Before, e.g. "cc -VNDP a.c -f" would execute ! 31: /bin/ld -X -o a /lib/crts0.o -u _dtefg a.o -lc ! 32: Now, when -VNDP is specified, it looks for the rts in /lib/ndp ! 33: and passes -L/lib/ndp to ld, as in: ! 34: /bin/ld -X -L/lib/ndp -o a /lib/ndp/crts0.o -u _dtefg a.o -lc ! 35: and you get the right rts and library when you link. ! 36: ! 37: Tue Jan 26 09:50:55 1993 PST ! 38: coh/cc.c ! 39: Added -L/usr/lib/ndp to ld invocation if -VNDP. ! 40: n1/i386/tables/leaves.t ! 41: Added "fwait" at beginning of double push entry (cf. 1/5/93 ! 42: change above), to completion of pending NDP operations. ! 43: ! 44: Thu Jan 28 10:27:00 1993 PST ! 45: cpp/cpp.c ! 46: Added -VCPLUS option for Comeau. Modified usage() message. ! 47: Added _addargs() call #if COHERENT to expand CPPHEAD, CPPTAIL. ! 48: ! 49: Tue Feb 9 10:47:51 1993 PST ! 50: coh/cc.c ! 51: common/diag.c ! 52: V4.1.1: moved diagnostic output from stdout to stderr. ! 53: ! 54: Wed Feb 10 16:19:54 1993 PST ! 55: coh/cc.c ! 56: common/diag.c ! 57: h/var.h ! 58: V4.1.2: deleted unimplemented VCALLS option, moved VLIB, ! 59: added VNOWARN option to suppress warning and strict messages. ! 60: ! 61: Thu Feb 11 13:30:40 1993 PST ! 62: coh/Makefile ! 63: Changed "cc" to "$(CC)" for gcc compilation. ! 64: common/bput.c ! 65: Changed "char *cp;" to "unsigned char *cp;" because gcc ! 66: complained about pointer subtraction char * minus uchar *. ! 67: n1/out.c ! 68: Added cast because of gcc complaint about pointer subtraction, ! 69: as above. ! 70: n2/i386/outcoff.c ! 71: In write_sym(), initialize n_type and n_numaux entries ! 72: appropriately. The gcc-compiled version was writing garbage ! 73: in symbol entries because these initializations were missing; ! 74: the cc-compiled version must have worked by accident. ! 75: ! 76: Fri Feb 26 09:58:09 1993 PST ! 77: h/i386/cppmch.h ! 78: n0/cc0.c ! 79: V4.1.3: at nigel's request, for ISO compliance, cpp now defines ! 80: not only COHERENT, MWC, _IEEE and _I386, but also ! 81: __COHERENT__, __MWC__, __IEEE__, and __I386__. ! 82: ! 83: Mon Mar 1 08:53:08 1993 PST ! 84: n1/i386/tables/div.t ! 85: n1/i386/tables/mul.t ! 86: n1/i386/tables/rem.t ! 87: V4.1.4: User Alexander Shendi reported that the line ! 88: cp = (char *)(((int) cp1) % ((int) cp2)); ! 89: gave an internal error, actually a no match on the '%'; ! 90: The code tables expected the result of the '%' ! 91: to be LONG (int or uint), and the (char *) cast on the '%' node ! 92: caused the type to mismatch. The same code also failed for '*' ! 93: and '/'. The code sucks, but it is legal and there's no ! 94: reason why it should fatal the compiler. Changed the node ! 95: type on appropriate code table entries from "LONG" to "DWORD" ! 96: and now it works. ! 97: ! 98: Tue Mar 2 17:54:00 1993 PST ! 99: n0/cc0.c ! 100: V4.1.5: hal complained that ! 101: typedef foo baz; ! 102: where foo is not defined gave ! 103: 1: a.c: missing semicolon ! 104: which is none too clear. Now it says ! 105: 1: a.c: illegal typedef ! 106: instead. ! 107: ! 108: Wed Mar 3 17:45:30 1993 PST ! 109: n0/expr.c ! 110: V4.1.6: hal complained about the strict warning produced by: ! 111: struct s1 { int s_i; } s1; ! 112: struct { int s2_i; } s2; ! 113: f() { s2.s_i = s1.s_i; } ! 114: which was ! 115: 3: b.c: Strict: structure ".1" does not contain member "s_i" ! 116: where the ".1" is the compiler-generated tag for the untagged ! 117: structure. Now the warning message says ! 118: 3: b.c: Strict: structure does not contain member "s_i" ! 119: instead. ! 120: ! 121: Wed Mar 24 09:25:43 1993 PST ! 122: n2/i386/outcoff.c ! 123: V4.1.7: changed the code which constructs derived type info ! 124: for DT_ARY, DT_PTR and DT_FCN in keeping with <coff.h> change. ! 125: ! 126: Thu Apr 1 15:31:33 1993 PST ! 127: n3/i386/igen.c ! 128: Write "\t.intelorder\n" near start of assembler output file. ! 129: ! 130: Wed Apr 7 22:02:30 1993 PDT ! 131: n0/gdecl.c ! 132: V4.1.8: In genum(), changed ! 133: deflookup(SL_VAR, LL_EXT); ! 134: to ! 135: deflookup(SL_VAR, ll); ! 136: to enter enumeration members in the symbol table ! 137: at the current lexical level, not at external level. ! 138: User H. P. Heidinger reported that e.g. ! 139: f() { enum e { e1 } fe; } ! 140: g() { enum e { e0, e1 } ge; } ! 141: gave a bogus redeclaration error, because the local enum ! 142: members were entered at the wrong lexical level. ! 143: ! 144: Thu Apr 8 14:54:51 1993 PDT ! 145: n0/init.c ! 146: V4.1.9: User H. P. Heidinger complained (as many have before) ! 147: that bitfield initialization was not supported; e.g. ! 148: struct s { ! 149: int s_bit0:1; ! 150: int s_bit1:1; ! 151: } s = { 1, 1 }; ! 152: previously got a "cannot initialize bitfields" error ! 153: from the parser. Added "bfinit()", now it works (I hope!). ! 154: ! 155: Mon Apr 12 11:47:33 1993 PDT ! 156: V4.2.0: Changed constant folder to fold unsigned constants ! 157: correctly and to fold double constants. ! 158: h/i386/mch.h ! 159: Added compilation option FOLD_DOUBLES. ! 160: This assumes host and target use same fp representation. ! 161: Added typedefs for uival_t and ulval_t, the unsigned types ! 162: corresponding to ival_t and lval_t. ! 163: h/cc0.h ! 164: Recoded opdope table constants from octal to hex. ! 165: Added new constant FOLD, indicating op can be folded. ! 166: Separated extern function definitions from variables. ! 167: Added dval_to_d() and d_to_dval, defined in bind.c. ! 168: n0/i386/bind.c ! 169: Added #if FOLD_DOUBLES code for dval_to_d() and d_to_dval(), ! 170: reversing byte order to convert host double to/from DCON. ! 171: n0/dope.c ! 172: Added FOLD to opdope for operations which support constant ! 173: folding; this allows fold0() to be much more efficient. ! 174: n0/fold.c ! 175: Extensive changes to handle typed constant folding (including ! 176: double constant folding). Previously, the constant folder ! 177: understood int and long constants but did not understand ! 178: unsigned or double constants. This meant ! 179: (1) it sometimes folded unsigned constants incorrectly, and ! 180: (2) it could not compile programs with constant double ! 181: expressions in initializers. ! 182: The new double constant folding code uses the host fp ! 183: arithmetic, but it is conditionalized #if FOLD_DOUBLES so that ! 184: it can be excluded for cross-compilation if desired. ! 185: ! 186: Mon Apr 12 13:32:45 1993 PDT ! 187: n1/mtree1.c ! 188: Cleaned up comments and formatting, no substantive changes. ! 189: ! 190: Mon Apr 12 15:36:54 1993 PDT ! 191: n1/mtree1.c ! 192: Rewrote fold1() for clarity. The handling of typed constants ! 193: here needs to be fixed up like n0/fold.c/fold0() above. ! 194: n1/i386/tables/aadd.t ! 195: V4.2.1: Changed the right argument types for two entries ! 196: in the += code table from LONG to DWORD to fix a "no match" ! 197: bug reported by H. P. Heidinger: ! 198: cp += (int)buf; ! 199: previously no matched for auto char buf[1]. ! 200: And why, you might ask, should the right type be DWORD ! 201: rather than LONG, i.e. why should allowing pointers on the ! 202: right matter in this case, where the right is not pointer? ! 203: The parser, knowing that T_PTR and T_INT are bit compatible, ! 204: changes the "&" node type it outputs from PTR to S32 ! 205: because of the cast and then writes the right arg as ! 206: &@ S32 ! 207: Aid S32 at -12 ! 208: (actually with a scaling multiply by 1 around it). ! 209: The automatic then gets expanded, resulting in ! 210: &@ S32 ! 211: *@ S32 flag=3000 ! 212: + Ptr flag=800 ! 213: Reg Ptr flag=400 %ebp ! 214: Icon S32 flag=a8 -12 ! 215: and the & * foo gets simplified to foo, leaving ! 216: + S32 flag=800 ! 217: Reg Ptr flag=400 %ebp ! 218: Icon S32 flag=a8 -12 ! 219: So far so good, the type of the add node is still S32. But ! 220: then the associative expression folder in n1/mtree1.c/fold1() ! 221: looks at this and adjusts the top type, as it must for ! 222: additions involving ints and pointers which have been ! 223: rearranged; it adjusts the ADD node type to ! 224: + Ptr flag=800 ! 225: Reg Ptr flag=400 %ebp ! 226: Icon S32 flag=a8 -12 ! 227: and this results in the "no match" in aadd.t because the ! 228: right type is inappropriate. Changing the right types in ! 229: aadd.t fixes the problem. ! 230: ! 231: Mon Apr 12 17:08:22 1993 PDT ! 232: n1/i386/tables/asub.t ! 233: V4.2.2: identical change to above for -= instead of +=. ! 234: ! 235: Thu Apr 15 12:06:35 1993 PDT ! 236: coh/cc.c ! 237: V4.2.3: Jeff Moskow ([email protected], 1-508-448-3959) ! 238: reported a bug which I traced to cc.c. ! 239: cc -DSTRING="\"\ ! 240: 12345678901234567890123456789012345678901234567890\ ! 241: <nine more lines identical to the above> ! 242: \"" a.c ! 243: caused odd behavior. The driver was copying each cpp arg ! 244: into a static (i.e. in .data) 64-character buffer without ! 245: bounds checking, eventually overwriting the static data ! 246: used to initialize the keyword table. Simplified the way ! 247: it works (the cpp arg copy was usually unnecessary!) ! 248: and added appropriate bounds checking. Finally figured out ! 249: the hacky code which allows runpp() and runld() to grovel ! 250: in the args when a single cc arg contains multiple arg types, ! 251: after looking at it many times before. Changed the _I386 ! 252: default for "-r" compilation from "l.out" to "a.out". ! 253: Added usage() as separate routine, mentioning -? option. ! 254: Added -? option to print verbose usage information. ! 255: Cleaned up some comments and added some others. ! 256: ! 257: Thu Apr 15 12:53:29 1993 PDT ! 258: coh/cc.c ! 259: Added a few comments. Deleted -k from verbose usage message, ! 260: since neither ld286 nor ld386 understands it. ! 261: ! 262: Fri Apr 16 12:13:08 1993 PDT ! 263: n0/expr.c ! 264: V4.2.4: In build(), case QUEST, added code to check if the ! 265: condition type is computational and insert a conversion node ! 266: if not. A bug reported by Jeff Moscow included code of the form ! 267: a = ((short)b) ? c : d; ! 268: While the noncomputational condition type did not appear to ! 269: cause any problems, it looks better if the type is correct. ! 270: n1/mtree0.c ! 271: For case CONVERSION/CAST, after the modtree(lp, ...) call, ! 272: check to see if the modified lp op is COMMA or QUEST; ! 273: the code above which distributes the conversion over the ! 274: COMMA or QUEST needs to be executed again in this case, ! 275: e.g. for (type1)(type2)((a)?b:c). At the same time, added ! 276: a test for (type1)(type2)type1 where type2 is wider, ! 277: in which case both the conversions are irrelevant. ! 278: Other minor nonsubstantive changes. ! 279: n1/i386/table0.c ! 280: Added clarifying comments, no substantive changes. ! 281: n1/i386/tables/leaves.t ! 282: Added comment about the asm.c kludge below to the appropriate ! 283: code table entry. No substantive changes. ! 284: n2/i386/asm.c ! 285: In assemble(), case OF_MOV, added code to kludge e.g. ! 286: movw %ax, %edi ! 287: to ! 288: movw %ax, %di ! 289: just like the similarly disgraceful kludge for ZMOV[SZ]W. ! 290: This fixes (after a fashion) a bug reported by Jeff Moscow: ! 291: for short s and int struct member i, his example was ! 292: a = (short)((((short)(p->i)) ? ((short)(p->i)) : (2))); ! 293: after macro expansion, but the much simpler ! 294: s = (short)(int)(short)i; ! 295: has the same bug, namely a fatal aerr() on the "movw" above. ! 296: Spent a lot of time trying to fix it cleanly, but ! 297: without success. The fix includes the similar char case (movb), ! 298: but I could not make that aerr() happen, the difference is ! 299: somehow related to the PBYTE and bytereg() code. ! 300: n2/i386/outcoff.c ! 301: In setrefnum(), added ignore flag to allow compilation -VTPROF ! 302: to work without -S or -g. The output writer now ignores the ! 303: table profiling debug items in this case. ! 304: ! 305: Mon Apr 19 14:25:47 1993 PDT ! 306: n2/i386/asm.c ! 307: V4.2.5: fixed kludge of 4/16/93, the previous implementation ! 308: was seriously buggy, breaking byte and word mov instructions. ! 309: ! 310: Thu Apr 22 00:26:55 1993 PDT ! 311: coh/cc.c ! 312: V4.2.6: added global "int monolithic = 1;" #if MONOLITHIC. ! 313: The -tBNM options reset this and tempsize to 0 to tell the ! 314: driver to use phases instead of monolithic compilation and ! 315: to use disk temps instead of memory temps. Changed ! 316: #if MONOLITHIC conditionalized code accordingly. ! 317: ! 318: Fri Apr 23 16:30:30 1993 PDT ! 319: n0/sharp.c ! 320: V4.2.7: In getfname(), added code to expand ID in filename, ! 321: so that e.g. ! 322: #define FOO <stdio.h> ! 323: #include FOO ! 324: works as expected. ! 325: ! 326: Wed May 5 08:52:24 1993 PDT ! 327: n0/cc0.c ! 328: n0/gdecl.c ! 329: V4.2.8: The 1/5/93 change above to allow the parser to ! 330: understand declarators like "int (f)(arg) int arg; {}" ! 331: screwed up the offsets assigned to parameters ! 332: of functions returning pointers to functions, ! 333: as recently reported by Harry Pulley. ! 334: For example, in ! 335: int (*fpfi(a, b))() int a, b; { ... } ! 336: the compiler generated incorrect code for references ! 337: to a and b in fpfi. In cc0.c/xdef(), now set "nargs = 0;" ! 338: before calling gdecl(). In gdecl(), set argok to 1 only ! 339: if nargs==0. After the recursive call to gdecl() for LPAREN, ! 340: reset argok to 0 if the recursive call set nargs != 0. ! 341: ! 342: Fri May 14 13:20:27 1993 PDT ! 343: n0/expr.c ! 344: V4.3.0: In build(), case QUEST, the change of V4.2.4 on 4/16/93 ! 345: for ?: with noncomputational type in the condition was wrong ! 346: for objects with nonempty DIM lists. ! 347: This fixes a bug reported today by Jeff Moskow: e.g. ! 348: localjeff = jeff ? jeff : b; ! 349: where all the objects are pointers to functions returning int ! 350: generated a byte rather than long compare. ! 351: ! 352: Thu Jun 3 17:38:09 1993 PDT ! 353: coh/cc.c ! 354: V4.3.1: Added -VVERSION number to print version number ! 355: to standard error. ! 356: ! 357: Wed Jul 7 10:58:50 1993 PDT ! 358: n1/i386/mtree2.c ! 359: User Douglas J. Toltzman <[email protected]> reported a ! 360: bug with ushort (also char, uchar, short) bitfield assignments. ! 361: In the field extraction tree modifier modefld(): ! 362: deleted code which made tree top noncomputational, ! 363: changed the shift widths from assuming byte or word width ! 364: to always assuming dword, ! 365: added code to always treat field width 1 as unsigned, ! 366: added clarifying comments. ! 367: ! 368: Wed Jul 7 13:56:31 1993 PDT ! 369: n2/i386/outcoff.c ! 370: User Gabor Zahemsky <[email protected]> reported a bug where -g ! 371: caused a cbotch() in outdloc(), basically because a #line ! 372: directive made the label at the start of a function fall at ! 373: line 0 of the function. The output writer now distinguishes ! 374: function vs. line number LNNUM entries by a new flag field ! 375: rather than by the line number being 0 or nonzero. ! 376: ! 377: Wed Jul 7 20:39:06 1993 PDT ! 378: coh/cc.c ! 379: h/var.h ! 380: Added -VREADONLY option to recognize "readonly" keyword, after ! 381: nigel complained about it allowing "readonly" by default. ! 382: Now it recognizes "readonly" only if -VREADONLY. ! 383: ! 384: Thu Jul 8 12:05:22 1993 PDT ! 385: coh/cc.c ! 386: h/cc0.h ! 387: n0/cc0.c ! 388: n0/cc0key.c ! 389: n0/expand.c ! 390: Added predefined cpp macro __BASE_FILE__ at nigel's request. ! 391: __BASE_FILE__ expands to a string giving the name of the ! 392: original source file being compiled. This is like the ! 393: __FILE__ macro, except that within a #included header file ! 394: __FILE__ expands to the header file name while __BASE_FILE__ ! 395: expands to the original source file name. ! 396: ! 397: Wed Jul 14 14:05:00 1993 PDT ! 398: n0/dope.c ! 399: n0/fold.c ! 400: nigel complained that e.g. ! 401: char a[(1,2)]; ! 402: (that's a ','-operator, result of cpp macro expansion, ! 403: not a multi-dim. array) would not compile, issuing an ! 404: "array bound must be a constant" message. ! 405: The parser's constant folder previously ignored COMMA, ! 406: so it was always nonconstant; now COMMA with constants on both ! 407: sides returns the RHS, and the above compiles as expected. ! 408: ! 409: Wed Jul 28 13:25:46 1993 PDT ! 410: n0/cpp.c ! 411: V4.3.4: In attempting to run Intek C++, Jay discovered that ! 412: "/lib/cpp -C" malfunctioned on comments containing ! 413: single or double quotes (' or "). Now cpp in -C mode ! 414: ignores ' or " within comments; this includes C++-style ! 415: online //-delimited comments if -VCPLUS is specified.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.