petersen@uicsrd.csrd.uiuc.edu (07/14/88)
PDC CrossDev Release 3: The third source code release of PDC is available for FTP. I decided that when the list of major new features hits double digits it's time for a new FTP release. On the amiga front, I have successfully gotten the compiler to bootstrap using Manx 3.6 (with help from Mark Bellon), and most of the remaining work it to clean up the libraries and to get the disks in shape for distribution to the appropriate parties. Hopefully RSN :-) Now for the $64K question, just how to you go about setting up almost 2 meg of source code, and around 300-400k of binaries for distribution?? Is a comp.*.amiga release feasible?? I feel that in order to do something like that, the modules would need to be released separately. This is possible but you would need all of the modules to recompile the compiler. Given the restriction on article sizes that would be about 40-50 very large postings. Should the binaries released be compiled with Manx to be smaller and faster, or with PDC to be "pure" ? Given the complexity and nature of this project I would like to have a few beta (gamma) testers to catch the stupid bugs that I missed before a big release goes out. Would putting the final amiga source and binaries up here for FTP get enough responce?? Thank-you for all of the replies from people who FTP'ed rel.2, (Is it really that easy to use, I have not recieved even 1 question or compaint after the inital e-mail). I'm not complaining but if you have tried to compile it, a little feedback and your comments would be welcome. Each release gets better and better ... Now on to the good stuff. The improvements for release 3 are: 1) Strength reduction for double precision expressions, e.g. X*1 -> X, X*0 -> 0 2) Nearly a full pre-processor built into the compiler. This eliminates the need for the extra pass required to use cpp. 3) Subroutine library for 32x32->32 bit, '*' , '/' , '%' 4) Improved register tracking to enable the compiler to impliment internal sanity checks for register spills 5) Improved calling convention for double precision intrinsic routines 6) Enhanced peep-hole optimizer, eliminate redundant Rn -> Rn moves and Rn -> -(SP) (SP)+ -> Rn moves. 7) Parsing support for the ANSI-C keywords "const" and "volitle" 8) Inline assembler using #asm, #endasm 9) Addition of pre-processor directives #error, #pragma, #elif, #line 10) Partial support for function proto-types. 11) Addition of pre-processor defines, __LINE__, __FILE__, __DATE__, __FUNC__. __PDC__ is defined to tell that PDC is running 12) Ability to generate a dense switch statement using a direct indexed jump table if the density of the case labels is great enough 13) Last and not least, inline-assembler code for the routines strcat, strcmp, strcpy, strlen, bcopy, bzero. I have also improved the object code librarian to make it behave correctly and to add functionallity. The biggest improvement is the ability to sort the object modules by XDEF, and XREF usage to get the library to link correctly with a single pass linker like Blink. So if someone wants a start at a C cross-development environment or wants to help with the amiga port, or contribute library routines I all ears. As a start to this I'm putting the current source code (all 1.9 meg, or 675k compressed) up for anonymous FTP. The code is a lot more reliable now so let's see a little action.. The file name is /pub/amiga/CrossDev3.tar.Z 192.5.69.1 a.cs.uiuc.edu If you find any problems with the code 1) Fix the problem your self and mail me the patch. 2) Or else, Send me the smallest code fragment that causes the problem and I'll either fix the problem or add it to the BUGS list. 3) Or, Just sit on it and don't tell me, and by telepathy I might discover and fix the problem myself (not recomended). RUMOR: If everything goes well someone from the local amiga user's group just might have disks available for copying at the the AmiExpo in Chicago.... -------------- University of Illinois, Urbana-Champaign Center for Supercomputing Research and Development UUCP: {uunet,convex}!uiucuxc!uicsrd!petersen ARPANET: petersen%uicsrd@uxc.cso.uiuc.edu CSNET: petersen%uicsrd@uiuc.csnet BITNET: petersen@uicsrd.csrd.uiuc.edu
rokicki@polya.Stanford.EDU (Tomas G. Rokicki) (07/17/88)
Just a minor nit: > 1) Strength reduction for double precision expressions, > e.g. X*1 -> X, X*0 -> 0 This is peephole, not strength reduction. Strength reduction transforms loops as in the following piece of code: long a[] ; for (i=0; i<10; i++) a[i] = 0 ; goes to the pseudocode i = 0 ; loop:if !(i < 10) goto end ; t1 = i * 4 ; t2 = a + t1 ; *t2 = 0 ; i = i + 1 ; goto loop ; end: Here it is noticed that `t1' tracks the loop counter with the expression (t1 = i * 4), which starts at 0, so the loop is changed to: i = 0 ; t1 = 0 ; loop:if !(i < 10) goto end ; t2 = a + t1 ; *t2 = 0 ; i = i + 1 ; t1 = t1 + 4 ; goto loop ; end: Note that a multiplication has been replaced by an addition. Although, in reality, it would be noticed that `t2' tracks i with the expression (t2 = a + i * 4), so t1 would go away, yielding the resulting code i = 0 ; t2 = a ; loop:if !(i < 10) goto end ; *t2 = 0 ; i = i + 1 ; t2 = t2 + 4 ; goto loop ; end: Now, a good C programmer might write this as { long *t2 ; for (i=0, t2=a; i<10; i++, t2++) *t2 = 0 ; } but that's not the point.