示例#1
0
文件: alu.py 项目: ekareem/SICXE
def compfrm(register: FLOAT, sw: INT, mem: MEMORY, addr, isImmediate=False):
    operand = addr if isImmediate else mem.getfloat(addr)
    cc = SICXE_CC_GT if register > operand else SICXE_CC_LT if register < operand else SICXE_CC_EQ
    sw.setbits(cc, (6, 8), BIG)
示例#2
0
文件: alu.py 项目: ekareem/SICXE
def divfrm(register: FLOAT, mem: MEMORY, addr, isImmediate=False):
    operand = addr if isImmediate else mem.getfloat(addr)
    register.truediv(operand, setSelf=True)