Instruction Type
|
Example
|
Instruction Coding
|
ALU Usage
|
Non-Jump R-Type
|
add rd, rs, rt
|
R
|
|
The ALU performs the operation indicated by the mnemonic, which is
coded into the fn field.
|
Immediate
|
addi rt, rs, imm
|
I
|
|
The ALU performs the operation indicated by the mnemonic, which is
coded into the op field.
|
Branch
|
beq $rs, $rt, imm
|
I
|
|
The ALU subtracts rt from rs for comparison.
|
Load
|
lw rt, imm(rs)
|
I
|
|
The ALU adds rs and imm to get the address.
|
Store
|
sw rt, imm(rs)
|
I
|
|
The ALU adds rs and imm to get the address.
|
Non-Register Jump
|
jal target
|
J
|
|
The ALU is not used.
|
Jump Register
|
jalr rd, rs
|
R
|
|
The ALU is not used.
|