reprospect.test.sass.instruction.load module

class reprospect.test.sass.instruction.load.LoadConstantMatcher(*, uniform: bool | None = None, size: int | None = None)View on GitHub

Bases: PatternMatcher

Matcher for constant load (LDC) instructions, such as:

LDC.64 R2, c[0x0][0x388]
LDC R4, c[0x3][R0]
LDCU UR4, c[0x3][UR0]
CONSTANT: Final[str] = '(?P<operands>(?:(?:!|\\-\\||\\-|\\~|\\|))?c\\[(?P<bank>0x[0-9]+)\\]\\[(?P<offset>(?:0x[0-9A-Fa-f]+|R(?:Z|\\d+)|UR[0-9]+))\\])'
TEMPLATE: Final[str] = '{opcode} {dest}, (?P<operands>(?:(?:!|\\-\\||\\-|\\~|\\|))?c\\[(?P<bank>0x[0-9]+)\\]\\[(?P<offset>(?:0x[0-9A-Fa-f]+|R(?:Z|\\d+)|UR[0-9]+))\\])'
__init__(*, uniform: bool | None = None, size: int | None = None) NoneView on GitHub
Parameters:
  • size – Optional bit size (e.g., 32, 64, 128).

  • uniform – Optionally require uniformness.

pattern: Final[regex.Pattern[str]]
class reprospect.test.sass.instruction.load.LoadGlobalMatcher(arch: NVIDIAArch, *, size: int | None = None, readonly: bool | None = None, extend: ExtendBitsMethod | str | None = None)View on GitHub

Bases: LoadMatcher

Specialization of LoadMatcher for global memory (LDG).

__init__(arch: NVIDIAArch, *, size: int | None = None, readonly: bool | None = None, extend: ExtendBitsMethod | str | None = None) NoneView on GitHub
cache: str | ZeroOrOne | None
mop: Final[MemoryOp]
class reprospect.test.sass.instruction.load.LoadMatcher(arch: NVIDIAArch, *, size: int | None = None, readonly: bool | None = None, memory: MemorySpace | str = MemorySpace.GLOBAL, extend: ExtendBitsMethod | str | None = None)View on GitHub

Bases: ArchitectureAwarePatternMatcher

Architecture-dependent matcher for load instructions, such as:

LDG.E R2, desc[UR6][R2.64]
LD.E.64 R2, R4.64

Starting from BLACKWELL, 256-bit load instructions are available, such as:

LDG.E.ENL2.256.CONSTANT R12, R8, desc[UR4][R2.64]

References:

TEMPLATE: Final[str] = '{opcode} (?P<operands>R[0-9]+), {address}'
TEMPLATE_256: Final[str] = '{opcode} (?P<operands>R[0-9]+), (?P<operands>R[0-9]+), {address}'
__init__(arch: NVIDIAArch, *, size: int | None = None, readonly: bool | None = None, memory: MemorySpace | str = MemorySpace.GLOBAL, extend: ExtendBitsMethod | str | None = None) NoneView on GitHub
Parameters:
  • size – Optional bit size (e.g., 32, 64, 128).

  • readonly – Whether to append .CONSTANT modifier. If None, the modifier is matched optionally.

cache: str | ZeroOrOne | None
mop: Final[MemoryOp]