Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
FPCnostackframe和 Delphi 的.NOFRAME指令在 64 位 asm 函数中是否完全等效?
nostackframe
.NOFRAME
换句话说,下一个代码模板
procedure Naked(SomeArg: Integer);{$IFDEF FPC}nostackframe;{$ENDIF} asm {$IFNDEF FPC} .NOFRAME {$ENDIF} .. end;
在 Delphi 和 FPC 中生成相同的裸 64 位 asm 函数?
据我所知,.NOFRAME(Delphi)和nostackframe(FPC)都做同样的事情,即阻止堆栈帧的生成。但是请注意,它们生效的条件在两个编译器中可能并不相同。
为了源代码兼容性,也{$ASMMODE INTEL}用于 FPC。
{$ASMMODE INTEL}
在大多数情况下,FPC64 和 DCC64 asm 使用相同的语法,但在极少数情况下,内联汇编程序理解的语法存在一些差异。另请注意,非 Windows x64 平台使用不同的调用约定。