From WikiChip
Difference between revisions of "mips/mips32 instruction set"

(Typo)
 
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
{{mips title|MIPS32 Instruction Set}}
 
{{ISA|
 
{{ISA|
 
|name          =  MIPS32
 
|name          =  MIPS32
Line 4: Line 5:
 
|bits          =  32-bits
 
|bits          =  32-bits
 
|introduced    =  1999
 
|introduced    =  1999
 +
|version      =  Revision 5.3
 
|design        =  RISC
 
|design        =  RISC
 
|type          =  Register-Register
 
|type          =  Register-Register
Line 9: Line 11:
 
|branching    =  Condition Register
 
|branching    =  Condition Register
 
|endianness    =  Bi-endian
 
|endianness    =  Bi-endian
|extensions    =  [[SPECIAL2]], [[COP2]], [[LWC2]], [[SWC2]], [[LDC2]], [[SDC2]]
+
|extensions    =  {{mips|SPECIAL2}}, {{mips|COP2}}, {{mips|LWC2}}, {{mips|SWC2}}, {{mips|LDC2}}, {{mips|SDC2}}
|application  =  [[MIPS16e]], [[MIPS MCU]], [[MIPS SmartMIPS]]
+
|application  =  {{mips|MIPS16e}}, {{mips|MCU}}, {{mips|SmartMIPS}}
|multimedia    =  [[MIPS-3D]]
+
|multimedia    =  {{mips|MIPS-3D}}
 
|gpr          =  32
 
|gpr          =  32
 
|fpr          =  32
 
|fpr          =  32
 +
|spr          = {{mips|PRId register|PRId}}
 
}}
 
}}
  
The '''MIPS32 instruction set''' is an instruction set standard published in 1999 that was promulgated by [[MIPS Technologies]] after its [[Wikipedia:demerger|demerger]] from [[Silicon Graphics]] in 1998. The MIPS32 instruction set was developed along side the [[MIPS64 Instruction Set]] which includes 64-bit instructions. The MIP32 standard included coprocessor 0 control instructions for the first time. Today, the MIP32 instruction set is the most common MIPS instruction set, compatible with most [[MIPS|MIPS CPUs]]. Dur to it's relative simply, the MIP32 instruction set is also the most common instruction set thought in computer architecture university courses.
+
The '''MIPS32 instruction set''' is an instruction set standard published in 1999 that was promulgated by [[MIPS Technologies]] after its [[Wikipedia:demerger|demerger]] from [[Silicon Graphics]] in 1998. The MIPS32 instruction set was developed along side the {{mips|MIPS64 Instruction Set}} which includes 64-bit instructions. The MIP32 standard included {{mips|coprocessor 0}} control instructions for the first time. Today, the MIP32 instruction set is the most common MIPS instruction set, compatible with most {{mips|CPUs}}. Due to its relative simplicity, the MIP32 instruction set is also the most common instruction set taught in computer architecture university courses.
  
 +
The latest MIPS32 revision is revision 5, which added a set of new memory-efficient operations for large memory footprint applications.
  
 +
== History ==
 +
The MIPS32 instruction set architecture was first published in 1999 by [[MIPS Technologies]] by it has demerged from [[Silicon Graphics]] in 1998. MIPS32 is largely a superset of the {{mips|MIPS II}} ISA.
 +
 +
=== Release 2 ===
 +
Release 2 was first introduced in revision 1 of the MIPS32 ISA in 2002. Release 2 added 20 new instructions: {{mips|DI}}, {{mips|EHB}}, {{mips|EI}}, {{mips|EXT}}, {{mips|INS}}, {{mips|JALR.HB}}, {{mips|JR.HB}}, {{mips|MFHC1}}, {{mips|MFHC2}}, {{mips|MTHC1}}, {{mips|MTHC2}}, {{mips|RDHWR}}, {{mips|RDPGPR}}, {{mips|ROTR}}, {{mips|ROTRV}}, {{mips|SEB}}, {{mips|SEH}}, {{mips|SYNCI}}, {{mips|WRPGPR}}, and {{mips|WSBH}}. Release 2 also added support for 64-bit FPUs.
 +
 +
=== Release 3 ===
 +
Release 3 was first introduced in revision 3 of the MIPS32 ISA in 2010. The release added the {{mips|JALX}} instruction.
 +
 +
=== Release 4 ===
 +
