next up previous
Next: Load/Store Instructions Up: Registers and MAL Previous: SAL vs. MAL

Registers

Registers are memory locations located inside the CPU. Register memory access time is typically less than 1 clock cycle. In the MIPS CPU architecture, there are 32 general registers. When a floating point co-processor is present there are an additional 32 floating point registers.

In MAL instructions, registers are identified by a $ symbol followed by a register number in the range 0-31. For example,

        add     $4, $5, $6
adds the contents of registers $5 and $6, with the result in register $4.

The usage of the general registers is governed by certain conventions, as shown below.

tabular1377

Except for the zero value in $0 and the return address stored in $ra ($31), the usage of the general registers is arbitrary. The conventions shown above are implemented by software.

The floating point registers are numbered $f0-$f31. No alternate names are provided for floating point registers.

tabular1383

Floating point numbers can be either 32 bits (single precision) or 64 bits (double precision). For this reason the registers are combined into even/odd pairs. Only the even-numbered registers are used for single precision representations.



CS 301 Class Account
Mon Sep 13 11:15:41 ADT 1999