示例#1
0
def jal(dest):
    return pips.iformat(opcode='j', link=True, r0='$ra', r1='$zero', imm=dest)
示例#2
0
def xori(dest, op1, immediate):
    return pips.iformat(opcode='xor', r0=dest, r1=op1, imm=immediate)
示例#3
0
def jump_link(label):
    return pips.iformat(opcode='j', r0='$ra', r1='$zero', imm=label, link=True)
示例#4
0
def jal(immediate):
    return pips.iformat(opcode='j',
                        r0='$ra',
                        r1='$zero',
                        imm=immediate,
                        link=True)
示例#5
0
def sb(operand1, immediate, operand2):
    return pips.iformat(opcode='sb', r0=operand1, r1=operand2, imm=immediate)
示例#6
0
def lw(dest, immediate):
    return pips.iformat(opcode='lw', r0=dest, r1=immediate, imm=immediate)
示例#7
0
def nori(dest, operand1, immediate):
    return pips.iformat(opcode='nor', r0=dest, r1=operand1, imm=immediate)
示例#8
0
def bne(op1, op2, dest):
    return pips.iformat(opcode='bne', r0=op1, r1=op2, imm=dest)
示例#9
0
def lb(dest, immediate, op1):
    return pips.iformat(opcode='lb', r0=dest, r1=op1, imm=immediate)
示例#10
0
def store_word(read, offset, addr):
    return pips.iformat(opcode='sw', r0=read, r1=addr, imm=offset)
示例#11
0
def store_byte(read, offset, addr):
    return pips.iformat(opcode='sb', r0=read, r1=addr, imm=offset)
示例#12
0
def load_byte(write, offset, addr):
    return pips.iformat(opcode='lb', r0=write, r1=addr, imm=offset)
示例#13
0
def load_word(write, offset, addr):
    return pips.iformat(opcode='lw', r0=write, r1=addr, imm=offset)
示例#14
0
def bne(op1, op2, label):
    return pips.iformat(opcode='bne', r0=op1, r1=op2, imm=label)
示例#15
0
def beq(operand1, operand2, dest):
    return pips.iformat(opcode='bne', r0=operand1, r1=operand2, imm=dest)
示例#16
0
def sw(dest, immediate, op1):
    return pips.iformat(opcode='sw', r0=dest, r1=op1, imm=immediate)
示例#17
0
def lb(dest, immediate):
    return pips.iformat(opcode='lb', r0=dest, r1='$sp', imm=immediate)
示例#18
0
def sb(dest, immediate, operand1):
    return pips.iformat(opcode='sb', r0=dest, r1=operand1, imm=immediate)
示例#19
0
def andi(dest, operand1, immediate):
    return pips.iformat(opcode='and', r0=dest, r1=operand1, imm=immediate)
示例#20
0
def not_instr(dest, op1):
    return pips.iformat(opcode='xor', r0=dest, r1=op1, imm=65535)
示例#21
0
def j(immediate):
    return pips.iformat(opcode='j', r0='$zero', r1='$zero', imm=immediate)
示例#22
0
def nop():
    return pips.iformat(opcode='add', r0='$zero', r1='$zero', imm=0)
示例#23
0
def beq(operand1, operand2, immediate):
    return pips.iformat(opcode='bne', r0=operand1, r1=operand2, imm=immediate)
示例#24
0
def sltui(dest, operand1, immediate):
    return pips.iformat(opcode='sltu', r0=dest, r1=operand1, imm=immediate)
示例#25
0
def nandi(dest, op1, immediate):
    return pips.iformat(opcode='nand', r0=dest, r1=op1, imm=immediate)
示例#26
0
def j(dest):
    return pips.iformat(opcode='j', r0='$zero', r1='$zero', imm=dest)
示例#27
0
def slti(dest, op1, immediate):
    return pips.iformat(opcode='slt', r0=dest, r1=op1, imm=immediate)
示例#28
0
def jump(label):
    return pips.iformat(opcode='j', r0='$zero', r1='$zero', imm=label)