delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/06/22:47:52

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>
Subject: Re: gcc 2.953 output - is this a bug?
Lines: 22
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: <WOl88.110475$I8.22755763@news4.rdc1.on.home.com>
Date: Thu, 07 Feb 2002 02:40:54 GMT
NNTP-Posting-Host: 24.112.9.146
X-Complaints-To: abuse AT home DOT net
X-Trace: news4.rdc1.on.home.com 1013049654 24.112.9.146 (Wed, 06 Feb 2002 18:40:54 PST)
NNTP-Posting-Date: Wed, 06 Feb 2002 18:40:54 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: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

Tom


- Raw text -


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