We are developing a C to MIPS cross compiler, and for that we need to compare our MIPS code with the code generated by other C to MIPS cross compiler like LLVM, or CodeSourcery, etc. We are using SPIM to run our MIPS code.
Right now we are using CodeSourcery cross compiler to generate the corrresponding MIPS code for a given C program. It generates statements like lui $2,%hi($LC0) , lw $3,%lo($LC0)($2), where LCO is a label, but while loading that file in SPIM. It shows parser error like
(parser) Unknown character on line 30 of file test1.s
lui $2,%hi($LC0)
I don't know what is the equivalent MIPS code for this kind of statement, so that it can be parsed by SPIM?