Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Chris Albertson <chris@topdog.pas1.logicon.com>
To: Scott Lewis <scott@bach.ce.gatech.edu>
Cc: axp-list@redhat.com
Subject: Re: Alpha's floating point performance
Date: Wed, 18 Nov 1998 13:15:03 -0800	[thread overview]
Message-ID: <365338D7.AE1FA0DA@topdog.logicon.com> (raw)
In-Reply-To: Pine.LNX.3.96.981117143804.30989B-100000@bach.ce.gatech.edu

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


       reply	other threads:[~1998-11-18 21:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.3.96.981117143804.30989B-100000@bach.ce.gatech.edu>
1998-11-18 21:15 ` Chris Albertson [this message]
1998-11-18 22:26   ` Alpha's floating point performance Mark Probst
1998-11-18 22:41     ` Bibek Sahu
1998-11-19 10:33       ` Mark Probst
1998-11-16 22:51 y0000218
1998-11-17  9:09 ` Harvey J. Stein
1998-11-17 16:11 ` Scott Lewis
1998-11-17 19:36   ` Chris Albertson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox