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
18 19 20 21 | |
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
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
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.
Source code in xdsl/dialects/arm/ops.py
36 37 38 39 40 41 42 | |
assembly_instruction_name() -> str
By default, the name of the instruction is the same as the name of the operation.
Source code in xdsl/dialects/arm/ops.py
44 45 46 47 48 49 | |
assembly_line() -> str | None
Source code in xdsl/dialects/arm/ops.py
51 52 53 54 55 | |
DSMovOp
Bases: ARMInstruction
Copies the value of s into d.
See external documentation.
Source code in xdsl/dialects/arm/ops.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
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
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
assembly_line_args()
Source code in xdsl/dialects/arm/ops.py
90 91 | |
GetRegisterOp
Bases: ARMAsmOperation
This instruction allows us to create an SSAValue for a given register name.
Source code in xdsl/dialects/arm/ops.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
name = 'arm.get_register'
class-attribute
instance-attribute
result = result_def(IntRegisterType)
class-attribute
instance-attribute
assembly_format = 'attr-dict `:` type($result)'
class-attribute
instance-attribute
__init__(register_type: IntRegisterType)
Source code in xdsl/dialects/arm/ops.py
105 106 | |
assembly_line()
Source code in xdsl/dialects/arm/ops.py
108 109 | |
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
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
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
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
assembly_line_args()
Source code in xdsl/dialects/arm/ops.py
148 149 | |
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
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
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
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
assembly_line() -> str | None
Source code in xdsl/dialects/arm/ops.py
185 186 | |
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.
Source code in xdsl/dialects/arm/ops.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
name = 'arm.cmp'
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) `)`'
class-attribute
instance-attribute
__init__(s1: Operation | SSAValue, s2: Operation | SSAValue, *, comment: str | StringAttr | None = None)
Source code in xdsl/dialects/arm/ops.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
assembly_line_args()
Source code in xdsl/dialects/arm/ops.py
221 222 | |