Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!world!iecc!compilers-sender From: mason+@transarc.com (Tony Mason) Newsgroups: comp.compilers Subject: Re: C Compilers which use full 486 capabilities Keywords: 486, C, optimize Message-ID: Date: 15 Mar 91 12:50:36 GMT References: <9103130754.AA19293@gara.une.oz.au> Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: mason+@transarc.com (Tony Mason) Organization: Compilers Central Lines: 34 Approved: compilers@iecc.cambridge.ma.us Excerpts from netnews.comp.compilers: 13-Mar-91 C Compilers which use full .. Mick Carrick@gara.une.oz (962) > [It is my impression that optimizations for the 486 are in most cases the > same ones that you'd do for the 386. There are a few places on the 486 > where you can avoid pipeline stalls by reordering instructions, and a few > instructions that are relatively faster or slower, other than that anything > you'd do for a 386 applies equally. -John] Actually, the March 1991 issue of Dr. Dobbs Journal of Software Tools discusses 486 optimization. The author asserts (p. 18): "The 486 represents a fundamental break with 8088-style optimization. Virtually all the old rules fail on the 486, where, incredibly, a move to or from memory often takes just one cycle, but exchanging two registers takes three cycles." From that, I'd conclude the optimization isn't the same. Perhaps the most current Microsoft C compiler does the job? Tony Mason > mason+@transarc.com [The 486 Programmer's Reference has quite a lot to say about 486 optimization, and most of what it says also applies to the 386. The MOV vs. XCHG example is an extreme one, as XCHG is a well-known slow instruction, both because it has some bus-locking side effects, and because it's not in the set of frequently used instructions that they optimized to one cycle. There are a few peculiarities that are different, but in general it's really true that you make mostly the same decisions on the 486 as on the 386. The Programmer's Reference manual is quite informative and is well worth the $25 that it costs. -John] -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.