delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
From: | "Tom St Denis" <tomstdenis AT yahoo DOT com> |
Newsgroups: | comp.os.msdos.djgpp,comp.lang.c |
References: | <3C61E6BB DOT 7F9AD526 AT yahoo DOT com> <WOl88.110475$I8 DOT 22755763 AT news4 DOT rdc1 DOT on DOT home 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: | <Not88.114583$I8.23188719@news4.rdc1.on.home.com> |
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" <cbfalconer AT yahoo DOT com> wrote in message news:3C6206BF DOT 3BAF19BF AT yahoo DOT com... > Tom St Denis wrote: > > > > "CBFalconer" <cbfalconer AT yahoo DOT com> 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |