Instruction set

The MIPS32 instruction set can be broadly divided into the following categories:

CategoryDescription

Data processing

Instructions that perform arithmetic and logical operations on data stored in registers or memory

Control flow

Instructions that allow the processor to change the flow of execution in a program

Memory access

Instructions that allow the processor to read from and write to memory

Floating point

Instructions that support the use of floating point numbers in programs

Multimedia

Instructions that are optimized for processing multimedia data, such as audio and video

Overall, the MIPS32 instruction set includes a wide range of instructions designed to support a variety of different types of applications and workloads.

Data processing

InstructionDescription

add

Add two values and store the result in a register

sub

Subtract one value from another and store the result in a register

mul

Multiply two values and store the result in a register

div

Divide one value by another and store the result in a register

and

Perform a bitwise AND operation on two values and store the result in a register

or

Perform a bitwise OR operation on two values and store the result in a register

xor

Perform a bitwise XOR operation on two values and store the result in a register

nor

Perform a bitwise NOR operation on two values and store the result in a register

These instructions allow the processor to perform various types of arithmetic and logical operations on data stored in registers or memory. They are a fundamental part of the MIPS32 instruction set and are used extensively in many types of programs.

Control flow

InstructionDescription

j

Jump to a new address in the program

jal

Jump to a new address and store the return address in a register

beq

Branch to a new address if two values are equal

bne

Branch to a new address if two values are not equal

syscall

Trigger a system call or exception

These instructions allow the processor to change the flow of execution in a program. They can be used to implement branching, looping, and other control structures, as well as to handle exceptions and interrupts. They are an important part of the MIPS32 instruction set and are used extensively in many types of programs.

Memory access

InstructionDescription

lw

Load a word (4 bytes) from memory into a register

sw

Store a word (4 bytes) from a register to memory

lb

Load a byte from memory into a register

sb

Store a byte from a register to memory

These instructions allow the processor to read from and write to memory. They are used to load data from memory into registers for processing, and to store the results of processing back to memory. They are an important part of the MIPS32 instruction set and are used extensively in many types of programs.

Floating point

InstructionDescription

add.s

Add two floating point values and store the result in a register

sub.s

Subtract one floating point value from another and store the result in a register

mul.s

Multiply two floating point values and store the result in a register

div.s

Divide one floating point value by another and store the result in a register

cvt.s.w

Convert an integer value to a floating point value and store the result in a register

cvt.w.s

Convert a floating point value to an integer value and store the result in a register

These instructions allow the processor to perform various types of arithmetic operations on floating point numbers, as well as to convert between floating point and integer formats. They are an important part of the MIPS32 instruction set and are used extensively in many types of programs that require the use of floating point numbers.

Multimedia

InstructionDescription

pack.b

Pack 8-bit integers into a single register

unpack.b

Unpack 8-bit integers from a single register

add.p

Perform an addition operation on packed data

mul.p

Perform a multiplication operation on packed data

These instructions are optimized for processing multimedia data, such as audio and video. They allow the processor to perform operations on packed data (e.g. packed 8-bit integers) and to perform SIMD (Single Instruction, Multiple Data) operations. They are an important part of the MIPS32 instruction set and are used extensively in many types of programs that require efficient processing of multimedia data.

Resources

Last updated