X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Tom St Denis" Newsgroups: comp.os.msdos.djgpp,comp.lang.c References: <3C61E6BB DOT 7F9AD526 AT yahoo DOT com> <3C6206BF DOT 3BAF19BF AT yahoo DOT com> Subject: Re: gcc 2.953 output - is this a bug? Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Thu, 07 Feb 2002 11:19:09 GMT NNTP-Posting-Host: 24.112.9.146 X-Complaints-To: abuse AT home DOT net X-Trace: news4.rdc1.on.home.com 1013080749 24.112.9.146 (Thu, 07 Feb 2002 03:19:09 PST) NNTP-Posting-Date: Thu, 07 Feb 2002 03:19:09 PST Organization: Excite AT Home - The Leader in Broadband http://home.com/faster To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "CBFalconer" wrote in message news:3C6206BF DOT 3BAF19BF AT yahoo DOT com... > Tom St Denis wrote: > > > > "CBFalconer" wrote in message > > news:3C61E6BB DOT 7F9AD526 AT yahoo DOT com... > > > Please look at the following disassembly: > > > > > > 585: 8d 04 d2 lea (%edx,%edx,8),%eax <<*** > > > 588: 8d 04 82 lea (%edx,%eax,4),%eax <<*** > > > > If I get this right [in NASM notation] the two lines are > > > > [1] lea eax,[edx+edx*8] > > [2] lea eax,[edx+eax*4] > > > > In line [1] you get eax = edx + edx * 8 = 9*edx > > > > In line [2] you get eax = edx + 4*(9*edx) = 37 * edx > > > > since I assume edx equals the original value, this should compute 37 * h > > This showed up in djgpp. Unplonk. Thanks. Not that I'm trying to start anything.... BUT WHO CARES WHO YOU PLONK? I mean is it a feeling of authority or power over others? You want to control their behaviour? Is plonking the same as a slap on the wrist? Myself I have all of two people in my killfile, when I added them I didn't send a message "plonk" because the purpose of a killfile is to lower useless traffic. Anyways, interesting question about GCC, it appears it optimizes "less optimized" code better which is a point for the general idea of "write clear code and the let the optimizer optimize it". Tom