comp.lang.ada
 help / color / mirror / Atom feed
From: falis@ma.aonix.com (Ed Falis)
Subject: Re: What's wrong with this simple Ada w/ assembly code?
Date: 1999/03/05
Date: 1999-03-05T00:00:00+00:00	[thread overview]
Message-ID: <1103_920657118@DZOG-CHEN> (raw)
In-Reply-To: 7bp0sb$cdg$1@its.hooked.net

On Fri, 5 Mar 1999 08:41:46 -0800, "Mike Silva" <mjsilva@jps.net> wrote:
> Is there, then, exactly one ABI per architecture, as would seem to be
> necessary?  How and where are these standardised?
> 
> Again my thanks to the helpful folks on this group -- maybe someday *I'll*
> be able to answer questions here!
> 
> Mike
> 
> 
> 

Nope.  Let's take windows as an example.  MS defines a number of calling conventions that affect how parameters are passed.  The most important / common ones 
are cdecl (for most calls) and stdcall (for winapi calls).  They differ in their parameter passing conventions.  Then we get into niceties around how link names are 
mangled.  DLL's are mangled differently than other names for the same convention.  C++ member names are further mangled.  And if you use a non-MS compiler, you 
often get yet another name mangling scheme.

For our window products, we just took a "most commonly used" approach of providing language names cdecl, stdcall, dll_cdecl and dll_stdcall, with the option of 
overriding either the name to be mangled or the actual linker symbol generated.  We also provided the synonyms C and DLL corresponding to the two cdecl variants.

So, at least in this case there isn't a single convention.  But windows is worse in this regard than most.

- Ed




  reply	other threads:[~1999-03-05  0:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03  0:00 What's wrong with this simple Ada w/ assembly code? Josh Highley
1999-03-04  0:00 ` robert_dewar
1999-03-04  0:00   ` Mike Silva
1999-03-04  0:00     ` Samuel Mize
1999-03-04  0:00       ` Tom Moran
1999-03-05  0:00         ` robert_dewar
1999-03-05  0:00           ` Tom Moran
1999-03-04  0:00     ` Josh Highley
1999-03-04  0:00     ` robert_dewar
1999-03-05  0:00       ` Mike Silva
1999-03-05  0:00         ` Ed Falis [this message]
1999-03-08  0:00     ` Matthew Heaney
1999-03-04  0:00 ` Tom Moran
1999-03-04  0:00   ` robert_dewar
1999-03-06  0:00 ` Nick Roberts
1999-03-06  0:00   ` David Botton
1999-03-07  0:00   ` Tom Moran
1999-03-07  0:00 ` Jerry van Dijk
1999-03-07  0:00   ` Tom Moran
1999-03-08  0:00     ` Jerry van Dijk
1999-03-14  0:00   ` Josh Highley
1999-03-14  0:00     ` David C. Hoos, Sr.
1999-03-15  0:00       ` Josh Highley
1999-03-15  0:00     ` Jerry van Dijk
     [not found]       ` <36ef2175.4732984@news.pacbell.net>
1999-03-17  0:00         ` Jerry van Dijk
1999-03-16  0:00     ` Dale Stanbrough
1999-03-16  0:00       ` Jerry van Dijk
replies disabled

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