Instruction | Operation | |
---|---|---|
lw | Rd, addr | load integer (word) |
sw | Rs, addr | store integer (word) |
move | Rd, Rs | move integer |
la | Rd, label | load address |
li | Rd, const | load immediate |
Data movement instructions move data from one place, called the source operand, to another place, called the destination operand. Data movement instructions can be grouped into loads, stores, moves, and immediate loads.
Load instructions move data from memory to registers.
Instruction | Operation | |
---|---|---|
lb | Rd, addr | load byte sign extended |
lbu | Rd, addr | load byte zero extended |
lh | Rd, addr | load halfword sign extended |
lhu | Rd, addr | load halfword zero extended |
lw | Rd, addr | load word |
l.d | Fd, addr | load double |
l.s | Fd, addr | load float |
Store instructions move data from registers to memory.
Instruction | Operation | |
---|---|---|
sb | Rs, addr | store byte |
sh | Rs, addr | store halfword |
sw | Rs, addr | store word |
s.d | Fs, addr | store double |
s.s | Fs, addr | store float |
Move instructions move data from one register to another.
Instruction | Operation | |
---|---|---|
mfc0 | Rd, Cs | load from control register |
mfc1 | Rd, Fs | load from floating point register |
move | Rd, Rs | move integer data |
move.d | Fd, Fs | move double |
move.s | Fd, Fs | move float |
mtc0 | Rs, Cd | store to control register |
mtc1 | Rs, Fd | store to floating point register |
Immediate load instructions move constants to registers.
Instruction | Operation | |
---|---|---|
la | Rd, label | load address |
li | Rd, const | load immediate |
li.d | Fd, const | load double immediate |
li.s | Fd, const | load float immediate |