From: Michael Castle Subject: Re: GCC optimization & target options? To: FIXER AT FAXCSL DOT DCRT DOT NIH DOT GOV (Chris Mr. Tangerine Man Tate) Date: Tue, 29 Mar 1994 19:28:09 -0600 (CST) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu > Also, there doesn't seem to be *any* difference in code size between > using the -m486 and -mno-486 options to gcc. Is this an artifact of > the COFF file format, or is there really no difference? Or is it just -m486 changes the ORDER of instructions.... there are very few instructions that the 486 has that the 386 doesnt (2 or 3 I think) and those are really only important when writing operating systems (or DOS extenders I spose). Compare the intermediate assembler code between two compiles with and without the -m486, and see if there is any difference in the order the instructions are arranged. I'm not sure why order is important, just that when you schedule some instructions after others, you have to put in extra NOPs to give the processor (or perhaps it's the memory management unit) time to "recover" (for lack of a more accurate, descriptive, technical term). > On a similar note, is there a gcc out that does Pentium optmization > yet? I notice that the Info lists a bunch of PowerPC target-specific > options, but no P5 options. Intel is a ass. (Apologies to Dickens). Again, the Pentium doesn't have that many new instructions; the difference is in the timing that changes depending upon how you order the instructions. With the Pentium, you can schedule two instructions so that they are executed simultaneously (this somewhat super scalar approach is what gives the pent some of it's speed up). Only certain instructions can be executed simultaneously, however, and Intel makes those who want to know that info sign non-disclosure forms. Since GCC is available in source, it's kind of disclosed... therefore.... Now, Intel DID do some changes to a version of GCC to provide partial pentium improvements, but I'm not sure how much they actually provided. However, it was done to an older version of gcc (circa 1.37 if i remember correctly), and it was done 'poorly.' That is, the FSF folx looked at it and said "we can't easily incorporate that into our current code, and it's not a pressing problem that we would want to put the man hours into it." Supposedly this experimental compiler is available on ftp somewhere. If you have access to usenet, you might check the gnu.gcc.* groups and see if the references to the site are still available.