召集会议 [英] calling conventions

查看:99
本文介绍了召集会议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




以下是调用约定的定义,我在教科书中看到了
,任何人都可以给出更详细的解释在

条款ANSI - C


的要求和如何在调用程序和

过程之间传递数据称为调用约定"

Hi,

the following is the definition for calling convention ,which I have
seen in a text book, can anyone give a more detailed explanation in
terms of ANSI - C

"the requirements that a programming system places on how a procedure
is called and how data is passed between a calling program and
procedures are called calling conventions"

推荐答案

su *********** @ gmail.com 写道:
su***********@gmail.com wrote:




以下是调用约定的定义,我在教科书中看到了
,任何人都可以给出更详细的说明

条款ANSI - C


编程系统对程序的要求如何$ / $ b $调用b以及如何在调用程序和

过程之间传递数据称呼叫约定
Hi,

the following is the definition for calling convention ,which I have
seen in a text book, can anyone give a more detailed explanation in
terms of ANSI - C

"the requirements that a programming system places on how a procedure
is called and how data is passed between a calling program and
procedures are called calling conventions"



C语言让每个实现都能使用最适合他们的

调用约定。几乎总是一个C编译器

将默认使用目标主机使用的调用约定。

最常见的调用约定是所谓的C调用
convention"或cdecl用于大多数C实现。

使用Windows API编写的程序使用Microsoft的'stdcall'

约定。许多其他惯例,如fastcall等。可能。

一般情况下你应该把它留给编译器选择调用

约定。


< http:/ /www.openwatcom.org/index.php/Calling_Conventions>

< http://en.wikipedia.org/wiki/Calling_convention>

The C language leaves it up to each implementation to use whatever
calling conventions that suit them best. Almost always a C compiler
will default to the calling convention that the targeted host employs.
The most common calling convention is the so-called "C calling
convention" or "cdecl" used on the majority of C implementations.
Programs written to use the Windows API use Microsoft''s "stdcall"
convention. Many other conventions like "fastcall" are possible.
Generally you should leave it to the compiler to chose the calling
convention.

<http://www.openwatcom.org/index.php/Calling_Conventions>
<http://en.wikipedia.org/wiki/Calling_convention>

< br>

文章< g2 ********** @ registered.motzarella.org>,

santosh< sa ********* @ gmail.comwrote:
In article <g2**********@registered.motzarella.org>,
santosh <sa*********@gmail.comwrote:

>使用Windows API编写的程序使用Microsoft的'stdcall'
约定。
>Programs written to use the Windows API use Microsoft''s "stdcall"
convention.



这可能几乎总是如此,但它更直接因为

他们使用的是Windows ABI,而不是API 。


- Richard

-

在紧接着数字9的两个字符的选择中,

应考虑将图形10和11更换为

,以便在英镑货币区域采用该代码。 (X3.4-1963)

That''s probably almost always true, but it''s more directly because
they are using the Windows ABI, not API.

-- Richard
--
In the selection of the two characters immediately succeeding the numeral 9,
consideration shall be given to their replacement by the graphics 10 and 11 to
facilitate the adoption of the code in the sterling monetary area. (X3.4-1963)


santosh写道,于04/06/08 17:35:
santosh wrote, On 04/06/08 17:35:
su *********** @ gmail.com 写道:
su***********@gmail.com wrote:

>

以下是调用约定的定义,我在教科书中看到过,任何人都可以给出更详细的内容在ANSI-C

条款中解释编程系统对如何调用过程
以及如何在调用程序和过程称为调用约定
>Hi,

the following is the definition for calling convention ,which I have
seen in a text book, can anyone give a more detailed explanation in
terms of ANSI - C

"the requirements that a programming system places on how a procedure
is called and how data is passed between a calling program and
procedures are called calling conventions"



C语言让每个实现都能使用最适合他们的

调用约定。几乎总是一个C编译器

将默认使用目标主机使用的调用约定。

最常见的调用约定是所谓的C调用
convention"或cdecl用于大多数C实现。


The C language leaves it up to each implementation to use whatever
calling conventions that suit them best. Almost always a C compiler
will default to the calling convention that the targeted host employs.
The most common calling convention is the so-called "C calling
convention" or "cdecl" used on the majority of C implementations.



如果我使用的话,我不会那么肯定。 " CDECL"因为我听说

术语使用了所有参数在堆栈上传递但在几个

,然后再进行优化)。我认为这种趋势甚至会更多地转移到寄存器中传递的参数(MS在64位ABI上已经过了这么多的b $ b)。

I would not be so sure of that were I use. "cdecl" as I''ve heard the
term used has all parameters passed on the stack but on several
architectures it is normal to pass some parameters in registers (even
before you get to optimisations). I think the tendency is moving even
more towards parameters being passed in registers (MS have gone this ay
on their 64 bit ABI).


使用Windows API编写的程序使用Microsoft的'stdcall'

约定。
Programs written to use the Windows API use Microsoft''s "stdcall"
convention.



现在,这将是X86 / X64上的16位,32位和64位Windows以及各种移动版Windows的所有

吗? br />

Now, would that be 16, 32 and 64 bit Windows on X86/X64 and all the
various mobile versions of Windows?


许多其他惯例,如fastcall等。是可能的。

一般情况下你应该把它留给编译器选择调用

约定。
Many other conventions like "fastcall" are possible.
Generally you should leave it to the compiler to chose the calling
convention.



是的,将它作为默认实现几乎总是

正确的事情,而进一步忽略它通常是正确的

要做的事情。

Yes, leaving it as default for the implementation is almost always the
right thing to do and further more ignoring it is normally the right
thing to do.


< http://www.openwatcom.org/index.php/Calling_Conventions>

< http://en.wikipedia.org/wiki/Calling_convention>
<http://www.openwatcom.org/index.php/Calling_Conventions>
<http://en.wikipedia.org/wiki/Calling_convention>



这些链接提供了大量关于除了我认为是bdecl之后的信息。

- -

Flash Gordon

Those links have plenty of information about other than what I would
consider to be cdecl.
--
Flash Gordon


这篇关于召集会议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