Document Number: MD00086
Revision 2.50
July 1, 2005
MIPS Technologies, Inc.
1225 Charleston Road
Mountain View, CA 94043-1353
Copyright © 2001-2003,2005 MIPS Technologies Inc. All rights reserved.
MIPS32® Architecture For Programmers
Volume II: The MIPS32® Instruction Set
Copyright © 2001-2003,2005 MIPS Technologies, Inc. All rights reserved.
Unpublished rights (if any) reserved under the copyright laws of the United States of America and other countries.
This document contains information that is proprietary to MIPS Technologies, Inc. ("MIPS Technologies"). Any copying,
reproducing, modifying or use of this information (in whole or in part) that is not expressly permitted in writing by MIPS Technologies
or an authorized third party is strictly prohibited. At a minimum, this information is protected under unfair competition and copyright
laws. Violations thereof may result in criminal penalties and fines.
Any document provided in source format (i.e., in a modifiable form such as in FrameMaker or Microsoft Word format) is subject to
use and distribution restrictions that are independent of and supplemental to any and all confidentiality restrictions. UNDER NO
CIRCUMSTANCES MAY A DOCUMENT PROVIDED IN SOURCE FORMAT BE DISTRIBUTED TO A THIRD PARTY IN
SOURCE FORMAT WITHOUT THE EXPRESS WRITTEN PERMISSION OF MIPS TECHNOLOGIES, INC.
MIPS Technologies reserves the right to change the information contained in this document to improve function, design or otherwise.
MIPS Technologies does not assume any liability arising out of the application or use of this information, or of any error or omission
in such information. Any warranties, whether express, statutory, implied or otherwise, including but not limited to the implied
warranties of merchantability or fitness for a particular purpose, are excluded. Except as expressly provided in any written license
agreement from MIPS Technologies or an authorized third party, the furnishing of this document does not give recipient any license
to any intellectual property rights, including any patent rights, that cover the information in this document.
The information contained in this document shall not be exported, reexported, transferred, or released, directly or indirectly, in
violation of the law of any country or international law, regulation, treaty, Executive Order, statute, amendments or supplements
thereto. Should a conflict arise regarding the export, reexport, transfer, or release of the information contained in this document, the
laws of the United States of America shall be the governing law.
The information contained in this document constitutes one or more of the following: commercial computer software, commercial
computer software documentation or other commercial items. If the user of this information, or any related documentation of any
kind, including related technical data or manuals, is an agency, department, or other entity of the United States government
("Government"), the use, duplication, reproduction, release, modification, disclosure, or transfer of this information, or any related
documentation of any kind, is restricted in accordance with Federal Acquisition Regulation 12.212 for civilian agencies and Defense
Federal Acquisition Regulation Supplement 227.7202 for military agencies. The use of this information by the Government is further
restricted in accordance with the terms of the license agreement(s) and/or applicable contract terms and conditions covering this
information from MIPS Technologies or an authorized third party.
MIPS, MIPS I, MIPS II, MIPS III, MIPS IV, MIPS V, MIPS-3D, MIPS16, MIPS16e, MIPS32, MIPS64, MIPS-Based, MIPSsim,
MIPSpro, MIPS Technologies logo, MIPS RISC CERTIFIED POWER logo, 4K, 4Kc, 4Km, 4Kp, 4KE, 4KEc, 4KEm, 4KEp, 4KS,
4KSc, 4KSd, M4K, 5K, 5Kc, 5Kf, 20Kc, 24K, 24Kc, 24Kf, 24KE, 24KEc, 24KEf, 25Kf, 34K, R3000, R4000, R5000, ASMACRO,
Atlas, "At the core of the user experience.", BusBridge, CorExtend, CoreFPGA, CoreLV, EC, FastMIPS, JALGO, Malta, MDMX,
MGB, PDtrace, the Pipeline, Pro Series, QuickMIPS, SEAD, SEAD-2, SmartMIPS, SOC-it, and YAMON are trademarks or
registered trademarks of MIPS Technologies, Inc. in the United States and other countries.
All other trademarks referred to herein are the property of their respective owners.
MIPS32® Architecture For Programmers Volume II, Revision 2.50
Copyright © 2001-2003,2005 MIPS Technologies Inc. All rights reserved.
Template: B1.14, Built with tags: 2B ARCH FPU_PS FPU_PSandARCH MIPS32
MIPS32® Architecture For Programmers Volume II, Revision 2.50 i
Copyright © 2001-2003,2005 MIPS Technologies Inc. All rights reserved.
Table of Contents
Chapter 1 About This Book ................................................................................................................................................. 1
1.1 Typographical Conventions ................................................................................................................................... 1
1.1.1 Italic Text ..................................................................................................................................................... 1
1.1.2 Bold Text ..................................................................................................................................................... 1
1.1.3 Courier Text ................................................................................................................................................. 1
1.2 UNPREDICTABLE and UNDEFINED ................................................................................................................ 2
1.2.1 UNPREDICTABLE ..................................................................................................................................... 2
1.2.2 UNDEFINED ............................................................................................................................................... 2
1.2.3 UNSTABLE ................................................................................................................................................. 2
1.3 Special Symbols in Pseudocode Notation .............................................................................................................. 3
1.4 For More Information ............................................................................................................................................ 5
Chapter 2 Guide to the Instruction Set ................................................................................................................................. 7
2.1 Understanding the Instruction Fields ..................................................................................................................... 7
2.1.1 Instruction Fields ......................................................................................................................................... 8
2.1.2 Instruction Descriptive Name and Mnemonic ............................................................................................. 9
2.1.3 Format Field ................................................................................................................................................. 9
2.1.4 Purpose Field ............................................................................................................................................. 10
2.1.5 Description Field ........................................................................................................................................ 10
2.1.6 Restrictions Field ....................................................................................................................................... 10
2.1.7 Operation Field .......................................................................................................................................... 11
2.1.8 Exceptions Field ......................................................................................................................................... 11
2.1.9 Programming Notes and Implementation Notes Fields ............................................................................. 11
2.2 Operation Section Notation and Functions .......................................................................................................... 12
2.2.1 Instruction Execution Ordering .................................................................................................................. 12
2.2.2 Pseudocode Functions ................................................................................................................................ 12
2.3 Op and Function Subfield Notation ..................................................................................................................... 22
2.4 FPU Instructions .................................................................................................................................................. 22
Chapter 3 The MIPS32® Instruction Set ........................................................................................................................... 23
3.1 Compliance and Subsetting .................................................................................................................................. 23
3.2 Alphabetical List of Instructions .......................................................................................................................... 24
ABS.fmt ....................................................................................................................................................................... 33
ADD............................................................................................................................................................................. 34
ADD.fmt ...................................................................................................................................................................... 35
ADDI............................................................................................................................................................................ 36
ADDIU......................................................................................................................................................................... 37
ADDU .......................................................................................................................................................................... 38
ALNV.PS ..................................................................................................................................................................... 39
AND............................................................................................................................................................................. 42
ANDI............................................................................................................................................................................ 43
B................................................................................................................................................................................... 44
BAL.............................................................................................................................................................................. 45
BC1F............................................................................................................................................................................ 46
BC1FL.......................................................................................................................................................................... 48
BC1T............................................................................................................................................................................ 50
BC1TL ......................................................................................................................................................................... 52
BC2F............................................................................................................................................................................ 54
BC2FL.......................................................................................................................................................................... 55
BC2T............................................................................................................................................................................ 57
BC2TL ......................................................................................................................................................................... 58
ii MIPS32® Architecture For Programmers Volume II, Revision 2.50
Copyright © 2001-2003,2005 MIPS Technologies Inc. All rights reserved.
BEQ.............................................................................................................................................................................. 60
BEQL ........................................................................................................................................................................... 61
BGEZ ........................................................................................................................................................................... 63
BGEZAL...................................................................................................................................................................... 64
BGEZALL ................................................................................................................................................................... 65
BGEZL......................................................................................................................................................................... 67
BGTZ ........................................................................................................................................................................... 69
BGTZL......................................................................................................................................................................... 70
BLEZ............................................................................................................................................................................ 72
BLEZL ......................................................................................................................................................................... 73
BLTZ............................................................................................................................................................................ 75
BLTZAL ...................................................................................................................................................................... 76
BLTZALL.................................................................................................................................................................... 77
BLTZL ......................................................................................................................................................................... 79
BNE.............................................................................................................................................................................. 81
BNEL ........................................................................................................................................................................... 82
BREAK ........................................................................................................................................................................ 84
C.cond.fmt.................................................................................................................................................................... 85
CACHE ........................................................................................................................................................................ 90
CEIL.L.fmt................................................................................................................................................................... 97
CEIL.W.fmt ................................................................................................................................................................. 99
CFC1.......................................................................................................................................................................... 100
CFC2.......................................................................................................................................................................... 102
CLO............................................................................................................................................................................ 103
CLZ ............................................................................................................................................................................ 104
COP2.......................................................................................................................................................................... 105
CTC1.......................................................................................................................................................................... 106
CTC2.......................................................................................................................................................................... 108
CVT.D.fmt ................................................................................................................................................................. 109
CVT.L.fmt.................................................................................................................................................................. 110
CVT.PS.S................................................................................................................................................................... 112
CVT.S.fmt.................................................................................................................................................................. 114
CVT.S.PL................................................................................................................................................................... 115
CVT.S.PU .................................................................................................................................................................. 116
CVT.W.fmt ................................................................................................................................................................ 117
DERET....................................................................................................................................................................... 118
DI ............................................................................................................................................................................... 120
DIV............................................................................................................................................................................. 122
DIV.fmt...................................................................................................................................................................... 124
DIVU.......................................................................................................................................................................... 125
EHB............................................................................................................................................................................ 126
EI................................................................................................................................................................................ 127
ERET.......................................................................................................................................................................... 129
EXT............................................................................................................................................................................ 131
FLOOR.L.fmt............................................................................................................................................................. 133
FLOOR.W.fmt ........................................................................................................................................................... 135
INS ............................................................................................................................................................................. 136
J .................................................................................................................................................................................. 138
JAL............................................................................................................................................................................. 139
JALR .......................................................................................................................................................................... 140
JALR.HB.................................................................................................................................................................... 142
JR ............................................................................................................................................................................... 145
JR.HB......................................................................................................................................................................... 147
LB............................................................................................................................................................................... 150
LBU............................................................................................................................................................................ 151
MIPS32® Architecture For Programmers Volume II, Revision 2.50 iii
Copyright © 2001-2003,2005 MIPS Technologies Inc. All rights reserved.
LDC1.......................................................................................................................................................................... 152
LDC2.......................................................................................................................................................................... 153
LDXC1....................................................................................................................................................................... 154
LH .............................................................................................................................................................................. 155
LHU ........................................................................................................................................................................... 156
LL............................................................................................................................................................................... 157
LUI............................................................................................................................................................................. 159
LUXC1....................................................................................................................................................................... 160
LW ............................................................................................................................................................................. 161
LWC1......................................................................................................................................................................... 162
LWC2......................................................................................................................................................................... 163
LWL........................................................................................................................................................................... 164
LWR........................................................................................................................................................................... 167
LWXC1...................................................................................................................................................................... 171
MADD ....................................................................................................................................................................... 172
MADD.fmt................................................................................................................................................................. 173
MADDU..................................................................................................................................................................... 175
MFC0 ......................................................................................................................................................................... 176
MFC1 ......................................................................................................................................................................... 177
MFC2 ......................................................................................................................................................................... 178
MFHC1 ...................................................................................................................................................................... 179
MFHC2 ...................................................................................................................................................................... 180
MFHI.......................................................................................................................................................................... 181
MFLO......................................................................................................................................................................... 182
MOV.fmt.................................................................................................................................................................... 183
MOVF ........................................................................................................................................................................ 184
MOVF.fmt.................................................................................................................................................................. 185
MOVN ....................................................................................................................................................................... 187
MOVN.fmt................................................................................................................................................................. 188
MOVT........................................................................................................................................................................ 190
MOVT.fmt ................................................................................................................................................................. 191
MOVZ........................................................................................................................................................................ 193
MOVZ.fmt ................................................................................................................................................................. 194
MSUB ........................................................................................................................................................................ 196
MSUB.fmt.................................................................................................................................................................. 197
MSUBU ..................................................................................................................................................................... 199
MTC0......................................................................................................................................................................... 200
MTC1......................................................................................................................................................................... 201
MTC2......................................................................................................................................................................... 202
MTHC1 ...................................................................................................................................................................... 203
MTHC2 ...................................................................................................................................................................... 204
MTHI ......................................................................................................................................................................... 205
MTLO ........................................................................................................................................................................ 206
MUL........................................................................................................................................................................... 207
MUL.fmt .................................................................................................................................................................... 208
MULT ........................................................................................................................................................................ 209
MULTU ..................................................................................................................................................................... 210
NEG.fmt..................................................................................................................................................................... 211
NMADD.fmt.............................................................................................................................................................. 212
NMSUB.fmt............................................................................................................................................................... 214
NOP............................................................................................................................................................................ 216
NOR ........................................................................................................................................................................... 217
OR .............................................................................................................................................................................. 218
ORI............................................................................................................................................................................. 219
PLL.PS....................................................................................................................................................................... 220
- 1
- 2
前往页