由买买提看人间百态

topics

全部话题 - 话题: stdcall
(共0页)
k***e
发帖数: 1931
1
来自主题: JobHunting版 - 贴几道老题目
不至于要设计编译器吧,就是考基本概念:stdcall, cdecl, thiscall, fastcall
naked call,这几种属于常见的基础知识。

数。
t****t
发帖数: 6806
2
as xentar said, this tightly depends on specific ABI used. even on windows
32bit, cdecl, stdcall, fastcall, etc. are all different (of course, some of
them do not support variadic).
for example, on x86-64/linux, %al will be set to number of registers used in
variadic function call. although in all conventions, variadic calls must
let callee to find "..." parameters from the last fixed parameter.
S**I
发帖数: 15689
3
多谢指正。win32上argument的pass,stdcall和cdecl是往stack上push,fastcall和
thiscall是先用寄存器,然后再往stack上push。但是只有cdecl是调用函数clean up
stack,所以参数个数可变的函数调用应该只能是cdecl。

of
in
(共0页)