Release 4 was skipped because MIPS Technologies was being auctioned off. Officially the reason was given as "Release 4 because the number four is considered by many to be inauspicious or unlucky".<ref>[http://withimagination.imgtec.com/index.php/mips-processors/continuing-evolution-of-the-mips-instruction-set-architecture#sthash.4uCPPXKz.dpuf The continuing evolution of the MIPS Instruction Set Architecture]</ref>
 +
 +
=== Release 5 ===
 +
Release 5 was announced in late 2012. The release added a new set of instructions called '''Enhanced Virtual Addressing''' (EVA) to allow more efficient use of memory of larger footprint kernels. The following EVA Load/Store instructions were added: {{mips|LBE}}, {{mips|LBUE}}, {{mips|LHE}}, {{mips|LHUE}}, {{mips|LWE}}, {{mips|SBE}}, {{mips|SHE}}, {{mips|SWE}}, {{mips|CACHEE}}, {{mips|PREFE}}, {{mips|LLE}}, {{mips|SCE}}, {{mips|LWLE}}, {{mips|LWRE}}, {{mips|SWLE}}, {{mips|SWRE}}.
  
 
== Instructions list ==
 
== Instructions list ==
Line 41: Line 59:
 
** [[#Memory control instructions|Memory Control Instructions]]
 
** [[#Memory control instructions|Memory Control Instructions]]
 
** [[#Move instructions|Move Instructions]]
 
** [[#Move instructions|Move Instructions]]
* Coprocessor Instructions
+
* [[Coprocessor]] Instructions
 
** [[#Branch instructions|Branch Instructions]]
 
** [[#Branch instructions|Branch Instructions]]
 
** [[#Execute instructions|Execute Instructions]]
 
** [[#Execute instructions|Execute Instructions]]
Line 54: Line 72:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[ADD - MIPS|ADD]] || Add Word
+
| {{mips|ADD}} || Add Word
 
|-
 
|-
| [[ADDI - MIPS|ADDI]] || Add Immediate Word
+
| {{mips|ADDI}} || Add Immediate Word
 
|-
 
|-
| [[ADDIU - MIPS|ADDIU]] || Add Immediate Unsigned Word
+
| {{mips|ADDIU}} || Add Immediate Unsigned Word
 
|-
 
|-
| [[ADDU - MIPS|ADDU]] || Add Unsigned Word
+
| {{mips|ADDU}} || Add Unsigned Word
 
|-
 
|-
| [[CLO - MIPS|CLO]] || Count Leading Ones in Word
+
| {{mips|CLO}} || Count Leading Ones in Word
 
|-
 
|-
| [[CLZ - MIPS|CLZ]] || Count Leading Zeros in Word
+
| {{mips|CLZ}} || Count Leading Zeros in Word
 
|-
 
|-
| [[DIV - MIPS|DIV]] || Divide Word
+
| {{mips|DIV}} || Divide Word
 
|-
 
|-
| [[DIVU - MIPS|DIVU]] || Divide Unsigned Word
+
| {{mips|DIVU}} || Divide Unsigned Word
 
|-
 
|-
| [[MADD - MIPS|MADD]] || Multiply and Add Word to Hi, Lo
+
| {{mips|MADD}} || Multiply and Add Word to Hi, Lo
 
|-
 
|-
| [[MADDU - MIPS|MADDU]] || Multiply and Add Unsigned Word to Hi, Lo
+
| {{mips|MADDU}} || Multiply and Add Unsigned Word to Hi, Lo
 
|-
 
|-
| [[MSUB - MIPS|MSUB]] || Multiply and Subtract Word to Hi, Lo
+
| {{mips|MSUB}} || Multiply and Subtract Word to Hi, Lo
 
|-
 
|-
| [[MSUBU - MIPS|MSUBU]] || Multiply and Subtract Unsigned Word to Hi, Lo
+
| {{mips|MSUBU}} || Multiply and Subtract Unsigned Word to Hi, Lo
 
|-
 
|-
| [[MUL - MIPS|MUL]] || Multiply Word to GPR
+
| {{mips|MUL}} || Multiply Word to GPR
 
|-
 
|-
| [[MULT - MIPS|MULT]] || Multiply Word
+
| {{mips|MULT}} || Multiply Word
 
|-
 
|-
| [[MULTU - MIPS|MULTU]] || Multiply Unsigned Word
+
| {{mips|MULTU}} || Multiply Unsigned Word
 
|-
 
|-
| [[SEB - MIPS|SEB]] || Sign-Extend Byte
+
| {{mips|SEB}} || Sign-Extend Byte
 
|-
 
|-
| [[SEH - MIPS|SEH]] || Sign-Extend Halftword
+
| {{mips|SEH}} || Sign-Extend Halfword
 
|-
 
|-
| [[SLT - MIPS|SLT]] || Set on Less Than
+
| {{mips|SLT}} || Set on Less Than
 
|-
 
|-
| [[SLTI - MIPS|SLTI]] || Set on Less Than Immediate
+
| {{mips|SLTI}} || Set on Less Than Immediate
 
|-
 
|-
| [[SLTIU - MIPS|SLTIU]] || Set on Less Than Immediate Unsigned
+
| {{mips|SLTIU}} || Set on Less Than Immediate Unsigned
 
|-
 
|-
| [[SLTU - MIPS|SLTU]] || Set on Less Than Unsigned
+
| {{mips|SLTU}} || Set on Less Than Unsigned
 
|-
 
|-
| [[SUB - MIPS|SUB]] || Subtract Word
+
| {{mips|SUB}} || Subtract Word
 
|-
 
|-
| [[SUBU - MIPS|SUBU]] || Subtract Unsigned Word
+
| {{mips|SUBU}} || Subtract Unsigned Word
 
|}
 
|}
  
Line 107: Line 125:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[B - MIPS|B]] || Unconditional Branch
+
| {{mips|B}} || Unconditional Branch
 
|-
 
|-
| [[BAL - MIPS|BAL]] || Branch and Link
+
| {{mips|BAL}} || Branch and Link
 
|-
 
|-
| [[BEQ - MIPS|BEQ]] || Branch on Equal
+
| {{mips|BEQ}} || Branch on Equal
 
|-
 
|-
| [[BGEZ - MIPS|BGEZ]] || Branch on Greater Than or Equal to Zero
+
| {{mips|BGEZ}} || Branch on Greater Than or Equal to Zero
 
|-
 
|-
| [[BGEZAL - MIPS|BGEZAL]] || Branch on Greater Than or Equal to Zero and Link
+
| {{mips|BGEZAL}} || Branch on Greater Than or Equal to Zero and Link
 
|-
 
|-
| [[BGTZ - MIPS|BGTZ]] || Branch on Greater Than Zero
+
| {{mips|BGTZ}} || Branch on Greater Than Zero
 
|-
 
|-
| [[BLEZ - MIPS|BLEZ]] || Branch on Less Than or Equal to Zero
+
| {{mips|BLEZ}} || Branch on Less Than or Equal to Zero
 
|-
 
|-
| [[BLTZ - MIPS|BLTZ]] || Branch on Less Than Zero
+
| {{mips|BLTZ}} || Branch on Less Than Zero
 
|-
 
|-
| [[BLTZAL - MIPS|BLTZAL]] || Branch on Less Than Zero and Link
+
| {{mips|BLTZAL}} || Branch on Less Than Zero and Link
 
|-
 
|-
| [[BNE - MIPS|BNE]] || Branch on Not Equal
+
| {{mips|BNE}} || Branch on Not Equal
 
|-
 
|-
| <strike>[[BEQL - MIPS|BEQL]]</strike> || Branch on Equal Likely
+
| <strike>{{mips|BEQL}}</strike> || Branch on Equal Likely
 
|-
 
|-
| <strike>[[BGEZALL - MIPS|BGEZALL]]</strike> || Branch on Greater Than or Equal to Zero and Link Likely
+
| <strike>{{mips|BGEZALL}}</strike> || Branch on Greater Than or Equal to Zero and Link Likely
 
|-
 
|-
| <strike>[[BGEZL - MIPS|BGEZL]]</strike> || Branch on Greater Than or Equal to Zero Likely
+
| <strike>{{mips|BGEZL}}</strike> || Branch on Greater Than or Equal to Zero Likely
 
|-
 
|-
| <strike>[[BGTZL - MIPS|BGTZL]]</strike> || Branch on Greater Than Zero Likely
+
| <strike>{{mips|BGTZL}}</strike> || Branch on Greater Than Zero Likely
 
|-
 
|-
| <strike>[[BLEZL - MIPS|BLEZL]]</strike> || Branch on Less Than or Equal to Zero Likely
+
| <strike>{{mips|BLEZL}}</strike> || Branch on Less Than or Equal to Zero Likely
 
|-
 
|-
| <strike>[[BLTZALL - MIPS|BLTZALL]]</strike> || Branch on Less Than Zero and Link Likely
+
| <strike>{{mips|BLTZALL}}</strike> || Branch on Less Than Zero and Link Likely
 
|-
 
|-
| <strike>[[BLTZL - MIPS|BLTZL]]</strike> || Branch on Less Than Zero Likely
+
| <strike>{{mips|BLTZL}}</strike> || Branch on Less Than Zero Likely
 
|-
 
|-
| <strike>[[BNEL - MIPS|BNEL]]</strike> || Branch on Not Equal Likely
+
| <strike>{{mips|BNEL}}</strike> || Branch on Not Equal Likely
 
|}
 
|}
  
Line 149: Line 167:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[J - MIPS|J]] || Jump
+
| {{mips|J}} || Jump
 
|-
 
|-
| [[JAL - MIPS|JAL]] || Jump and Link
+
| {{mips|JAL}} || Jump and Link
 
|-
 
|-
| [[JALR - MIPS|JALR]] || Jump and Link Register
+
| {{mips|JALR}} || Jump and Link Register
 
|-
 
|-
 
| [[JALR.HB  - MIPS|JALR.HB ]]|| Jump and Link Register with Hazard Barrier
 
| [[JALR.HB  - MIPS|JALR.HB ]]|| Jump and Link Register with Hazard Barrier
 
|-
 
|-
| [[JALX - MIPS|JALX]] || Jump and Link Exchange
+
| {{mips|JALX}} || Jump and Link Exchange
 
|-
 
|-
| [[JR - MIPS|JR]] || Jump Register
+
| {{mips|JR}} || Jump Register
 
|-
 
|-
| [[JR.HB - MIPS|JR.HB]] || Jump Register with Hazard Barrier
+
| {{mips|JR.HB}} || Jump Register with Hazard Barrier
 
|}
 
|}
  
Line 168: Line 186:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[EHB - MIPS|EHB]] || Execution Hazard Barrier
+
| {{mips|EHB}} || Execution Hazard Barrier
 
|-
 
|-
| [[NOP - MIPS|NOP]] || No Operation
+
| {{mips|NOP}} || No Operation
 
|-
 
|-
| [[PAUSE - MIPS|PAUSE]] || Wait for LLBit to Clear
+
| {{mips|PAUSE}} || Wait for LLBit to Clear
 
|-
 
|-
| [[SSNOP - MIPS|SSNOP]] || Superscalar No Operation
+
| {{mips|SSNOP}} || Superscalar No Operation
 
|}
 
|}
  
Line 181: Line 199:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[LB - MIPS|LB]] ||  Load Byte
+
| {{mips|LB}} ||  Load Byte
 
|-
 
|-
| [[LBE - MIPS|LBE]] || Load Byte EVA
+
| {{mips|LBE}} || Load Byte EVA
 
|-
 
|-
| [[LBU - MIPS|LBU]] || Load Byte Unsigned
+
| {{mips|LBU}} || Load Byte Unsigned
 
|-
 
|-
| [[LBUE - MIPS|LBUE]] || Load Byte Unsigned EVA
+
| {{mips|LBUE}} || Load Byte Unsigned EVA
 
|-
 
|-
| [[LH - MIPS|LH]] || Load Halfword
+
| {{mips|LH}} || Load Halfword
 
|-
 
|-
| [[LHE - MIPS|LHE]] || Load Halfword EVA
+
| {{mips|LHE}} || Load Halfword EVA
 
|-
 
|-
| [[LHU - MIPS|LHU]] || Load Halfword Unsigned
+
| {{mips|LHU}} || Load Halfword Unsigned
 
|-
 
|-
| [[LHUE - MIPS|LHUE]] || Load Halfword Unsigned EVA
+
| {{mips|LHUE}} || Load Halfword Unsigned EVA
 
|-
 
|-
| [[LL - MIPS|LL]] || Load Linked Word
+
| {{mips|LL}} || Load Linked Word
 
|-
 
|-
| [[LLE - MIPS|LLE]] || Load Linked Word-EVA
+
| {{mips|LLE}} || Load Linked Word-EVA
 
|-
 
|-
| [[LW - MIPS|LW]] || Load Word
+
| {{mips|LW}} || Load Word
 
|-
 
|-
| [[LWE - MIPS|LWE]] || Load Word EVA
+
| {{mips|LWE}} || Load Word EVA
 
|-
 
|-
| [[LWL - MIPS|LWL]] || Load Word Left
+
| {{mips|LWL}} || Load Word Left
 
|-
 
|-
| [[LWLE - MIPS|LWLE]] || Load Word Left EVA
+
| {{mips|LWLE}} || Load Word Left EVA
 
|-
 
|-
| [[LWR - MIPS|LWR]] || Load Word Right
+
| {{mips|LWR}} || Load Word Right
 
|-
 
|-
| [[LWRE - MIPS|LWRE]] || Load Word Right EVA
+
| {{mips|LWRE}} || Load Word Right EVA
 
|-
 
|-
| [[PREF - MIPS|PREF]] || Prefetch
+
| {{mips|PREF}} || Prefetch
 
|-
 
|-
| [[PREFE - MIPS|PREFE]] || Prefetch-EVA
+
| {{mips|PREFE}} || Prefetch-EVA
 
|-
 
|-
| [[SB - MIPS|SB]] || Store Byte
+
| {{mips|SB}} || Store Byte
 
|-
 
|-
| [[SBE - MIPS|SBE]] || Store Byte EVA
+
| {{mips|SBE}} || Store Byte EVA
 
|-
 
|-
| [[SC - MIPS|SC]] || Store Conditional Word
+
| {{mips|SC}} || Store Conditional Word
 
|-
 
|-
| [[SCE - MIPS|SCE]] || Store Conditional Word EVA
+
| {{mips|SCE}} || Store Conditional Word EVA
 
|-
 
|-
| [[SH - MIPS|SH]] || Store Halfword
+
| {{mips|SH}} || Store Halfword
 
|-
 
|-
| [[SHE - MIPS|SHE]] || Store Halfword EVA
+
| {{mips|SHE}} || Store Halfword EVA
 
|-
 
|-
| [[SW - MIPS|SW]] || Store Word
+
| {{mips|SW}} || Store Word
 
|-
 
|-
| [[SWE - MIPS|SWE]] || Store Word EVA
+
| {{mips|SWE}} || Store Word EVA
 
|-
 
|-
| [[SWL - MIPS|SWL]] || Store Word Left
+
| {{mips|SWL}} || Store Word Left
 
|-
 
|-
| [[SWLE - MIPS|SWLE]] || Store Word Left EVA
+
| {{mips|SWLE}} || Store Word Left EVA
 
|-
 
|-
| [[SWR - MIPS|SWR]] || Store Word Right
+
| {{mips|SWR}} || Store Word Right
 
|-
 
|-
| [[SWRE - MIPS|SWRE]] || Store Word Right EVA
+
| {{mips|SWRE}} || Store Word Right EVA
 
|-
 
|-
| [[SYNC - MIPS|SYNC]] || Synchronize Shared Memory
+
| {{mips|SYNC}} || Synchronize Shared Memory
 
|-
 
|-
| [[SYNCI - MIPS|SYNCI]] || Synchronize Caches to Make Instruction Writes Effective
+
| {{mips|SYNCI}} || Synchronize Caches to Make Instruction Writes Effective
 
|}
 
|}
  
Line 250: Line 268:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[AND - MIPS|AND]] || And
+
| {{mips|AND}} || And
 
|-
 
|-
| [[ANDI - MIPS|ANDI]] || And Immediate
+
| {{mips|ANDI}} || And Immediate
 
|-
 
|-
| [[LUI - MIPS|LUI]] || Load Upper Immediate
+
| {{mips|LUI}} || Load Upper Immediate
 
|-
 
|-
| [[NOR - MIPS|NOR]] || Not Or
+
| {{mips|NOR}} || Not Or
 
|-
 
|-
| [[OR - MIPS|OR]] || Or
+
| {{mips|OR}} || Or
 
|-
 
|-
| [[ORI - MIPS|ORI]] || Or Immediate
+
| {{mips|ORI}} || Or Immediate
 
|-
 
|-
| [[XOR - MIPS|XOR]] || Exclusive Or
+
| {{mips|XOR}} || Exclusive Or
 
|-
 
|-
| [[XORI - MIPS|XORI]] || Exclusive Or Immediate
+
| {{mips|XORI}} || Exclusive Or Immediate
 
|}
 
