not*_*psy 3 gcc compilation mips
我知道要编译到汇编,我应该使用或者-S选项,但是我如何获得MIPS汇编?gccg++
我试过了
g++ -march=mips2 dll.c
Run Code Online (Sandbox Code Playgroud)
但这给出了错误
dll.c:1:0: error: bad value (mips2) for -march= switch
Run Code Online (Sandbox Code Playgroud)
我看到了编译命令的建议mips_gcc,但我找不到如何安装该编译器.
我正在使用Ubuntu 64位,如果这有帮助的话.
您需要一个构建为MIPS 交叉编译器的gcc版本.您可以从这里下载免费的Mentor/Codesourcery MIPS gnu/gcc交叉编译工具链.此工具链适用于Windows和Linux.
下载,安装并添加工具链到您的路径后,您会说:
mips-linux-gnu-g++ -march=mips32r2 -S dll.c
Run Code Online (Sandbox Code Playgroud)
将代码编译为MIPS32R2程序集.
更新时间:2017年8月:在Mentor网站上看来,MIPS的Sourcery CodeBench免费交叉编译器已经不再可用了.试试Imagination网站上的免费工具链.