From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!b15g2000yqd.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Yannick_Duch=EAne_Hibou57?= Newsgroups: comp.lang.ada Subject: Re: Performance of access type : a tiny mistake in the WikiBook ? Date: Thu, 8 Oct 2009 23:14:32 -0700 (PDT) Organization: http://groups.google.com Message-ID: <49732431-8172-47e3-a193-0b79c513ea36@b15g2000yqd.googlegroups.com> References: <91ad7397-27a8-4b9d-811e-6e62d485645c@v2g2000vbb.googlegroups.com> <31da5154-9739-4ead-8437-aaa5d70dc7e8@h30g2000vbr.googlegroups.com> <87659df3-42a8-456b-9788-f37c4c1cbdb1@o21g2000vbl.googlegroups.com> <7b46a937-2b10-4ef4-b113-3e129747ca5e@o36g2000vbl.googlegroups.com> NNTP-Posting-Host: 77.198.58.110 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1255068873 3392 127.0.0.1 (9 Oct 2009 06:14:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 9 Oct 2009 06:14:33 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b15g2000yqd.googlegroups.com; posting-host=77.198.58.110; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8629 Date: 2009-10-08T23:14:32-07:00 List-Id: On 8 oct, 21:41, Gautier write-only wrote: > Sure, for instance Aonix ObjectAda 7.2.2 SE (release mode, optim. > level 2) compiles this (P_in defined as above)... > =A0 P_in(i,s); > =A0 P_in(5678,s); > =A0 P_in(6789,"direct!"); > into... > =A0 =A022| 000024 00000000 > =A0 =A022| 000028 8B4D =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0MOV= =A0 =A0ECX, [EBP-8] > =A0 =A022| 00002A F8 > =A0 =A022| 00002B 894D =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0MOV= =A0 =A0[EBP-12], ECX ; =A0i > =A0 =A022| 00002D F4 > ; =A0Source Line # 23 > =A0 =A023| 00002E 68 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0P= USH =A0 __lcl.00000002 > =A0 =A023| 00002F 00000000 > =A0 =A023| 000033 8D55 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LEA= =A0 =A0EDX, [EBP-4] ; =A0s > =A0 =A023| 000035 FC > =A0 =A023| 000036 52 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0P= USH =A0 EDX > =A0 =A023| 000037 51 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0P= USH =A0 ECX > =A0 =A023| 000038 E8 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0C= ALL =A0 test_in_out.p_in > =A0 =A023| 000039 00000000 > ; =A0Source Line # 24 > =A0 =A024| 00003D 68 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0P= USH =A0 __lcl.00000002 > =A0 =A024| 00003E 00000000 > =A0 =A024| 000042 8D75 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LEA= =A0 =A0ESI, [EBP-4] ; =A0s > =A0 =A024| 000044 FC > =A0 =A024| 000045 56 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0P= USH =A0 ESI > =A0 =A024| 000046 68 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0P= USH =A0 5678 > =A0 =A024| 000047 2E160000 > =A0 =A024| 00004B E8 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0C= ALL =A0 test_in_out.p_in > =A0 =A024| 00004C 00000000 > ; =A0Source Line # 25 > =A0 =A025| 000050 68 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0P= USH =A0 __lcl.00000004 > =A0 =A025| 000051 00000000 > =A0 =A025| 000055 68 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0P= USH =A0 __lcl.00000003 > =A0 =A025| 000056 00000000 > =A0 =A025| 00005A 68 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0P= USH =A0 6789 > =A0 =A025| 00005B 851A0000 > =A0 =A025| 00005F E8 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0C= ALL =A0 test_in_out.p_in > =A0 =A025| 000060 00000000 Thanks for the Gesture :) It's a long time I haven't seen a LEA (load effective address) in an assembly listing That's strange : the opcode 16#E8# stands for a Call instruction which is encoded with a relative offset, and the relative offset is always zero (16#00000000#) here, whatever is the location of the Call instance. It's funny (there must be a trick somewhere).