add $dest, $src1, $src2

Add two registers and store the result in another.

Format

This is an RR format instrucion.
31 - 26
25 - 21
20 - 16
15 - 11
10 - 0
000100
dest
src1
src2
00000000000

Functional Description

The add instruction adds two operand registers src1 and src2 using two's complement arithmetic, and stores the result in dest.

dest = src1 + src2;

Side Effects

If overflow occurs, the exception cause register is logically ORed with the value 0x1, and the exception PC (EPC) register is set to the program counter of the offending instruction. Control then traps to an operating system handler.

Processor Mode

This is a user-level instruction.


Last modified: Sun Feb 25 12:46:53 CST 2001