www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/08/23:24:00

Sender: nate AT cartsys DOT com
Message-ID: <36466D97.9CD98CA3@cartsys.com>
Date: Sun, 08 Nov 1998 20:20:39 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i486)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: fixed point vs floating and djgpp compiler
References: <000a01be0b69$933be440$c5223182 AT marst96 DOT m DOT resnet DOT pitt DOT edu>
Reply-To: djgpp AT delorie DOT com

mark reed wrote:

> about the djgpp compiler, When i had it do the fixed point stuff, it kept
> thinking that fmul (%ecx) and fld
> (%edx), and fstp (%eax)  were somehow changing the values of ecx, edx, and
> eax. So it kept reloading each of them every time they were used. lots of
> unnecesary movl 12(%ebp), %ecx  . Anyone know why this would be?

What optimization flags did you use?  Try `-O2', if you haven't.  Also,
is it possible some of your variables are declared `volatile'?

>  also is there a pentium optimization flag or anything? i found another
> thing that it did not do, fstp,
> requires that its target be not used one cycle before fstp is called, and
> the compiler put faddp with %eax,
> right before fstp with %eax.  Putting some addl's in between sped up my code
> about .6 cycles per instance of faddp fstps. Which came to 6 cycles per
> matrix multiplication which isnt much. Dont know if it will do the same on
> other processors? Or if it is too much of a bother to add in to the
> compiler.

`-mpentium' may be what you're looking for.  Alternatively, there is
PGCC (www.goof.com, IIRC), which does a lot of Pentium-specific
optimizations.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019