|}
  
Line 271: Line 289:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[EXT - MIPS|EXT]] || Extract Bit Field
+
| {{mips|EXT}} || Extract Bit Field
 
|-
 
|-
| [[INS - MIPS|INS]] || Insert Bit Field
+
| {{mips|INS}} || Insert Bit Field
 
|-
 
|-
| [[WSBH - MIPS|WSBH]] || Word Swap Bytes Within Halfwords
+
| {{mips|WSBH}} || Word Swap Bytes Within Halfwords
 
|}
 
|}
  
Line 282: Line 300:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[MFHI - MIPS|MFHI]] || Move From HI Register
+
| {{mips|MFHI}} || Move From HI Register
 
|-
 
|-
| [[MFLO - MIPS|MFLO]] || Move From LO Register
+
| {{mips|MFLO}} || Move From LO Register
 
|-
 
|-
| [[MOVF - MIPS|MOVF]] || Move Conditional on Floating Point False
+
| {{mips|MOVF}} || Move Conditional on Floating Point False
 
|-
 
|-
| [[MOVN - MIPS|MOVN]] || Move Conditional on Not Zero
+
| {{mips|MOVN}} || Move Conditional on Not Zero
 
|-
 
|-
| [[MOVT - MIPS|MOVT]] || Move Conditional on Floating Point True
+
| {{mips|MOVT}} || Move Conditional on Floating Point True
 
