GCC MIPS-32调用约定/堆栈帧定义

时间:2022-06-04 03:47:22

There appears to be no definitive standardized stack frame and C language calling conventions (register usage and such) for the MIPS-32 Processor Architecture. That is, it appears to be completely up to the assembler/compiler tool chain to define their own stack frame and calling conventions. I've struggled to find a definitive reference of what conventions the GCC compiler uses for MIPS-32 instruction set. I'm specially using GCC cross-compiler on Cygwin that targets a MIPS-32 core being used in an embedded environment on the eCos open source kernel.

对于MIPS-32处理器体系结构,似乎没有明确的标准化堆栈帧和C语言调用约定(寄存器使用等)。也就是说,它似乎完全取决于汇编器/编译器工具链来定义自己的堆栈帧和调用约定。我很难找到GCC编译器用于MIPS-32指令集的约定的明确引用。我特意在Cygwin上使用GCC交叉编译器,目标是在eCos开源内核的嵌入式环境中使用MIPS-32内核。

Any references to definitive documentation about GCC for MIPS-32 in this area would be appreciated.

任何有关MIPS-32在该领域的GCC权威文件的提及都将受到赞赏。

3 个解决方案

#1


You are right, this is a bit of a mess and is poorly documented. I would recommend:

你是对的,这有点乱,而且记录很少。我建议:

  • http://math-atlas.sourceforge.net/devel/assembly/mipsabi32.pdf
  • "See MIPS Run" by Dominic Sweetman
  • Dominic Sweetman的“MIPS Run”

  • Examining disassembled code generated by the compiler to check for discrepancies with the above references.
  • 检查编译器生成的反汇编代码,以检查与上述引用的差异。

#2


Does this reference on MIPS EABI for RedHat Linux help?

这个参考MIPS EABI for RedHat Linux有帮助吗?

#3


I'm not into MIPS, but maybe this MIPS ABI History reference might help.

我不是MIPS,但也许这个MIPS ABI历史参考可能有所帮助。

#1


You are right, this is a bit of a mess and is poorly documented. I would recommend:

你是对的,这有点乱,而且记录很少。我建议:

  • http://math-atlas.sourceforge.net/devel/assembly/mipsabi32.pdf
  • "See MIPS Run" by Dominic Sweetman
  • Dominic Sweetman的“MIPS Run”

  • Examining disassembled code generated by the compiler to check for discrepancies with the above references.
  • 检查编译器生成的反汇编代码,以检查与上述引用的差异。

#2


Does this reference on MIPS EABI for RedHat Linux help?

这个参考MIPS EABI for RedHat Linux有帮助吗?

#3


I'm not into MIPS, but maybe this MIPS ABI History reference might help.

我不是MIPS,但也许这个MIPS ABI历史参考可能有所帮助。