1
0
mirror of https://github.com/angr/pyvex synced 2026-06-21 13:47:01 +00:00
Files
Audrey Dutcher 0f32e9dbb7 Remove archinfo dependency (#308)
* plugins 2: no more plugins

* homebrew arches

* lint

* I think this is related to thumb mode?

* Remove archinfo from tests

* Remove archinfo from setup.cfg

* Fix fuzzing

* Fix ARM32 -> ARM

* Fix missing closing brace in PyvexArch.__repr__

* Get register offsets directly from vex_ffi

* Fix test cases failures related to little endian instructions

* Resore riscv64le

* Also in __init__.py

* Add subregister map

* Fix another test

* Don't treat rMSR r value as a vex offset, treat it as a register

* Fix remaining failing test cases

* Add some backwards compatibility for register indicies

* Revert _lookup_register to original behaviour

* Fix arch name

* Fix registers with vex_name

* Fix LDM instruction using register numbers

---------

Co-authored-by: Kevin Phoenix <kevin@kphoenix.us>
2023-12-01 17:16:52 -07:00

31 lines
883 B
Python

# pylint: disable=missing-class-docstring
import unittest
import pyvex
class Tests(unittest.TestCase):
def test_x86_aam(self):
irsb = pyvex.lift(b"\xd4\x0b", 0, pyvex.ARCH_X86)
self.assertEqual(irsb.jumpkind, "Ijk_Boring")
self.assertEqual(irsb.size, 2)
def test_x86_aad(self):
irsb = pyvex.lift(b"\xd5\x0b", 0, pyvex.ARCH_X86)
self.assertEqual(irsb.jumpkind, "Ijk_Boring")
self.assertEqual(irsb.size, 2)
def test_x86_xgetbv(self):
irsb = pyvex.lift(b"\x0f\x01\xd0", 0, pyvex.ARCH_X86)
self.assertEqual(irsb.jumpkind, "Ijk_Boring")
self.assertEqual(irsb.size, 3)
def test_x86_rdmsr(self):
irsb = pyvex.lift(b"\x0f\x32", 0, pyvex.ARCH_X86)
self.assertEqual(irsb.jumpkind, "Ijk_Boring")
self.assertEqual(irsb.size, 2)
if __name__ == "__main__":
unittest.main()