|-
 
|-
| [[MOVZ - MIPS|MOVZ]] || Move Conditional on Zero
+
| {{mips|MOVZ}} || Move Conditional on Zero
 
|-
 
|-
| [[MTHI - MIPS|MTHI]] || Move To HI Register
+
| {{mips|MTHI}} || Move To HI Register
 
|-
 
|-
| [[MTLO - MIPS|MTLO]] || Move To LO Register
+
| {{mips|MTLO}} || Move To LO Register
 
|-
 
|-
| [[RDHWR - MIPS|RDHWR]] || Read Hardware Register
+
| {{mips|RDHWR}} || Read Hardware Register
 
|}
 
|}
  
Line 305: Line 323:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[ROTR - MIPS|ROTR]] || Rotate Word Right
+
| {{mips|ROTR}} || Rotate Word Right
 
|-
 
|-
| [[ROTRV - MIPS|ROTRV]] || Rotate Word Right Variable
+
| {{mips|ROTRV}} || Rotate Word Right Variable
 
|-
 
|-
| [[SLL - MIPS|SLL]] || Shift Word Left Logical
+
| {{mips|SLL}} || Shift Word Left Logical
 
|-
 
|-
| [[SLLV - MIPS|SLLV]] || Shift Word Left Logical Variable
+
| {{mips|SLLV}} || Shift Word Left Logical Variable
 
|-
 
|-
| [[SRA - MIPS|SRA]] || Shift Word Right Arithmetic
+
| {{mips|SRA}} || Shift Word Right Arithmetic
 
|-
 
|-
| [[SRAV - MIPS|SRAV]] || Shift Word Right Arithmetic Variable
+
| {{mips|SRAV}} || Shift Word Right Arithmetic Variable
 
|-
 
|-
| [[SRL - MIPS|SRL]] || Shift Word Right Logical
+
| {{mips|SRL}} || Shift Word Right Logical
 
|-
 
|-
| [[SRLV - MIPS|SRLV]] || Shift Word Right Logical Variable
+
| {{mips|SRLV}} || Shift Word Right Logical Variable
 
|}
 
|}
  
Line 326: Line 344:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[BREAK - MIPS|BREAK]] || Breakpoint
+
| {{mips|BREAK}} || Breakpoint
 
|-
 
|-
| [[SYSCALL - MIPS|SYSCALL]] || System Call
+
| {{mips|SYSCALL}} || System Call
 
|-
 
|-
| [[TEQ - MIPS|TEQ]] || Trap if Equal
+
| {{mips|TEQ}} || Trap if Equal
 
|-
 
|-
| [[TEQI - MIPS|TEQI]] || Trap if Equal Immediate
+
| {{mips|TEQI}} || Trap if Equal Immediate
 
|-
 
|-
| [[TGE - MIPS|TGE]] || Trap if Greater or Equal
+
| {{mips|TGE}} || Trap if Greater or Equal
 
|-
 
|-
| [[TGEI - MIPS|TGEI]] || Trap if Greater of Equal Immediate
+
| {{mips|TGEI}} || Trap if Greater of Equal Immediate
 
|-
 
|-
| [[TGEIU - MIPS|TGEIU]] || Trap if Greater or Equal Immediate Unsigned
+
| {{mips|TGEIU}} || Trap if Greater or Equal Immediate Unsigned
 
|-
 
|-
| [[TGEU - MIPS|TGEU]] || Trap if Greater or Equal Unsigned
+
| {{mips|TGEU}} || Trap if Greater or Equal Unsigned
 
|-
 
|-
| [[TLT - MIPS|TLT]] || Trap if Less Than
+
| {{mips|TLT}} || Trap if Less Than
 
|-
 
|-
| [[TLTI - MIPS|TLTI]] || Trap if Less Than Immediate
+
| {{mips|TLTI}} || Trap if Less Than Immediate
 
|-
 
|-
| [[TLTIU - MIPS|TLTIU]] || Trap if Less Than Immediate Unsigned
+
| {{mips|TLTIU}} || Trap if Less Than Immediate Unsigned
 
|-
 
|-
| [[TLTU - MIPS|TLTU]] || Trap if Less Than Unsigned
+
| {{mips|TLTU}} || Trap if Less Than Unsigned
 
|-
 
|-
| [[TNE - MIPS|TNE]] || Trap if Not Equal
+
| {{mips|TNE}} || Trap if Not Equal
 
|-
 
|-
| [[TNEI - MIPS|TNEI]] || Trap if Not Equal Immediate
+
| {{mips|TNEI}} || Trap if Not Equal Immediate
 
|}
 
|}
  
Line 362: Line 380:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[ABS.fmt - MIPS|ABS.fmt]] || Floating Point Absolute Value
+
| {{mips|ABS.fmt}} || Floating Point Absolute Value
 
|-
 
|-
| [[ADD.fmt - MIPS|ADD.fmt]] || Floating Point Add
+
| {{mips|ADD.fmt}} || Floating Point Add
 
|-
 
|-
| [[DIV.fmt - MIPS|DIV.fmt]] || Floating Point Divide
+
| {{mips|DIV.fmt}} || Floating Point Divide
 
|-
 
|-
| [[MADD.fmt - MIPS|MADD.fmt]] || Floating Point Multiply Add
+
| {{mips|MADD.fmt}} || Floating Point Multiply Add
 
|-
 
|-
| [[MSUB.fmt - MIPS|MSUB.fmt]] || Floating Point Multiply Subtract
+
| {{mips|MSUB.fmt}} || Floating Point Multiply Subtract
 
|-
 
|-
| [[MUL.fmt - MIPS|MUL.fmt]] || Floating Point Multiply
+
| {{mips|MUL.fmt}} || Floating Point Multiply
 
|-
 
|-
| [[NEG.fmt - MIPS|NEG.fmt]] || Floating Point Negate
+
| {{mips|NEG.fmt}} || Floating Point Negate
 
|-
 
|-
| [[NMADD.fmt - MIPS|NMADD.fmt]] || Floating Point Negative Multiply Add
+
| {{mips|NMADD.fmt}} || Floating Point Negative Multiply Add
 
|-
 
|-
| [[NMSUB.fmt - MIPS|NMSUB.fmt]] || Floating Point Negative Multiply Subtract
+
| {{mips|NMSUB.fmt}} || Floating Point Negative Multiply Subtract
 
|-
 
|-
| [[RECIP.fmt - MIPS|RECIP.fmt]] || Reciprocal Approximation
+
| {{mips|RECIP.fmt}} || Reciprocal Approximation
 
|-
 
|-
| [[RSQRT.fmt - MIPS|RSQRT.fmt]] || Reciprocal Square Root Approximation
+
| {{mips|RSQRT.fmt}} || Reciprocal Square Root Approximation
 
|-
 
