Thanks
David
(This was part of Thursday's lecture.) For load commands that don't load a
full word, we must answer the question of what to do with the leftover bits.
The default action, so-called "signed mode", is to sign-extend the value, i.e.,
fill the remaining bits with the left-most bit of the loaded value. This works
fine as long as numbers whose left-most bit is 1 are meant to be negative
integers. However, it's possible that we mean such numbers to actually be
really large *positive* integers. In such cases, sign-extension is not
appropriate, as it will not preserve the value of the loaded byte/halfword.
What you want to do in these cases is zero-extension, i.e., fill the remaining
bits with 0. This is what the "unsigned mode" operations do.
However, note that not all of the advertised unsigned-mode MIPS instructions
are actually available in the implementation you're using. The course web
page lists the differences between our MIPS implementation and the "real"
MIPS language.
Brad