Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/pyvex/lifting/gym/aarch64_spotter.py: 100%
23 statements
« prev ^ index » next coverage.py v7.3.1, created at 2023-09-25 06:15 +0000
« prev ^ index » next coverage.py v7.3.1, created at 2023-09-25 06:15 +0000
1import logging
3from pyvex.lifting.util.instr_helper import Instruction
4from pyvex.lifting.util.lifter_helper import GymratLifter
6log = logging.getLogger(__name__)
9class Aarch64Instruction(Instruction): # pylint: disable=abstract-method
10 # NOTE: WARNING: There is no MRS, MSR, SYSL in VEX's ARM implementation
11 # You must use straight nasty hacks instead.
12 pass
15class Instruction_SYSL(Aarch64Instruction):
16 name = "SYSL"
17 bin_format = "1101010100101qqqnnnnmmmmppprrrrr"
19 def compute_result(self): # pylint: disable=arguments-differ
20 log.debug("Ignoring SYSL instruction at %#x.", self.addr)
23class Instruction_MSR(Aarch64Instruction):
24 name = "MSR"
25 bin_format = "11010101000ioqqqnnnnmmmmppprrrrr"
27 def compute_result(self): # pylint: disable=arguments-differ
28 log.debug("Ignoring MSR instruction at %#x.", self.addr)
31class Instruction_MRS(Aarch64Instruction):
32 name = "MRS"
33 bin_format = "110101010011opppnnnnmmmmppprrrrr"
35 def compute_result(self): # pylint: disable=arguments-differ
36 log.debug("Ignoring MRS instruction at %#x.", self.addr)
39class AARCH64Spotter(GymratLifter):
40 instrs = [Instruction_MRS, Instruction_MSR, Instruction_SYSL]