I am working on a project which restricts our usage of the MIPS commands to MicroMIPS. Because of this, I cannot use addu, subu, sltu, etc.
My first question is, is it possible to make these commands out of the twenty-two MicroMIPS instructions?
My second question needs further detail.
I am running into trouble when multiplying two 16-bit numbers using a shift-add algorithm when the resulting answer is a 32 bit number with a 1 as the MSB. At this stage, I would like to take the mod of this answer but because MIPS is interpreting it as a negative number, this is giving me problems as my mod operator only accounts for positive numbers (as it should).
Is there a way I can force MIPS to interpret this number as a positive number? Is there a way I could I modulate somewhere in the shift add multiply algorithm such that I never get such a large answer, yet the answer remains the same?
Thanks for any help here,
Cam.