MIPS Differences
This page describes the (known) differences between the MIPS
implementation documented here and the description of MIPS found in Appendix
A of Patterson & Hennessy.
- Floating point is not implemented. This means that the floating point registers and
instructions are not recognized by any of the MIPS tools. Also, the directives
.float and .double are not recognized.
- The distinction between signed and unsigned versions of instructions is not fully
implemented. In particular, add/addu, sub/subu, addi/addiu all use the "unsigned" behaviour
of not trapping on overflow, while mult/multu and div/divu perform signed operations.
slt/sltu and slti/sltiu behave as documented.
- System calls are handled differently. Instead of using syscall, the trap
instruction is used. The system call is specified as an immediate operand to trap
rather than in a register. syscall is not implemented.
- The interrupt-handling instructions rfe and break are not implemented.
- The "extended" branch instructions bgezal, bltzal, bgez, and
bltz are not implemented.
- Certain system calls are not implemented, and other additional ones are provided. See the
traps page for documentation of the available system calls.
- The jump instructions j and jal use a word offset just like the branch
instructions, rather than the "replace 26 bits of the program counter" technique described
in the textbook.
- Segments are not supported. This means that directives .data, .text,
.extern, .kdata, and .ktext are not recognized.
- Pseudoinstructions are not supported. Only instructions defined by the hardware are
supported by our MIPS tools. This is deliberate as students are intended to understand the
operation of the hardware without the usual buffer provided by helpful tools. Related to
this, the directive .set is not recognized.
- Large immediate constants are loaded using llo and lhi rather than
with lui. The text does not make it clear how to load an arbitrary constant,
especially a label, using lui, so it was felt that it would be clearer to use
llo and lhi working together as a pair.