🏳️
The CTF Recipes
  • Introduction
  • Cryptography
    • Introduction
    • General knowledge
      • Encoding
        • Character encoding
          • ASCII
          • Unicode
          • UTF-8
        • Data encoding
          • Base16
          • Base32
          • Base64
      • Maths
        • Modular arithmetic
          • Greatest Common Divisor
          • Fermat's little theorem
          • Quadratic residues
          • Tonelli-Shanks
          • Chinese Remainder Theorem
          • Modular binomial
      • Padding
        • PKCS#7
    • Misc
      • XOR
    • Mono-alphabetic substitution
      • Index of coincidence
      • frequency analysis
      • Well known algorithms
        • 🔴Scytale
        • 🔴ROT
        • 🔴Polybe
        • 🔴Vigenere
        • 🔴Pigpen cipher
        • 🔴Affine cipher
    • Symmetric Cryptography
      • AES
        • Block Encryption procedure
          • Byte Substitution
          • Shift Row
          • Mix Column
          • Add Key
          • Key Expansion / Key Schedule
        • Mode of Operation
          • ECB
            • Block shuffling
              • Challenge example
            • ECB Oracle
              • Challenge example
          • CBC
            • Bit flipping
              • Challenge example
            • Padding oracle
              • Challenge example
          • OFB
            • Key stream reconstruction
            • Encrypt to Uncrypt
  • 🛠️Pwn
    • General knowledge
      • STACK
        • Variables storage
        • Stack frame
      • PLT and GOT
      • HEAP
        • HEAP operations
        • Chunk
        • Bins
        • Chunk allocation and reallocation
      • Syscall
    • Architectures
      • aarch32
        • Registers
        • Instruction set
        • Calling convention
      • aarch64
        • Registers
        • Instruction set
        • Calling convention
      • mips32
        • Registers
        • Instruction set
        • Calling convention
      • mips64
        • Registers
        • Instruction set
        • Calling convention
      • x86 / x64
        • Registers
        • Instruction set
        • Calling convention
    • Stack exploitation
      • Stack Buffer Overflow
        • Dangerous functions
          • gets
          • memcpy
          • sprintf
          • strcat
          • strcpy
        • Basics
          • Challenge example
        • Instruction pointer Overwrite
          • Challenge example
        • De Bruijn Sequences
        • Stack reading
          • Challenge example
      • Format string
        • Dangerous functions
          • printf
          • fprintf
        • Placeholder
        • Data Leak
          • Challenge example
        • Data modification
          • Challenge example
      • Arbitrary code execution
        • Shellcode
        • ret2reg
        • Code reuse attack
          • Ret2plt
          • Ret2dlresolve
          • GOT Overwrite
          • Ret2LibC
          • Leaking LibC
          • Ret2csu
          • Return Oriented Programming - ROP
          • Sigreturn Oriented Programming - SROP
          • Blind Return Oriented Programming - BROP
            • Challenge example
          • 🔴Call Oriented Programming - COP
          • 🔴Jump Oriented Programming - JOP
          • One gadget
        • Stack pivoting
    • 🛠️Heap exploitation
      • Heap overflow
        • Challenge example
      • Use after free
        • Challenge example
      • 🛠️Double free
      • 🔴Unlink exploit
    • Protections
      • Stack Canaries
      • No eXecute
      • PIE
      • ASLR
      • RELRO
    • Integer overflow
Powered by GitBook
On this page
  • Data processing
  • Control flow
  • Memory access
  • Floating point
  • Multimedia
  • Resources
  1. Pwn
  2. Architectures
  3. mips32

Instruction set

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

Category
Description

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

Instruction
Description

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

Instruction
Description

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

Instruction
Description

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

Instruction
Description

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

Instruction
Description

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

PreviousRegistersNextCalling convention

Last updated 2 years ago

🛠️
Imagination's MIPS32 architectureMIPS
Logo