gccmips

Is the mno-mul option still supported in the mips compiler?


I am trying to compile my C code to use soft multiplication in MIPS I as my hardware does not have a hard multiplier.

From this document (page 10): http://www.sm.luth.se/csee/courses/smd/137/doc/gcc.pdf indicates that "-mno-mul" option can be used to inform the compiler to not generate integer multiply/divide instructions and instead insert calls to multiply/divide subroutines.

However, when I feed in the "-mno-mul" option to my compiler, the error message returned is: unrecognized command line option "-mno-mul"

I tried googling for more information on "-mno-mul", but there is very limited search results returned. The option is not even listed here: https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html

My question is: Has the mno-mul option become obsolete? If so, is there a workaround for the compiler to generate code for soft multiplication?


Solution

  • This option is obsolete, since all MIPS architecture specifications since MIPS1 require an integer multiplier.

    You might still be able to track down a copy of GCC 2.96 and compile using that. Or you could write a handler for the illegal instruction trap that implements soft multiplication.