difference between mult, multu simulating in c
I'm writing a c program and decodes mips 32 bit instructions and simulates
their functionality minus the bitwise part. I don't know how I should be
differentiating between signed and unsigned operations here.
For instance, given registers rd and rs, i need to multiply and put the
result in in rd.
for the mult instructions, it's as simple as this:
reg[rd] = reg[rs] * reg[rt];
What should the multu instruction be? Do I need to be doing bitwise
operations on the contents of the registers first?
I also need to do:
-add, addu, -div, divu -sub, subu
Is it the same distinction in functionality for all of them?
No comments:
Post a Comment