def test_xmm_on_x86(self): """Check xmm on 32 bits arch.""" setArchitecture(ARCH.X86) xmm = Register(REG.XMM1, 0x112233445566778899aabbccddeeff00) self.assertEqual(xmm.getBitSize(), 128) self.assertEqual(xmm.getConcreteValue(), 0x112233445566778899aabbccddeeff00)
def test_ymm(self): """Check ymm on 64 bits arch.""" ymm = Register(REG.YMM1, 0x112233445566778899aabbccddeeff00) self.assertEqual(ymm.getBitSize(), 256) ymm.setConcreteValue( 0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00) self.assertEqual( ymm.getConcreteValue(), 0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00)
def test_zmm(self): """Check zmm on 64 bits arch.""" zmm = Register(REG.ZMM2, 0) self.assertEqual(zmm.getBitSize(), 512) zmm.setConcreteValue( 0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00 ) self.assertEqual( zmm.getConcreteValue(), 0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00 )
def test_concrete_value(self): """Check concrete value modification.""" self.assertEqual(self.reg.getConcreteValue(), 0) # immutable self.reg.setConcreteValue(0x1122334455667788) self.assertEqual(self.reg.getConcreteValue(), 0) # mutable reg2 = Register(self.reg) reg2.setConcreteValue(0x1122334455667788) self.assertEqual(reg2.getConcreteValue(), 0x1122334455667788)
def test_zmm(self): """Check zmm on 64 bits arch.""" zmm = Register(REG.ZMM2, 0) self.assertEqual(zmm.getBitSize(), 512) zmm.setConcreteValue(0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00) self.assertEqual(zmm.getConcreteValue(), 0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00)
def test_ymm(self): """Check ymm on 64 bits arch.""" ymm = Register(REG.YMM1, 0x112233445566778899aabbccddeeff00) self.assertEqual(ymm.getBitSize(), 256) ymm.setConcreteValue(0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00) self.assertEqual(ymm.getConcreteValue(), 0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00)