|-
| [[SQRT.fmt - MIPS|SQRT.fmt]] || Floating Point Square Root
+
| {{mips|SQRT.fmt}} || Floating Point Square Root
 
|-
 
|-
| [[SUB.fmt - MIPS|SUB.fmt]] || Floating Point Subtract
+
| {{mips|SUB.fmt}} || Floating Point Subtract
 
|}
 
|}
  
Line 394: Line 412:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[BC1F - MIPS|BC1F]] || Branch on FP False
+
| {{mips|BC1F}} || Branch on FP False
 
|-
 
|-
| [[BC1T - MIPS|BC1T]] || Branch on FP True
+
| {{mips|BC1T}} || Branch on FP True
 
|-
 
|-
| <strike>[[BC1FL - MIPS|BC1FL]]</strike> || Branch on FP False Likely
+
| <strike>{{mips|BC1FL}}</strike> || Branch on FP False Likely
 
|-
 
|-
| <strike>[[BC1TL - MIPS|BC1TL]]</strike> || Branch on FP True Likely
+
| <strike>{{mips|BC1TL}}</strike> || Branch on FP True Likely
 
|}
 
|}
  
Line 407: Line 425:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[C.cond.fmt - MIPS|C.cond.fmt]] || Floating Point Compare
+
| {{mips|C.cond.fmt}} || Floating Point Compare
 
|}
 
|}
  
Line 414: Line 432:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[ALNV.PS - MIPS|ALNV.PS]] || Floating Point Align Variable
+
| {{mips|ALNV.PS}} || Floating Point Align Variable
 
|-
 
|-
| [[CEIL.L.fmt - MIPS|CEIL.L.fmt]] || Floating Point Ceiling Convert to Long Fixed Point
+
| {{mips|CEIL.L.fmt}} || Floating Point Ceiling Convert to Long Fixed Point
 
|-
 
|-
| [[CEIL.W.fmt - MIPS|CEIL.W.fmt]] || Floating Point Ceiling Convert to Word Fixed Point
+
| {{mips|CEIL.W.fmt}} || Floating Point Ceiling Convert to Word Fixed Point
 
|-
 
|-
| [[CVT.D.fmt - MIPS|CVT.D.fmt]] || Floating Point Convert to Double Floating Point
+
| {{mips|CVT.D.fmt}} || Floating Point Convert to Double Floating Point
 
|-
 
|-
| [[CVT.L.fmt - MIPS|CVT.L.fmt]] || Floating Point Convert to Long Fixed Point
+
| {{mips|CVT.L.fmt}} || Floating Point Convert to Long Fixed Point
 
|-
 
|-
| [[CVT.PS.S - MIPS|CVT.PS.S]] || Floating Point Convert Pair to Paired Single
+
| {{mips|CVT.PS.S}} || Floating Point Convert Pair to Paired Single
 
|-
 
|-
| [[CVT.S.PL - MIPS|CVT.S.PL]] || Floating Point Convert Pair Lower to Single Floating Point
+
| {{mips|CVT.S.PL}} || Floating Point Convert Pair Lower to Single Floating Point
 
|-
 
|-
| [[CVT.S.PU - MIPS|CVT.S.PU]] || Floating Point Convert Pair Upper to Single Floating Point
+
| {{mips|CVT.S.PU}} || Floating Point Convert Pair Upper to Single Floating Point
 
|-
 
|-
| [[CVT.S.fmt - MIPS|CVT.S.fmt]] || Floating Point Convert to Single Floating Point
+
| {{mips|CVT.S.fmt}} || Floating Point Convert to Single Floating Point
 
|-
 
|-
| [[CVT.W.fmt - MIPS|CVT.W.fmt]] || Floating Point Convert to Word Fixed Point
+
| {{mips|CVT.W.fmt}} || Floating Point Convert to Word Fixed Point
 
|-
 
|-
| [[FLOOR.L.fmt - MIPS|FLOOR.L.fmt]] || Floating Point Floor Convert to Long Fixed Point
+
| {{mips|FLOOR.L.fmt}} || Floating Point Floor Convert to Long Fixed Point
 
|-
 
|-
| [[FLOOR.W.fmt - MIPS|FLOOR.W.fmt]] || Floating Point Floor Convert to Word Fixed Point
+
| {{mips|FLOOR.W.fmt}} || Floating Point Floor Convert to Word Fixed Point
 
|-
 
|-
| [[PLL.PS - MIPS|PLL.PS]] || Pair Lower Lower
+
| {{mips|PLL.PS}} || Pair Lower Lower
 
|-
 
|-
| [[PLU.PS - MIPS|PLU.PS]] || Pair Lower Upper
+
| {{mips|PLU.PS}} || Pair Lower Upper
 
|-
 
|-
| [[PUL.PS - MIPS|PUL.PS]] || Pair Upper Lower
+
| {{mips|PUL.PS}} || Pair Upper Lower
 
|-
 
|-
| [[PUU.PS - MIPS|PUU.PS]] || Pair Upper Upper
+
| {{mips|PUU.PS}} || Pair Upper Upper
 
|-
 
|-
| [[ROUND.L.fmt - MIPS|ROUND.L.fmt]] || Floating Point Round to Long Fixed Point
+
| {{mips|ROUND.L.fmt}} || Floating Point Round to Long Fixed Point
 
|-
 
|-
| [[ROUND.W.fmt - MIPS|ROUND.W.fmt]] || Floating Point Round to Word Fixed Point
+
| {{mips|ROUND.W.fmt}} || Floating Point Round to Word Fixed Point
 
|-
 
|-
| [[TRUNC.L.fmt - MIPS|TRUNC.L.fmt]] || Floating Point Truncate to Long Fixed Point
+
| {{mips|TRUNC.L.fmt}} || Floating Point Truncate to Long Fixed Point
 
|-
 
|-
| [[TRUNC.W.fmt - MIPS|TRUNC.W.fmt]] || Floating Point Truncate to Word Fixed Point
+
| {{mips|TRUNC.W.fmt}} || Floating Point Truncate to Word Fixed Point
 
|}
 
|}
  
Line 460: Line 478:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[LDC1 - MIPS|LDC1]] || Load Doubleword to Floating Point
+
| {{mips|LDC1}} || Load Doubleword to Floating Point
 
|-
 
|-
| [[LDXC1 - MIPS|LDXC1]] || Load Doubleword Indexed to Floating Point
+
| {{mips|LDXC1}} || Load Doubleword Indexed to Floating Point
 
|-
 
|-
| [[LUXC1 - MIPS|LUXC1]] || Load Doubleword Indexed Unaligned to Floating Point
+
| {{mips|LUXC1}} || Load Doubleword Indexed Unaligned to Floating Point
 
|-
 
|-
| [[LWC1 - MIPS|LWC1]] || Load Word to Floating Point
+
| {{mips|LWC1}} || Load Word to Floating Point
 
|-
 
|-
| [[LWXC1 - MIPS|LWXC1]] || Load Word Indexed to Floating Point
+
| {{mips|LWXC1}} || Load Word Indexed to Floating Point
 
|-
 
|-
| [[PREFX - MIPS|PREFX]] || Prefetch Indexed
+
| {{mips|PREFX}} || Prefetch Indexed
 
|-
 
|-
| [[SDC1 - MIPS|SDC1]] || Store Doubleword from Floating Point
+
| {{mips|SDC1}} || Store Doubleword from Floating Point
 
|-
 
|-
| [[SDXC1 - MIPS|SDXC1]] || Store Doubleword Indexed from Floating Point
+
| {{mips|SDXC1}} || Store Doubleword Indexed from Floating Point
 
