On Mon, Nov 18, 2002 at 11:43:17AM -0000, atul srivastava wrote: > what should be appropiate compilation flag for MIPS > RC32134/Rc32334..? > currently i am trying in arch/mips/Makefile > GCCFLAGS += -mcpu=r4600 -mips2 -Wa,--trap > > But I doubt it for two reasons. > > 1.I think mips1 should be used instead of mips2 because > if you follow mips literature mips 2* and 3* series fall under > MIPS1 category. Exceptions such at the R3900 which is an almost-mips2 processor ... > 4* and bigger series comes under MIP2 and MIPS3 series. > > for example CONFIG_CPU_LLSC is not enabled for all MIPS1 > category processors. CONFIG_CPU_LLSC is mandatory for for multiprocessor systems. For uni- processor systems such as your's CONFIG_CPU_LLSC should be enabled for best performance - but only if your CPU actually has ll / sc instructions. The kernel emulates ll/sc instructions if they're not available in hardware. The emulation is not performance optimal so should be avoided by using the appropriate setting of CONFIG_CPU_LLSC. > 2.Is -mcpu=r4600 switch is alright for Rc32334? Not knowing the Rc32334 in detail I can only tell you the switch is technically correct. It may or may not be optimal. > I was just wondering why i should use -mcpu=r4600 for RC323334 -mcpu=<cpu> is just a performance optimization option. Gcc doesn't use this value very well to optimize the code but it's making some minor difference. For most <cpu> values the code generator doesn't use instructions that are specific to CPU, so there's little risk playing with the value. Gcc doesn't know the Rc32334 as value so you'll have to pick a CPU that is as similar possible. Ralf