From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 19555 invoked from network); 13 Jul 1998 05:35:02 -0000 Received: from stefan.sime.com (193.228.80.247) by mail2.redhat.com with SMTP; 13 Jul 1998 05:35:02 -0000 Received: (from stefan@localhost) by stefan.sime.com (8.8.7/8.8.7) id HAA04465; Mon, 13 Jul 1998 07:32:54 +0200 Date: Mon, 13 Jul 1998 07:32:54 +0200 Message-Id: <199807130532.HAA04465@stefan.sime.com> From: Quant-X Alpha Linux Support To: rth@cygnus.com CC: axp-list@redhat.com In-reply-to: <19980712214344.A19657@dot.cygnus.com> (message from Richard Henderson on Sun, 12 Jul 1998 21:43:44 -0700) Subject: Re: Function call oddity MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: Quant-X Alpha Linux Support Reply-To: Quant-X Alpha Linux Support Organization: Quant-X Service & Consulting Ges.m.b.H. X-Mailer: GNU Emacs 20.2.1 C-x m (X11 ; I; Linux 2.1.108 i586) References: <199807130106.DAA03486@stefan.sime.com> <19980712214344.A19657@dot.cygnus.com> Hi Richard ! > Ok, so what. That's not the real problem. The real problem is that > extra bis. Better would be > > ldq $27,a($29) e0 > jsr $26,($27),a e1 > ldah $29,0($26) e0 > cmple $9,$10,$1 .. e1 > lda $29,0($29) e0 > addl $9,1,$9 .. e1 > bne $1,$L4 e1 > > Which is two cycles less than with your nop. I missed whatever message > had the example code, so I can't figure out what the compiler might > think it is doing. > > I hope Richard Henderson reads this, too ;-}} > > Better than hoping would be to actually send it to me. I do little more > than scan the lists these days. Sorry, but for that you replied really fast... Here the code, I've used egcs shipped with RH5.1 (egcs-2.90.27 980315). I've only used -O2 to compile. (UX board, 533MHz) The "global" variable seems useless, but when making it volatile the WITH_ARG version is somewhat slower (2.26 : 3.95) Using the code like here, WITH_ARG defined gives 2.07 and undefined gives 2.26 and so "#define WITH_ARG" faster. Maybe the "volatile" stuff is even more interesting; but I go to bed now (it's ~7:30am here). -------------------------------------------------- /* #define WITH_ARG */ int global = 0; #ifdef WITH_ARG int a(int dummy) { return ++global; } #else void a(void) { ++global; } #endif main(void) { int i=0; while(i++ < 100000000) a( #ifdef WITH_ARG 0 #endif ); } -------------------------------------------------- -- Quant-X Service & Ph: (+43) 4212 6004-0 Consulting Ges.m.b.H. Fax: (+43) 4212 600420 http://www.quant-x.com Email: support@quant-x.com