|-
 
|-
| [[SUXC1 - MIPS|SUXC1]] || Store Doubleword Indexed Unaligned from Floating Point
+
| {{mips|SUXC1}} || Store Doubleword Indexed Unaligned from Floating Point
 
|-
 
|-
| [[SWC1 - MIPS|SWC1]] || Store Word from Floating Point
+
| {{mips|SWC1}} || Store Word from Floating Point
 
|-
 
|-
| [[SWXC1 - MIPS|SWXC1]] || Store Word Indexed from Floating Point
+
| {{mips|SWXC1}} || Store Word Indexed from Floating Point
 
|}
 
|}
  
Line 488: Line 506:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[CFC1 - MIPS|CFC1]] || Move Control Word from Floating Point
+
| {{mips|CFC1}} || Move Control Word from Floating Point
 
|-
 
|-
| [[CTC1 - MIPS|CTC1]] || Move Control Word to Floating Point
+
| {{mips|CTC1}} || Move Control Word to Floating Point
 
|-
 
|-
| [[MFC1 - MIPS|MFC1]] || Move Word from Floating Point
+
| {{mips|MFC1}} || Move Word from Floating Point
 
|-
 
|-
| [[MFHC1 - MIPS|MFHC1]] || Move Word from High Half of Floating Point Register
+
| {{mips|MFHC1}} || Move Word from High Half of Floating Point Register
 
|-
 
|-
| [[MOV.fmt - MIPS|MOV.fmt]] || Floating Point Move
+
| {{mips|MOV.fmt}} || Floating Point Move
 
|-
 
|-
| [[MOVF.fmt - MIPS|MOVF.fmt]] || Floating Point Move Conditional on Floating Point False
+
| {{mips|MOVF.fmt}} || Floating Point Move Conditional on Floating Point False
 
|-
 
|-
| [[MOVN.fmt - MIPS|MOVN.fmt]] || Floating Point Move Conditional on Not Zero
+
| {{mips|MOVN.fmt}} || Floating Point Move Conditional on Not Zero
 
|-
 
|-
| [[MOVT.fmt - MIPS|MOVT.fmt]] || Floating Point Move Conditional on Floating Point True
+
| {{mips|MOVT.fmt}} || Floating Point Move Conditional on Floating Point True
 
|-
 
|-
| [[MOVZ.fmt - MIPS|MOVZ.fmt]] || Floating Point Move Conditional on Zero
+
| {{mips|MOVZ.fmt}} || Floating Point Move Conditional on Zero
 
|-
 
|-
| [[MTC1 - MIPS|MTC1]] || Move Word to Floating Point
+
| {{mips|MTC1}} || Move Word to Floating Point
 
|-
 
|-
| [[MTHC1 - MIPS|MTHC1]] || Move Word to High Half of Floating Point Register
+
| {{mips|MTHC1}} || Move Word to High Half of Floating Point Register
 
|}
 
|}
  
Line 517: Line 535:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[BC2F - MIPS|BC2F]] || Branch on COP2 False
+
| {{mips|BC2F}} || Branch on COP2 False
 
|-
 
|-
| [[BC2T - MIPS|BC2T]] || Branch on COP2 True
+
| {{mips|BC2T}} || Branch on COP2 True
 
|-
 
|-
| <strike>[[BC2FL - MIPS|BC2FL]]</strike> || Branch on COP2 False Likely
+
| <strike>{{mips|BC2FL}}</strike> || Branch on COP2 False Likely
 
|-
 
|-
| <strike>[[BC2TL - MIPS|BC2TL]]</strike> || Branch on COP2 True Likely
+
| <strike>{{mips|BC2TL}}</strike> || Branch on COP2 True Likely
 
|}
 
|}
  
Line 531: Line 549:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[COP2 - MIPS|COP2]] || Coprocessor Operation to Coprocessor 2
+
| {{mips|COP2}} || Coprocessor Operation to Coprocessor 2
 
|}
 
|}
  
Line 538: Line 556:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[DC2 - MIPS|DC2]] || Load Doubleword to Coprocessor 2
+
| {{mips|DC2}} || Load Doubleword to Coprocessor 2
 
|-
 
|-
| [[LWC2 - MIPS|LWC2]] || Load Word to Coprocessor 2
+
| {{mips|LWC2}} || Load Word to Coprocessor 2
 
|-
 
|-
| [[SDC2 - MIPS|SDC2]] || Store Doubleword from Coprocessor 2
+
| {{mips|SDC2}} || Store Doubleword from Coprocessor 2
 
|-
 
|-
| [[SWC2 - MIPS|SWC2]] || Store Word from Coprocessor 2
+
| {{mips|SWC2}} || Store Word from Coprocessor 2
 
|}
 
|}
  
Line 552: Line 570:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[CFC2 - MIPS|CFC2]] || Move Control Word from Coprocessor 2
+
| {{mips|CFC2}} || Move Control Word from Coprocessor 2
 
|-
 
|-
| [[CTC2 - MIPS|CTC2]] || Move Control Word to Coprocessor 2
+
| {{mips|CTC2}} || Move Control Word to Coprocessor 2
 
|-
 
|-
| [[MFC2 - MIPS|MFC2]] || Move Word from Coprocessor 2
+
| {{mips|MFC2}} || Move Word from Coprocessor 2
 
|-
 
|-
| [[MFHC2 - MIPS|MFHC2]] || Move Word from High Half of Coprocessor 2 Register
+
| {{mips|MFHC2}} || Move Word from High Half of Coprocessor 2 Register
 
|-
 
|-
| [[MTC2 - MIPS|MTC2]] || Move Word to Coprocessor 2
+
| {{mips|MTC2}} || Move Word to Coprocessor 2
 
|-
 
|-
| [[MTHC2 - MIPS|MTHC2]] || Move Word to High Half of Coprocessor 2 Register
+
| {{mips|MTHC2}} || Move Word to High Half of Coprocessor 2 Register
 
|}
 
|}
  
Line 570: Line 588:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[CACHE - MIPS|CACHE]] || Perform Cache Operation
+
| {{mips|CACHE}} || Perform Cache Operation
 
|-
 
|-
| [[CACHEE - MIPS|CACHEE]] || Perform Cache Operation EVA
+
| {{mips|CACHEE}} || Perform Cache Operation EVA
 
|-
 
|-
| [[DI - MIPS|DI]] || Disable Interrupts
+
| {{mips|DI}} || Disable Interrupts
 
|-
 
|-
| [[EI - MIPS|EI]] || Enable Interrupts
+
| {{mips|EI}} || Enable Interrupts
 
|-
 
|-
| [[ERET - MIPS|ERET]] || Exception Return
+
| {{mips|ERET}} || Exception Return
 
|-
 
|-
| [[MFC0 - MIPS|MFC0]] || Move from Coprocessor 0
+
| {{mips|MFC0}} || Move from {{mips|Coprocessor 0}}
 
|-
 
|-
| [[MTC0 - MIPS|MTC0]] || Move to Coprocessor 0
+
| {{mips|MTC0}} || Move to {{mips|Coprocessor 0}}
 
|-
 
|-
| [[RDPGPR - MIPS|RDPGPR]] || Read GPR from Previous Shadow Set
+
| {{mips|RDPGPR}} || Read GPR from Previous Shadow Set
 
|-
 
|-
| [[TLBP - MIPS|TLBP]] || Probe TLB for Matching Entry
+
| {{mips|TLBP}} || Probe TLB for Matching Entry
 
