def test_execute_fix16(rn, ex): state = new_state(rf1=float2bits(7.2), rf2=float2bits(0.0), rf3=float2bits(-1.5), rf4=float2bits(float('nan')), rf5=0, rf6=-1, rf7=1) instr = opcode_factory.fix16(rd=0, rn=rn) name, executefn = decode(instr) executefn(state, Instruction(instr, None)) ex.check(state)
('bcond16', opcode_factory.bcond16(condition=0b1111, imm=0)), ('ldstrpmd32', opcode_factory.ldstrpmd32(rd=1, rn=0, sub=1, imm=0b1010101010, bb=0b11, s=1)), ('ldstrdisp16', opcode_factory.ldstrdisp16(rd=1, rn=0, imm=0b010, bb=0b11, s=1)), ('ldstrdisp32', opcode_factory.ldstrdisp32(rd=1, rn=0, sub=1, imm=0b1010101010, bb=0b11, s=1)), ('ldstrpm16', opcode_factory.ldstrpm16(rd=1, rn=0, rm=0, bb=0b11, s=1)), ('ldstrpm32', opcode_factory.ldstrpm32(rd=1, rn=0, rm=0, sub=1, bb=0b11, s=1)), ('ldstrind16', opcode_factory.ldstrind16(rd=1, rn=0, rm=0, bb=0b11, s=1)), ('ldstrind32', opcode_factory.ldstrind32(rd=1, rn=0, rm=0, sub=1, bb=0b11, s=1)), ('testset32', opcode_factory.testset32(rd=1, rn=0, rm=0, sub=1, bb=0b11)), ('fadd16', opcode_factory.fadd16(rd=1, rn=0, rm=0)), ('fsub16', opcode_factory.fsub16(rd=1, rn=0, rm=0)), ('fmul16', opcode_factory.fmul16(rd=1, rn=0, rm=0)), ('fmadd16', opcode_factory.fmadd16(rd=1, rn=0, rm=0)), ('fmsub16', opcode_factory.fmsub16(rd=1, rn=0, rm=0)), ('float16', opcode_factory.float16(rd=1, rn=0, rm=0)), ('fix16', opcode_factory.fix16(rd=1, rn=0, rm=0)), ('fabs16', opcode_factory.fabs16(rd=1, rn=0, rm=0)), ('fadd32', opcode_factory.fadd32(rd=1, rn=0, rm=0)), ('fsub32', opcode_factory.fsub32(rd=1, rn=0, rm=0)), ('fmul32', opcode_factory.fmul32(rd=1, rn=0, rm=0)), ('fmadd32', opcode_factory.fmadd32(rd=1, rn=0, rm=0)), ('fmsub32', opcode_factory.fmsub32(rd=1, rn=0, rm=0)), ('float32', opcode_factory.float32(rd=1, rn=0, rm=0)), ('fix32', opcode_factory.fix32(rd=1, rn=0, rm=0)), ('fabs32', opcode_factory.fabs32(rd=1, rn=0, rm=0)), ('movcond32', opcode_factory.movcond32(condition=0b0000, rd=0, rn=0)), ('movcond16', opcode_factory.movcond16(condition=0b0000, rd=0, rn=0)), ('movtimm32', opcode_factory.movtimm32(rd=0b1111, imm=0)), ('movimm32', opcode_factory.movimm32(rd=0b1111, imm=0)), ('movimm16', opcode_factory.movimm16(rd=0b1111, imm=0)), ('movfs32', opcode_factory.movfs32(rn=0b110, rd='IRET')),