reprospect.testing.binaries.sass.instruction.validate module

class reprospect.testing.binaries.sass.instruction.validate.ModifierValidator(matcher: InstructionMatcher, modifier: str, index: int | None = None)View on GitHub

Bases: InstructionMatcher

If index is an integer, the modifier must be present at that specific position in the matched instruction modifiers. If index is None, the modifier may be at any position in the matched instruction modifiers.

Note

It is not decorated with dataclasses.dataclass() because of https://github.com/mypyc/mypyc/issues/1061.

__init__(matcher: InstructionMatcher, modifier: str, index: int | None = None) NoneView on GitHub
index: Final[int | None]
match(inst: Instruction | str) InstructionMatch | NoneView on GitHub
matcher: Final[InstructionMatcher]
modifier: Final[str]
class reprospect.testing.binaries.sass.instruction.validate.OperandValidator(matcher: InstructionMatcher, operand: str | AddressMatcher | ConstantMatcher | RegisterMatcher, index: int | None = None)View on GitHub

Bases: InstructionMatcher

Validate that the operand at index matches the instruction matched with matcher.

Note

It is not decorated with dataclasses.dataclass() because of https://github.com/mypyc/mypyc/issues/1061.

__init__(matcher: InstructionMatcher, operand: str | AddressMatcher | ConstantMatcher | RegisterMatcher, index: int | None = None) NoneView on GitHub
check(operand: str) boolView on GitHub
index: Final[int | None]
match(inst: Instruction | str) InstructionMatch | NoneView on GitHub
matcher: Final[InstructionMatcher]
operand: Final[str | AddressMatcher | ConstantMatcher | RegisterMatcher]
class reprospect.testing.binaries.sass.instruction.validate.OperandsValidator(matcher: InstructionMatcher, operands: Collection[tuple[int, str | AddressMatcher | ConstantMatcher | RegisterMatcher]])View on GitHub

Bases: InstructionMatcher

Validate that the operands match the instruction matched with matcher.

Note

It is not decorated with dataclasses.dataclass() because of https://github.com/mypyc/mypyc/issues/1061.

__init__(matcher: InstructionMatcher, operands: Collection[tuple[int, str | AddressMatcher | ConstantMatcher | RegisterMatcher]]) NoneView on GitHub
match(inst: Instruction | str) InstructionMatch | NoneView on GitHub
matcher: Final[InstructionMatcher]
operands: Final[tuple[tuple[int, str | AddressMatcher | ConstantMatcher | RegisterMatcher], ...]]