4 ms·
MIPS? ------------------ Addendum addressing your updates: > MIPS does have a status register, and this register does have an overflow bit: Yes, it does, bu
by saagarjha 8y ago
MIPS?
------------------
Addendum addressing your updates:
> MIPS does have a status register, and this register does have an overflow bit:
Yes, it does, but it doesn't function as a simple carry or zero bitfield. In MIPS, there are two instructions for performing addition: add and addu. add generates a trap which you can respond to in an exception handler (which is where you check for this exception code)–as opposed to addu, which overflows silently. Most programs explicitly looking to check for overflow just use addu followed by a sltu (set less than, unsigned).
- Annatar 8y ago“u” in “addu” means unsigned, so if I’m using it, I understand what the implication is.