How to compile into MIPS assembly ?

ra009103@ic.unicamp.br ra009103@ic.unicamp.br
Wed Mar 16 03:49:00 GMT 2005


Hi.

I am using a Fedora machine, with GCC installed as a RPM package. I have
recently started to study the MIPS architecture, and I just wanted to
compile a C program into MIPS assembly.

So I try:

gcc -Wall -pedantic -S -march=mips32 test.c

which gives me:

cc1: error: bad value (mips32) for -march= switch
cc1: error: bad value (mips32) for -mcpu= switch

Another try:

gcc -b mips32 -Wall -pedantic -S teste.c

which gives:

gcc: couldn't run `mips32-gcc-3.3.3': No such file or directory

Clearly, my version of GCC can't compile into MIPS.

So, how do I compile into MIPS assembly ? I googled for mips-gcc-3.3.3,
but I did not find it anywhere. What is it ?

Is there any extension to GCC that knows about MIPS ?

Do I have to recompile GCC in order to have it know MIPS ? If so, what
compilation switches do I have to give it ?

Thanks a lot
Leonel



More information about the Gcc-help mailing list