🏳️
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. mips64

Instruction set

PreviousRegistersNextCalling convention

Last updated 2 years ago

The MIPS64 ISA is an extension of the MIPS32 ISA, so it includes all of the

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 MIPS64 instruction set includes a wide range of instructions designed to support a variety of different types of applications and workloads.

Data processing

Instruction
Description

daddu, dsubu

Add or subtract two 64-bit values and store the result in a register

dmult, ddiv

Multiply or divide two 64-bit values and store the result in a register

daddi, dsubi

Add or subtract a 64-bit value and an immediate value and store the result in a register

daddiu, dsubiu

Add or subtract a 64-bit value and an immediate value (unsigned) and store the result in a register

dmultu, ddivu

Multiply or divide two 64-bit values (unsigned) and store the result in a register

These instructions allow the processor to perform arithmetic operations on 64-bit values, which can be useful in applications that require the use of large integers or pointers. They are not present in the MIPS32 instruction set, but are available in the MIPS64 instruction set.

Control flow

Instruction
Description

jalr.hb, jalr.hbr

Jump to a new address and store the return address in a register, with the option to specify a hint for the target address

beqzalc, bnezalc

Branch to a new address if a value is equal to or not equal to zero, and store the return address in a register

bgezalc, blezalc

Branch to a new address if a value is greater than or equal to or less than or equal to zero, and store the return address in a register

bgezallc, blezallc

Branch to a new address if a value is greater than or equal to or less than or equal to zero (likely), and store the return address in a register

These instructions allow the processor to change the flow of execution in a program, with the added ability to store the return address in a register and to provide a hint for the target address. They are not present in the MIPS32 instruction set, but are available in the MIPS64 instruction set.

Memory access

Instruction
Description

ld, sd

Load or store a 64-bit value from or to memory

lwu, swu

Load or store a 64-bit value from or to memory (unsigned)

lld, scd

Load a linked or store a conditional 64-bit value from or to memory

These instructions allow the processor to access 64-bit values in memory, which can be useful in applications that require the use of large integers or pointers. They are not present in the MIPS32 instruction set, but are available in the MIPS64 instruction set.

Floating point

Instruction
Description

add.d, sub.d

Add or subtract two 64-bit floating point values and store the result in a register

mul.d, div.d

Multiply or divide two 64-bit floating point values and store the result in a register

cvt.d.w, cvt.d.l

Convert a 32-bit or 64-bit integer value to a 64-bit floating point value and store the result in a register

cvt.w.d, cvt.l.d

Convert a 64-bit floating point value to a 32-bit or 64-bit integer value and store the result in a register

These instructions allow the processor to perform arithmetic operations on 64-bit floating point values, as well as to convert between floating point and integer formats. They are not present in the MIPS32 instruction set, but are available in the MIPS64 instruction set.

Multimedia

Instruction
Description

pack.d

Pack 64-bit integers into a single register

unpack.d

Unpack 64-bit integers from a single register

add.q

Perform an addition operation on packed data

mul.q

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 64-bit integers) and to perform SIMD (Single Instruction, Multiple Data) operations. They are not present in the MIPS32 instruction set, but are available in the MIPS64 instruction set.

Resources

🛠️
instructions and features of the MIPS32 ISA.
Imagination's MIPS64 architecture with high-performance cachesMIPS
Logo