问题.您可以使用此约定.在 ARM 汇编程序中,有多种不同的方式来执行 epilogue 和 prologue.Some details of an older calling convention are in the ARM Link and frame registers question. You can use this convention. There are many different ways to perform the epilogue and prologue in ARM assembler.最后一个相当复杂;或者至少编码很乏味.让编译器决定使用哪些寄存器以及将哪些放在堆栈上会好得多.但是,通常您在编写汇编程序时只需要知道如何编写第一个(LEAF 函数).仅在汇编程序中编写从高级语言调用的优化子例程的效率最高.了解它们如何工作以理解编译后的代码很有用.您还应该考虑使用内联汇编器,这样您就不必处理这些细微差别.The last is quite complex; or at least tedious to code. It is a lot better to let a compiler determine what registers to use and what to place on the stack. However, usually you only need to know how to code the first (LEAF function) when writing assembler. It is most productive only to code an optimized sub-routine called from a higher level language in assembler. It is useful to know how all of them work to understand compiled code. You should also consider inline assembler so you don't have to deal with these nuances. 这篇关于Arm Assembly 在子程序中 PUSH POP 链接寄存器和 pc 并在子程序中调用子程序的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-06 11:10