Ops
ops
¶
ARMAsmOperation
dataclass
¶
Bases: IRDLOperation, OneLineAssemblyPrintable, ABC
Base class for operations that can be a part of ARM assembly printing.
Source code in xdsl/dialects/arm/ops.py
ARMInstruction
dataclass
¶
Bases: ARMAsmOperation, ABC
Base class for operations that can be a part of x86 assembly printing. Must represent an instruction in the x86 instruction set. The name of the operation will be used as the x86 assembly instruction name.
Source code in xdsl/dialects/arm/ops.py
comment = opt_attr_def(StringAttr)
class-attribute
instance-attribute
¶
An optional comment that will be printed along with the instruction.
assembly_line_args() -> tuple[str | None, ...]
abstractmethod
¶
The arguments to the instruction, in the order they should be printed in the assembly.
assembly_instruction_name() -> str
¶
By default, the name of the instruction is the same as the name of the operation.
assembly_line() -> str | None
¶
Source code in xdsl/dialects/arm/ops.py
DSMovOp
¶
Bases: ARMInstruction
Copies the value of s into d.
See external documentation.
Source code in xdsl/dialects/arm/ops.py
name = 'arm.ds.mov'
class-attribute
instance-attribute
¶
d = result_def(IntRegisterType)
class-attribute
instance-attribute
¶
s = operand_def(IntRegisterType)
class-attribute
instance-attribute
¶
assembly_format = '$s attr-dict `:` `(` type($s) `)` `->` type($d)'
class-attribute
instance-attribute
¶
__init__(d: IntRegisterType, s: Operation | SSAValue, *, comment: str | StringAttr | None = None)
¶
Source code in xdsl/dialects/arm/ops.py
GetRegisterOp
¶
Bases: ARMAsmOperation
This instruction allows us to create an SSAValue for a given register name.
Source code in xdsl/dialects/arm/ops.py
DSSMulOp
¶
Bases: ARMInstruction
Multiplies the values in s1 and s2 and stores the result in d.
See external documentation.
Source code in xdsl/dialects/arm/ops.py
name = 'arm.dss.mul'
class-attribute
instance-attribute
¶
d = result_def(IntRegisterType)
class-attribute
instance-attribute
¶
s1 = operand_def(IntRegisterType)
class-attribute
instance-attribute
¶
s2 = operand_def(IntRegisterType)
class-attribute
instance-attribute
¶
assembly_format = '$s1 `,` $s2 attr-dict `:` `(` type($s1) `,` type($s2) `)` `->` type($d)'
class-attribute
instance-attribute
¶
__init__(s1: Operation | SSAValue, s2: Operation | SSAValue, *, d: IntRegisterType, comment: str | StringAttr | None = None)
¶
Source code in xdsl/dialects/arm/ops.py
LabelOp
¶
Bases: ARMAsmOperation
The label operation is used to emit text labels (e.g. loop:) that are used as branch, unconditional jump targets and symbol offsets.
See external documentation.
Source code in xdsl/dialects/arm/ops.py
name = 'arm.label'
class-attribute
instance-attribute
¶
label = prop_def(StringAttr)
class-attribute
instance-attribute
¶
comment = opt_attr_def(StringAttr)
class-attribute
instance-attribute
¶
assembly_format = '$label attr-dict'
class-attribute
instance-attribute
¶
__init__(label: str | StringAttr, *, comment: str | StringAttr | None = None)
¶
Source code in xdsl/dialects/arm/ops.py
CmpRegOp
¶
Bases: ARMInstruction
Compare (register) subtracts an optionally-shifted register value from a register value. It updates the condition flags based on the result, and discards the result.
See external documentation.