reprospect.test.sass.instruction.integer module
Collection of integer instruction matchers.
- class reprospect.test.sass.instruction.integer.IntAdd3Matcher(*, arch: NVIDIAArch, src_a: str = 'R[0-9]+', src_b: str = 'R[0-9]+', src_c: str = 'R(?:Z|\\d+)', dst: str = 'R[0-9]+')View on GitHub
Bases:
OpcodeModsWithOperandsMatcherMatcher for three 32-bit integer addition (
IADD3).IADD3is architecture-dependent. Prior toreprospect.tools.architecture.NVIDIAFamily.BLACKWELL, it is:IADD3 R7, R2, R7, RZ
and as of
reprospect.tools.architecture.NVIDIAFamily.BLACKWELL:IADD3 R17, PT, PT, R14, R11, R8
- __init__(*, arch: NVIDIAArch, src_a: str = 'R[0-9]+', src_b: str = 'R[0-9]+', src_c: str = 'R(?:Z|\\d+)', dst: str = 'R[0-9]+') NoneView on GitHub
- class reprospect.test.sass.instruction.integer.IntAddMatcher(*, src_a: str = 'R[0-9]+', src_b: str = 'R[0-9]+', dst: str = 'R[0-9]+')View on GitHub
Bases:
OpcodeModsWithOperandsMatcherMatcher for two 32-bit integer addition (
IADD), such as:IADD R14, R8, R11
- class reprospect.test.sass.instruction.integer.LEAMatcher(*, dest: str | None = None, index: str | None = None, base: str | None = None, shift: str | None = None)View on GitHub
Bases:
PatternMatcherMatcher for
LEAinstruction, such as:LEA R24, R4, R10, 0x3
Note
LEAtypically computes an integer linear expression of the form:dst = base + (index << s)
where s is a shift encoded in the instruction. Therefore, it may act as a compact shift-then-add primitive.
References:
- PATTERN: Final[Pattern[str]] = regex.Regex('(?P<opcode>LEA)\\s*(?P<operands>R[0-9]+),?\\s*(?P<operands>R[0-9]+),?\\s*(?P<operands>R[0-9]+),?\\s*(?P<operands>(?P<shift>0x[0-9]+))', flags=regex.V0)