def decode_movff(obj,fd,fs): if fs>>8==0xf: src = env.getreg(0,fs&0xff) else: src = env.mem(env.cst(fs,12),8) if fd>>8==0xf: dst = env.getreg(0,fd&0xff) else: dst = env.mem(env.cst(fd,12),8) if dst in (env.pcl, env.tosu, env.tosh, env.tosl): raise InstructionError(obj) obj.src = check_virtual(obj,src) obj.dst = check_virtual(obj,dst) obj.operands = [src,dst] obj.type = type_data_processing
def literal(obj,kh,f,kl): if f==3: raise InstructionError(obj) dst = (env.fsr0,env.fsr1,env.fsr2)[f] src = env.cst(((kh<<8) + kl),12) obj.dst = dst obj.src = src obj.operands = [dst,src] obj.type = type_data_processing
def literal(obj, k): obj.imm = env.cst(k, 4) obj.operands = [obj.imm] obj.type = type_data_processing
def control(obj, k): obj.imm = env.cst(k, 8) obj.operands = [obj.imm] obj.type = type_control_flow
def control(obj, kh, kl): obj.imm = env.cst(((kh << 8) + kl) << 1, 21) obj.operands = [obj.imm] obj.type = type_control_flow
def control(obj, kh, s, kl): obj.offset = env.cst(((kh << 8) + kl) << 1, 21) obj.misc["fast"] = s == 1 obj.operands = [obj.offset] obj.type = type_control_flow
def control_rel(obj, n): obj.offset = env.cst(n, 8) obj.offset.sf = True obj.operands = [obj.offset] obj.type = type_control_flow