- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这2个约定在x86编译模式下一起使用?
对于 64 位编译,没有 cdecl + fastcall 对吗?只是 AMD 64 ABI 调用约定?如果是这样,如何在 64 位模式下在 stdcall 和 cdecl 之间延迟?
最佳答案
These 2 conventions are used together in x86 compilation mode?
没有。你从哪里得到这个想法的?每个调用约定都是不同的,任何给定的函数一次只能使用一个调用约定。不仅如此,fastcall
也没有标准化。不同的 32 位编译器以不同方式实现它(如果有的话),因此它不能用于可移植代码。 32 位中唯一的标准可移植调用约定是 cdecl
和 stdcall
。
And for 64 bit compilation, there's no cdecl + fastcall right? Just AMD 64 ABI calling convention?
是的。 64 位中只有一种通用调用约定。代码中显式使用的 32 位调用约定将被忽略。
If so, how to defer between stdcall and cdecl in 64 bit mode?
你不知道。因为它们根本不存在。
关于c++ - 默认情况下,c++ 成员函数是否使用 cdecl+fastcall 约定编译?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39716041/
我在 Linux x86 上使用 gcc。 我的程序将指向 C 函数的指针导出到 LLVM JIT 函数。调用约定是 cdecl。它在 Windows 上的 MingW 上运行良好。但是奇怪的事情发生
在一篇关于 _cdecl 调用约定的文章中,作者提到: Release local storage When the function allocates local, temporary space
我有希望根据某些输入调用的函数。每个函数都有不同数量的参数。换句话说, if (strcmp(str, "funcA") == 0) funcA(a, b, c); else if (strcmp(s
我正在使用 g++ 编写一个 64 位操作系统,并且我有一个可变参数函数,例如: void DbgPrint(const char *fmt, ...); 其行为与 printf 非常相似。这里的问题
发件人:http://en.wikipedia.org/wiki/X86_calling_conventions push c push b push a call function_name add
是的,我知道“cdecl”是一个重要的调用约定的名称,所以请不要向我解释调用约定。我要问的是缩写(?)“cdecl”实际上代表什么。我认为这是一个糟糕的命名选择,因为乍一看它让人想起“C 声明符”
有(除其他外)两种类型的调用约定 - stdcall 和 cdecl。我对他们有几个问题: 调用cdecl函数时,调用者如何知道它是否应该释放堆栈?在调用现场,是否调用者知道被调用的函数是 cdecl
我正在阅读 IDA Pro Book .在讨论调用约定的第 86 页上,作者展示了一个 cdecl 调用约定示例,它消除了调用者从堆栈中清除参数的需要。我正在重现下面的代码片段: ; demo_cde
我一直在玩cdecl我注意到有些名称不允许作为标识符,尽管 GCC 可以完美地编译它们。 例如,如果我写 int ptr; 或 int pointer; 或 int array; cdecl 给出了“
我的应用程序崩溃了,因为我调用的库函数更改了 ESP,尽管它被声明为 cdecl。 库 (libclang.dll) 是使用 MinGW 编译的,我在 VC++ 项目中使用它。这些函数作为 C 函数导
嗨我的 VC2008 项目使用 stdcall 调用约定。我有一个我正在使用的外部库,它是用 cdecl 命名约定构建的,但是他们没有在函数的函数声明中提到调用约定。 我想知道 VC 是否有某种 #p
我正在考虑为名为 SmartDVB 的软件编写插件。它需要我导出以下函数(这是一个 C++ 示例): BOOL RegisterAddOn(UINT iAddOnId, IAddOnInterface
我最近一直在尝试通过使用缓冲区和不同汇编运算符的 RAW 十六进制等价物在 C++ 中实现动态函数。为了说明一个简单的跳转: byte * buffer = new buffer[5]; *buffe
在海湾合作委员会 cdecl调用约定,在调用返回后,我是否可以依赖我压入堆栈的参数相同?即使混合 ASM 和 C 并启用优化( -O2 )? 最佳答案 一句话:没有。 考虑这个代码: __cdecl
检查这个demo source来自优秀的 Detour 库: implementation {$R *.dfm} var TrampolineGetMemory: function(Size: N
有人要求我更改一些 __asm 代码,以便它实现 C++ 调用约定。我试过使用 cdecl 但我一直收到此错误 Run-Time Check Failure #0: The value of ESP
我有一个最初用 MSVS 编写的库 (dll),我需要跨平台 (Mac/Win)。我开始使用 XCode,但有了新的 Embarcadero C++ 构建器 XE3,我认为一个开发环境会是更好的方法。
大家好,我是汇编语言 x86 的新热心学习者,我正在尝试从一组加密指令生成 CDECL 调用约定。我相信我在执行公约的过程中出错了。以下是作为问题给出的原始指令集和函数。还包括我的尝试(如果它对汇编语
我正在尝试使用具有回调机制的 (C) 第三方库,该机制缺少任何可能的识别调用上下文的方法。我的主要项目在 C# 中,我的包装器是一个调用 C 库 API 的 C++/CLI 项目。 为了解决这个问题,
有人可以给我一些为 MS winapi 函数创建函数指针的技巧吗?我正在尝试为 DefWindowProc (DefWindowProcA/DefWindowProcW) 创建指针,但出现此错误: L
我是一名优秀的程序员,十分优秀!