X-pop3-spooler: POP3MAIL 2.1.0 b 4 980420 -bs- Message-ID: <19980609213504.45507@cerebro.laendle> Date: Tue, 9 Jun 1998 21:35:04 +0200 From: Marc Lehmann To: beastium Subject: Re: gcc-2.8.1, pgcc-2.90.29 980515, and cmovb Mail-Followup-To: beastium References: <199806091550 DOT KAA05661 AT mail DOT mankato DOT msus DOT edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <199806091550.KAA05661@mail.mankato.msus.edu>; from Jeffrey Hundstad on Tue, Jun 09, 1998 at 10:50:17AM -0500 X-Operating-System: Linux version 2.1.105 (root AT cerebro) (gcc version pgcc-2.91.34 19980530 (gcc2 ss-980502 experimental)) Status: RO Content-Length: 1564 Lines: 46 On Tue, Jun 09, 1998 at 10:50:17AM -0500, Jeffrey Hundstad wrote: > I'm just currious... I've taken a look at the tetrary operator with > trivial selector and trivial conditional operations, and dumped the > assembly code from both 2.8.1 and pgcc-980515. > > pgcc does: > cmpl %eax,%edx > jbe .L2 > movl %edx,%eax > ..L2: > > while 2.8.1 does: > cmpl %edx,%eax > cmovb %edx,%eax The 2.8.1 implementation of cmov is buggy, therefore, it is disabled in egcs and pgcc. 980608 has them enabled again. > It seems like 2.8.1 would cause less pain an anguish to the cpu... > aren't jumps bad... and avoided at all cost? Yes. > I wrapped a clock couter around the tetrary op. and it appears to cost > the same either way... As long as it is correctly predicted, yes. Still cache-effects make the first version slower. > c = (a > b) ? a : b; cmpl %edx,%eax cmovb %edx,%eax gcc version pgcc-2.91.37 19980608 (gcc2 ss-980502 experimental) I probably won't be able to make a 0608 snapshot (either tomorrow or never), so either expect 0608 on thursday, or next weeks snapshot. -----==- | ----==-- _ | ---==---(_)__ __ ____ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / pcg AT goof DOT com |e| -=====/_/_//_/\_,_/ /_/\_\ --+ The choice of a GNU generation | |