GCC MIPS-32 Calling Conventions / Stack Frame Definition

旧街凉风 提交于 2019-12-03 17:17:23

问题


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.

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


回答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
  • 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?




回答3:


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



来源:https://stackoverflow.com/questions/811424/gcc-mips-32-calling-conventions-stack-frame-definition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!