edu.ustc.cs.compile.arch.mips
类 MIPSOpcode

java.lang.Object
  继承者 edu.ustc.cs.compile.arch.mips.MIPSOpcode
所有已实现的接口:
Opcode

public class MIPSOpcode
extends java.lang.Object
implements Opcode

Provides a representation of opcodes in a simple MIPS assembly language that can run in SPIM(a simulator of MIPS R2000/R3000).

Following is a list of opcodes and their representation in this class(which could be used in the form of MIPSOpcode.XXX):
nop NOP
syscall SYSCALL
j J
jal JAL
b B
move MOVE
la LA
li LI
lw LW
sw SW
abs ABS
neg NEG
add ADD
sub SUB
mulo MULO
div DIV
rem REM
rol ROL
ror ROR
sll SLL
sra SRA
srl SRL
and AND
or OR
xor XOR
nor NOR
not NOT
slt SLT
seq SEQ
sge SGE
sgt SGT
sle SLE
sne SNE
blt BLT
beq BEQ
bge BGE
bgt BGT
ble BLE
bne BNE
To represent instruct "nop" (whose opcode is NOP), the following codes are used:
Instruct inst = new Instruct(MIPSOpcode.NOP, null);


字段摘要
static MIPSOpcode ABS
          Opcode "abs"
static MIPSOpcode ADD
          Opcode "add"
static MIPSOpcode AND
          Opcode "and"
static MIPSOpcode B
          Opcode "b"
static MIPSOpcode BEQ
          Opcode "beq"
static MIPSOpcode BGE
          Opcode "bge"
static MIPSOpcode BGT
          Opcode "bgt"
static MIPSOpcode BLE
          Opcode "ble"
static MIPSOpcode BLT
          Opcode "blt"
static MIPSOpcode BNE
          Opcode "bne"
static MIPSOpcode DIV
          Opcode "div"
static MIPSOpcode J
          Opcode "j"
static MIPSOpcode JAL
          Opcode "jal"
static MIPSOpcode LA
          Opcode "la"
static MIPSOpcode LI
          Opcode "li"
static MIPSOpcode LW
          Opcode "lw"
static MIPSOpcode MOVE
          Opcode "move"
static MIPSOpcode MULO
          Opcode "mulo"
static MIPSOpcode NEG
          Opcode "neg"
static MIPSOpcode NOP
          Opcode "nop"
static MIPSOpcode NOR
          Opcode "nor"
static MIPSOpcode NOT
          Opcode "not"
static MIPSOpcode OR
          Opcode "or"
static MIPSOpcode REM
          Opcode "rem"
static MIPSOpcode ROL
          Opcode "rol"
static MIPSOpcode ROR
          Opcode "ror"
static MIPSOpcode SEQ
          Opcode "seq"
static MIPSOpcode SGE
          Opcode "sge"
static MIPSOpcode SGT
          Opcode "sgt"
static MIPSOpcode SLE
          Opcode "sle"
static MIPSOpcode SLL
          Opcode "sll"
static MIPSOpcode SLT
          Opcode "slt"
static MIPSOpcode SNE
          Opcode "sne"
static MIPSOpcode SRA
          Opcode "sra"
static MIPSOpcode SRL
          Opcode "srl"
static MIPSOpcode SUB
          Opcode "sub"
static MIPSOpcode SW
          Opcode "sw"
static MIPSOpcode SYSCALL
          Opcode "syscall"
static MIPSOpcode XOR
          Opcode "xor"
 
构造函数摘要
MIPSOpcode()
           
 
方法摘要
 java.lang.String toString()
          Returns a string representation of this MIPS opcode.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

NOP

public static final MIPSOpcode NOP
Opcode "nop"


SYSCALL

public static final MIPSOpcode SYSCALL
Opcode "syscall"


J

public static final MIPSOpcode J
Opcode "j"


JAL

public static final MIPSOpcode JAL
Opcode "jal"


B

public static final MIPSOpcode B
Opcode "b"


MOVE

public static final MIPSOpcode MOVE
Opcode "move"


LA

public static final MIPSOpcode LA
Opcode "la"


LI

public static final MIPSOpcode LI
Opcode "li"


LW

public static final MIPSOpcode LW
Opcode "lw"


SW

public static final MIPSOpcode SW
Opcode "sw"


ABS

public static final MIPSOpcode ABS
Opcode "abs"


NEG

public static final MIPSOpcode NEG
Opcode "neg"


ADD

public static final MIPSOpcode ADD
Opcode "add"


SUB

public static final MIPSOpcode SUB
Opcode "sub"


MULO

public static final MIPSOpcode MULO
Opcode "mulo"


DIV

public static final MIPSOpcode DIV
Opcode "div"


REM

public static final MIPSOpcode REM
Opcode "rem"


ROL

public static final MIPSOpcode ROL
Opcode "rol"


ROR

public static final MIPSOpcode ROR
Opcode "ror"


SLL

public static final MIPSOpcode SLL
Opcode "sll"


SRA

public static final MIPSOpcode SRA
Opcode "sra"


SRL

public static final MIPSOpcode SRL
Opcode "srl"


AND

public static final MIPSOpcode AND
Opcode "and"


OR

public static final MIPSOpcode OR
Opcode "or"


XOR

public static final MIPSOpcode XOR
Opcode "xor"


NOR

public static final MIPSOpcode NOR
Opcode "nor"


NOT

public static final MIPSOpcode NOT
Opcode "not"


SLT

public static final MIPSOpcode SLT
Opcode "slt"


SEQ

public static final MIPSOpcode SEQ
Opcode "seq"


SGE

public static final MIPSOpcode SGE
Opcode "sge"


SGT

public static final MIPSOpcode SGT
Opcode "sgt"


SLE

public static final MIPSOpcode SLE
Opcode "sle"


SNE

public static final MIPSOpcode SNE
Opcode "sne"


BEQ

public static final MIPSOpcode BEQ
Opcode "beq"


BGE

public static final MIPSOpcode BGE
Opcode "bge"


BGT

public static final MIPSOpcode BGT
Opcode "bgt"


BLE

public static final MIPSOpcode BLE
Opcode "ble"


BLT

public static final MIPSOpcode BLT
Opcode "blt"


BNE

public static final MIPSOpcode BNE
Opcode "bne"

构造函数详细信息

MIPSOpcode

public MIPSOpcode()
方法详细信息

toString

public java.lang.String toString()
Returns a string representation of this MIPS opcode.

指定者:
接口 Opcode 中的 toString
覆盖:
java.lang.Object 中的 toString
返回:
a string representation of this MIPS opcode.