From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 20844 invoked from network); 18 Nov 1998 21:12:21 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 18 Nov 1998 21:12:21 -0000 Received: from quokka.corp.logicon.com (quokka.corp.logicon.com [137.51.252.37]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id QAA31178 for ; Wed, 18 Nov 1998 16:12:16 -0500 Received: from pas1.logicon.com (topdog.pas1.logicon.com [137.51.114.9]) by quokka.corp.logicon.com (8.9.1/8.9.1) with SMTP id NAA20376; Wed, 18 Nov 1998 13:12:59 -0800 (PST) Received: from topdog.logicon.com (kurtz) by pas1.logicon.com (4.1/SMI-4.1) id AA27852; Wed, 18 Nov 98 13:15:35 PST Sender: chris@topdog.pas1.logicon.com Message-Id: <365338D7.AE1FA0DA@topdog.logicon.com> Date: Wed, 18 Nov 1998 13:15:03 -0800 From: Chris Albertson Organization: Logicon RDA X-Mailer: Mozilla 4.03 [en] (X11; I; SunOS 5.7 sun4u) Mime-Version: 1.0 To: Scott Lewis Cc: axp-list@redhat.com Subject: Re: Alpha's floating point performance References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Scott Lewis wrote: > > Good point. How do _you_ call an assembly routine from C/C++? It depends on the compiler but normally C pushes the arguments onto the stack. The called function pops them off and places the return value on the stack. What is placed on the stack is either the value itself or it's address. There is a gcc option I believe that will allow you to see the assembly generated by the compiler. Experts can correct me but it is not hard to mix assembly and C. Also, I have not done this with gcc, but I think it supports in-line assembly rite there in your *.c file. I'd like to here from someone who has done this. My experience in this area is not with Linux/gcc. It goes back to IBM/360, CDC6600, Perkin Elmer and CP/M Z-80. The DEC UNIX assembly manual has examples of both C calls assembly and assembly calls C -- --Chris Albertson chris@topdog.logicon.com Voice: 626-351-0089 X127 Logicon RDA, Pasadena California Fax: 626-351-0699