|-
 
|-
| [[TLBR - MIPS|TLBR]] || Read Indexed TLB Entry
+
| {{mips|TLBR}} || Read Indexed TLB Entry
 
|-
 
|-
| [[TLBWI - MIPS|TLBWI]] || Write Indexed TLB Entry
+
| {{mips|TLBWI}} || Write Indexed TLB Entry
 
|-
 
|-
| [[TLBWR - MIPS|TLBWR]] || Write Random TLB Entry
+
| {{mips|TLBWR}} || Write Random TLB Entry
 
|-
 
|-
| [[WAIT - MIPS|WAIT]] || Enter Standby Mode
+
| {{mips|WAIT}} || Enter Standby Mode
 
|-
 
|-
| [[WRPGPR - MIPS|WRPGPR]] || Write GPR to Previous Shadow Set
+
| {{mips|WRPGPR}} || Write GPR to Previous Shadow Set
 
|}
 
|}
  
Line 603: Line 621:
 
! Mnemonic || Description
 
! Mnemonic || Description
 
|-
 
|-
| [[DERET - MIPS|DERET]] ||Debug Exception Return
+
| {{mips|DERET}} ||Debug Exception Return
 
|-
 
|-
| [[SDBBP - MIPS|SDBBP]] || Software Debug Breakpoint
+
| {{mips|SDBBP}} || Software Debug Breakpoint
 
|}
 
|}
  
 +
== References ==
 +
{{reflist|30em}}
  
 
[[Category:Assembly language]]
 
[[Category:Assembly language]]

Latest revision as of 08:24, 9 November 2019

MIPS32
Designer: MIPS Technologies, Inc.
Bits: 32-bits
Introduced: 1999
Version: Revision 5.3
Design: RISC
Type: Register-Register
Encoding: Fixed-length
Branching: Condition Register
Endianness: Bi-endian
Extensions: SPECIAL2, COP2, LWC2, SWC2, LDC2, SDC2
Application-specific
extension:
MIPS16e, MCU, SmartMIPS
Multimedia
extension:
MIPS-3D
Registers
General purpose: 32
Floating point: 32
Special purpose: PRId

The MIPS32 instruction set is an instruction set standard published in 1999 that was promulgated by MIPS Technologies after its demerger from Silicon Graphics in 1998. The MIPS32 instruction set was developed along side the MIPS64 Instruction Set which includes 64-bit instructions. The MIP32 standard included coprocessor 0 control instructions for the first time. Today, the MIP32 instruction set is the most common MIPS instruction set, compatible with most CPUs. Due to its relative simplicity, the MIP32 instruction set is also the most common instruction set taught in computer architecture university courses.

The latest MIPS32 revision is revision 5, which added a set of new memory-efficient operations for large memory footprint applications.

History[edit]

The MIPS32 instruction set architecture was first published in 1999 by MIPS Technologies by it has demerged from Silicon Graphics in 1998. MIPS32 is largely a superset of the MIPS II ISA.

Release 2[edit]

Release 2 was first introduced in revision 1 of the MIPS32 ISA in 2002. Release 2 added 20 new instructions: DI, EHB, EI, EXT, INS, JALR.HB, JR.HB, MFHC1, MFHC2, MTHC1, MTHC2, RDHWR, RDPGPR, ROTR, ROTRV, SEB, SEH, SYNCI, WRPGPR, and WSBH. Release 2 also added support for 64-bit FPUs.

Release 3[edit]

Release 3 was first introduced in revision 3 of the MIPS32 ISA in 2010. The release added the JALX instruction.

Release 4[edit]

Release 4 was skipped because MIPS Technologies was being auctioned off. Officially the reason was given as "Release 4 because the number four is considered by many to be inauspicious or unlucky".[1]

Release 5[edit]

Release 5 was announced in late 2012. The release added a new set of instructions called Enhanced Virtual Addressing (EVA) to allow more efficient use of memory of larger footprint kernels. The following EVA Load/Store instructions were added: LBE, LBUE, LHE, LHUE, LWE, SBE, SHE, SWE, CACHEE, PREFE, LLE, SCE, LWLE, LWRE, SWLE, SWRE.

Instructions list[edit]

Below is a list of the MIPS32 Instruction Set

Arithmetic instructions[edit]

Mnemonic Description
ADD Add Word
ADDI Add Immediate Word
ADDIU Add Immediate Unsigned Word
ADDU Add Unsigned Word
CLO Count Leading Ones in Word
CLZ Count Leading Zeros in Word
DIV Divide Word
DIVU Divide Unsigned Word
MADD Multiply and Add Word to Hi, Lo
MADDU Multiply and Add Unsigned Word to Hi, Lo
MSUB Multiply and Subtract Word to Hi, Lo
MSUBU Multiply and Subtract Unsigned Word to Hi, Lo
MUL Multiply Word to GPR
MULT Multiply Word
MULTU Multiply Unsigned Word
SEB Sign-Extend Byte
SEH Sign-Extend Halfword
SLT Set on Less Than
SLTI Set on Less Than Immediate
SLTIU Set on Less Than Immediate Unsigned
SLTU Set on Less Than Unsigned
SUB Subtract Word
SUBU Subtract Unsigned Word

Branch instructions[edit]

Note that all the likely branches have been obsoleted; they will be removed in future revisions of the MIPS32 architecture. Software is strongly discouraged from using these instructions.

Mnemonic Description
B Unconditional Branch
BAL Branch and Link
BEQ Branch on Equal
BGEZ Branch on Greater Than or Equal to Zero
BGEZAL Branch on Greater Than or Equal to Zero and Link
BGTZ Branch on Greater Than Zero
BLEZ Branch on Less Than or Equal to Zero
BLTZ Branch on Less Than Zero
BLTZAL Branch on Less Than Zero and Link
BNE Branch on Not Equal
BEQL Branch on Equal Likely
BGEZALL Branch on Greater Than or Equal to Zero and Link Likely
BGEZL Branch on Greater Than or Equal to Zero Likely
BGTZL Branch on Greater Than Zero Likely
BLEZL Branch on Less Than or Equal to Zero Likely
BLTZALL Branch on Less Than Zero and Link Likely
BLTZL Branch on Less Than Zero Likely
BNEL Branch on Not Equal Likely

Jump instructions[edit]

Mnemonic Description
J Jump
JAL Jump and Link
JALR Jump and Link Register
JALR.HB Jump and Link Register with Hazard Barrier
JALX Jump and Link Exchange
JR Jump Register
JR.HB Jump Register with Hazard Barrier

Control instructions[edit]

Mnemonic Description
EHB Execution Hazard Barrier
NOP No Operation
PAUSE Wait for LLBit to Clear
SSNOP Superscalar No Operation

Memory control instructions[edit]

Mnemonic Description
LB Load Byte
LBE Load Byte EVA
LBU Load Byte Unsigned
LBUE Load Byte Unsigned EVA
LH Load Halfword
LHE Load Halfword EVA
LHU Load Halfword Unsigned
LHUE Load Halfword Unsigned EVA
LL Load Linked Word
LLE Load Linked Word-EVA
LW Load Word
LWE Load Word EVA
LWL Load Word Left
LWLE Load Word Left EVA
LWR Load Word Right
LWRE Load Word Right EVA
PREF Prefetch
PREFE Prefetch-EVA
SB Store Byte
SBE Store Byte EVA
SC Store Conditional Word
SCE Store Conditional Word EVA
SH Store Halfword
SHE Store Halfword EVA
SW Store Word
SWE Store Word EVA
SWL Store Word Left
SWLE Store Word Left EVA
SWR Store Word Right
SWRE Store Word Right EVA
SYNC Synchronize Shared Memory
SYNCI Synchronize Caches to Make Instruction Writes Effective

