1import logging 
    2 
    3from pyvex.lifting.util.instr_helper import Instruction 
    4from pyvex.lifting.util.lifter_helper import GymratLifter 
    5 
    6log = logging.getLogger(__name__) 
    7 
    8 
    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 
    13 
    14 
    15class Instruction_SYSL(Aarch64Instruction): 
    16    name = "SYSL" 
    17    bin_format = "1101010100101qqqnnnnmmmmppprrrrr" 
    18 
    19    def compute_result(self):  # pylint: disable=arguments-differ 
    20        log.debug("Ignoring SYSL instruction at %#x.", self.addr) 
    21 
    22 
    23class Instruction_MSR(Aarch64Instruction): 
    24    name = "MSR" 
    25    bin_format = "11010101000ioqqqnnnnmmmmppprrrrr" 
    26 
    27    def compute_result(self):  # pylint: disable=arguments-differ 
    28        log.debug("Ignoring MSR instruction at %#x.", self.addr) 
    29 
    30 
    31class Instruction_MRS(Aarch64Instruction): 
    32    name = "MRS" 
    33    bin_format = "110101010011opppnnnnmmmmppprrrrr" 
    34 
    35    def compute_result(self):  # pylint: disable=arguments-differ 
    36        log.debug("Ignoring MRS instruction at %#x.", self.addr) 
    37 
    38 
    39class AARCH64Spotter(GymratLifter): 
    40    instrs = [Instruction_MRS, Instruction_MSR, Instruction_SYSL]