Logical instruction[edit]

Mnemonic Description
AND And
ANDI And Immediate
LUI Load Upper Immediate
NOR Not Or
OR Or
ORI Or Immediate
XOR Exclusive Or
XORI Exclusive Or Immediate

Insert/Extract instructions[edit]

Mnemonic Description
EXT Extract Bit Field
INS Insert Bit Field
WSBH Word Swap Bytes Within Halfwords

Move instructions[edit]

Mnemonic Description
MFHI Move From HI Register
MFLO Move From LO Register
MOVF Move Conditional on Floating Point False
MOVN Move Conditional on Not Zero
MOVT Move Conditional on Floating Point True
MOVZ Move Conditional on Zero
MTHI Move To HI Register
MTLO Move To LO Register
RDHWR Read Hardware Register

Shift instructions[edit]

Mnemonic Description
ROTR Rotate Word Right
ROTRV Rotate Word Right Variable
SLL Shift Word Left Logical
SLLV Shift Word Left Logical Variable
SRA Shift Word Right Arithmetic
SRAV Shift Word Right Arithmetic Variable
SRL Shift Word Right Logical
SRLV Shift Word Right Logical Variable

Trap instructions[edit]

Mnemonic Description
BREAK Breakpoint
SYSCALL System Call
TEQ Trap if Equal
TEQI Trap if Equal Immediate
TGE Trap if Greater or Equal
TGEI Trap if Greater of Equal Immediate
TGEIU Trap if Greater or Equal Immediate Unsigned
TGEU Trap if Greater or Equal Unsigned
TLT Trap if Less Than
TLTI Trap if Less Than Immediate
TLTIU Trap if Less Than Immediate Unsigned
TLTU Trap if Less Than Unsigned
TNE Trap if Not Equal
TNEI Trap if Not Equal Immediate


FPU instructions[edit]

Arithmetic instructions[edit]

Mnemonic Description
ABS.fmt Floating Point Absolute Value
ADD.fmt Floating Point Add
DIV.fmt Floating Point Divide
MADD.fmt Floating Point Multiply Add
MSUB.fmt Floating Point Multiply Subtract
MUL.fmt Floating Point Multiply
NEG.fmt Floating Point Negate
NMADD.fmt Floating Point Negative Multiply Add
NMSUB.fmt Floating Point Negative Multiply Subtract
RECIP.fmt Reciprocal Approximation
RSQRT.fmt Reciprocal Square Root Approximation
SQRT.fmt Floating Point Square Root
SUB.fmt Floating Point Subtract


Branch instructions[edit]

Mnemonic Description
BC1F Branch on FP False
BC1T Branch on FP True
BC1FL Branch on FP False Likely
BC1TL Branch on FP True Likely

Compare instructions[edit]

Mnemonic Description
C.cond.fmt Floating Point Compare

Convert instructions[edit]

Mnemonic Description
ALNV.PS Floating Point Align Variable
CEIL.L.fmt Floating Point Ceiling Convert to Long Fixed Point
CEIL.W.fmt Floating Point Ceiling Convert to Word Fixed Point
CVT.D.fmt Floating Point Convert to Double Floating Point
CVT.L.fmt Floating Point Convert to Long Fixed Point
CVT.PS.S Floating Point Convert Pair to Paired Single
CVT.S.PL Floating Point Convert Pair Lower to Single Floating Point
CVT.S.PU Floating Point Convert Pair Upper to Single Floating Point
CVT.S.fmt Floating Point Convert to Single Floating Point
CVT.W.fmt Floating Point Convert to Word Fixed Point
FLOOR.L.fmt Floating Point Floor Convert to Long Fixed Point
FLOOR.W.fmt Floating Point Floor Convert to Word Fixed Point
PLL.PS Pair Lower Lower
PLU.PS Pair Lower Upper
PUL.PS Pair Upper Lower
PUU.PS Pair Upper Upper
ROUND.L.fmt Floating Point Round to Long Fixed Point
ROUND.W.fmt Floating Point Round to Word Fixed Point
TRUNC.L.fmt Floating Point Truncate to Long Fixed Point
TRUNC.W.fmt Floating Point Truncate to Word Fixed Point


Memory control instructions[edit]

Mnemonic Description
LDC1 Load Doubleword to Floating Point
LDXC1 Load Doubleword Indexed to Floating Point
LUXC1 Load Doubleword Indexed Unaligned to Floating Point
LWC1 Load Word to Floating Point
LWXC1 Load Word Indexed to Floating Point
PREFX Prefetch Indexed
SDC1 Store Doubleword from Floating Point
SDXC1 Store Doubleword Indexed from Floating Point
SUXC1 Store Doubleword Indexed Unaligned from Floating Point
SWC1 Store Word from Floating Point
SWXC1 Store Word Indexed from Floating Point


Move instructions[edit]

Mnemonic Description
CFC1 Move Control Word from Floating Point
CTC1 Move Control Word to Floating Point
MFC1 Move Word from Floating Point
MFHC1 Move Word from High Half of Floating Point Register
MOV.fmt Floating Point Move
MOVF.fmt Floating Point Move Conditional on Floating Point False
MOVN.fmt Floating Point Move Conditional on Not Zero
MOVT.fmt Floating Point Move Conditional on Floating Point True
MOVZ.fmt Floating Point Move Conditional on Zero
MTC1 Move Word to Floating Point
MTHC1 Move Word to High Half of Floating Point Register

Coprocessor instructions[edit]

Branch instructions[edit]

Mnemonic Description
BC2F Branch on COP2 False
BC2T Branch on COP2 True
BC2FL Branch on COP2 False Likely
BC2TL Branch on COP2 True Likely


Execute instructions[edit]

Mnemonic Description
COP2 Coprocessor Operation to Coprocessor 2

Memory control instructions[edit]

Mnemonic Description
DC2 Load Doubleword to Coprocessor 2
LWC2 Load Word to Coprocessor 2
SDC2 Store Doubleword from Coprocessor 2
SWC2 Store Word from Coprocessor 2


Move instructions[edit]

Mnemonic Description
CFC2 Move Control Word from Coprocessor 2
CTC2 Move Control Word to Coprocessor 2
MFC2 Move Word from Coprocessor 2
MFHC2 Move Word from High Half of Coprocessor 2 Register
MTC2 Move Word to Coprocessor 2
MTHC2 Move Word to High Half of Coprocessor 2 Register


Privileged instructions[edit]

Mnemonic Description
CACHE Perform Cache Operation
CACHEE Perform Cache Operation EVA
DI Disable Interrupts
EI Enable Interrupts
ERET Exception Return
MFC0 Move from Coprocessor 0
MTC0 Move to Coprocessor 0
RDPGPR Read GPR from Previous Shadow Set
TLBP Probe TLB for Matching Entry
TLBR Read Indexed TLB Entry
TLBWI Write Indexed TLB Entry
TLBWR Write Random TLB Entry
WAIT Enter Standby Mode
WRPGPR Write GPR to Previous Shadow Set

EJTAG instructions[edit]

Mnemonic Description
DERET Debug Exception Return
SDBBP Software Debug Breakpoint

References[edit]