Wasmssa
wasmssa
RefType: TypeAlias = FuncRefType | ExternRefType
module-attribute
Type alias for opaque references in WebAssembly
WasmIntegerType: TypeAlias = I32 | I64
module-attribute
Type alias for integer types that are supported by WebAssembly
WasmFPType: TypeAlias = Float32Type | Float64Type
module-attribute
Type alias for floating-point types that are supported by WebAssembly
NumericType: TypeAlias = WasmIntegerType | WasmFPType
module-attribute
Type alias for numeric types that are supported by WebAssembly
ValType: TypeAlias = I128 | NumericType | FuncRefType | ExternRefType
module-attribute
Type alias for value types that are supported by WebAssembly
WasmSSA = Dialect('wasmssa', [AbsOp, AddOp, AndOp, CeilOp, ClzOp, ConstOp, ConvertSOp, ConvertUOp, CopySignOp, CtzOp, DemoteOp, DivOp, DivSIOp, DivUIOp, EqOp, EqzOp, FloorOp, ExtendLowBitsSOp, ExtendSI32Op, ExtendUI32Op, GeOp, GeSIOp, GeUIOp, GlobalGetOp, GtOp, GtSIOp, GtUIOp, LeOp, LeSIOp, LeUIOp, LtOp, LtSIOp, LtUIOp, MaxOp, MinOp, MulOp, NeOp, NegOp, OrOp, PopCntOp, RemSIOp, RemUIOp, RotlOp, RotrOp, ShLOp, ShRSOp, ShRUOp, SqrtOp, SubOp, TruncOp, PromoteOp, ReinterpretOp, WrapOp, XOrOp], [ExternRefType, FuncRefType, LimitType, LocalRefType, TableType])
module-attribute
FuncRefType
dataclass
Bases: ParametrizedAttribute, TypeAttribute
Opaque type for function reference
Source code in xdsl/dialects/wasmssa.py
51 52 53 54 55 56 57 | |
name = 'wasmssa.funcref'
class-attribute
instance-attribute
ExternRefType
dataclass
Bases: ParametrizedAttribute, TypeAttribute
Opaque type for extern reference
Source code in xdsl/dialects/wasmssa.py
60 61 62 63 64 65 66 | |
name = 'wasmssa.externref'
class-attribute
instance-attribute
LimitType
dataclass
Bases: ParametrizedAttribute, OpaqueSyntaxAttribute, TypeAttribute
Wasm limit type
Prints as !wasmssa<limit[$min: $max]>
Source code in xdsl/dialects/wasmssa.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
name = 'wasmssa.limit'
class-attribute
instance-attribute
min: IntAttr
instance-attribute
max: IntAttr | NoneAttr
instance-attribute
parse_parameters(parser: AttrParser) -> tuple[IntAttr, IntAttr | NoneAttr]
classmethod
Source code in xdsl/dialects/wasmssa.py
99 100 101 102 103 104 105 | |
print_parameters(printer: Printer) -> None
Source code in xdsl/dialects/wasmssa.py
107 108 109 110 111 112 113 | |
LocalRefType
dataclass
Bases: ParametrizedAttribute, SpacedOpaqueSyntaxAttribute, TypeAttribute
Type of a local variable
Prints as !wasmssa<local ref to $elementType>
Source code in xdsl/dialects/wasmssa.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
name = 'wasmssa.local'
class-attribute
instance-attribute
elementType: ValType
instance-attribute
parse_parameters(parser: AttrParser) -> Sequence[TypeAttribute]
classmethod
Source code in xdsl/dialects/wasmssa.py
128 129 130 131 132 133 | |
print_parameters(printer: Printer) -> None
Source code in xdsl/dialects/wasmssa.py
135 136 137 | |
TableType
dataclass
Bases: ParametrizedAttribute, SpacedOpaqueSyntaxAttribute, TypeAttribute
Wasm table type
Prints as !wasmssa<tabletype $reference [$limit.min: $limit.max]>
Source code in xdsl/dialects/wasmssa.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
name = 'wasmssa.tabletype'
class-attribute
instance-attribute
reference: RefType
instance-attribute
limit: LimitType
instance-attribute
parse_parameters(parser: AttrParser) -> tuple[RefType, LimitType]
classmethod
Source code in xdsl/dialects/wasmssa.py
153 154 155 156 157 158 | |
print_parameters(printer: Printer) -> None
Source code in xdsl/dialects/wasmssa.py
160 161 162 163 | |
ConstOp
Bases: IRDLOperation
Define a WebAssembly numeric constant.
Source code in xdsl/dialects/wasmssa.py
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
name = 'wasmssa.const'
class-attribute
instance-attribute
T: ClassVar = VarConstraint.get('T', NumericType)
class-attribute
instance-attribute
value = prop_def(ParamAttrConstraint(IntegerAttr, (AnyAttr(), T)) | ParamAttrConstraint(FloatAttr, (AnyAttr(), T)))
class-attribute
instance-attribute
result = result_def(T)
class-attribute
instance-attribute
traits = traits_def(ConstantLike())
class-attribute
instance-attribute
assembly_format = '$value attr-dict'
class-attribute
instance-attribute
__init__(value: IntegerAttr | FloatAttr)
Source code in xdsl/dialects/wasmssa.py
184 185 186 187 188 | |
GlobalGetOp
Bases: IRDLOperation
Return the value of a WebAssembly global.
Source code in xdsl/dialects/wasmssa.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | |
name = 'wasmssa.global_get'
class-attribute
instance-attribute
global_ = prop_def(FlatSymbolRefAttrConstr, prop_name='global')
class-attribute
instance-attribute
global_val = result_def(ValType)
class-attribute
instance-attribute
traits = traits_def(ConstantLike())
class-attribute
instance-attribute
assembly_format = '$global attr-dict `:` type($global_val)'
class-attribute
instance-attribute
__init__(global_: str | SymbolRefAttr, result_type: ValType)
Source code in xdsl/dialects/wasmssa.py
204 205 206 207 208 209 210 211 212 | |
BinaryNumericalOperation
Bases: IRDLOperation, ABC, Generic[_NumericTypeInvT]
Base class for binary WebAssembly numeric operations.
Source code in xdsl/dialects/wasmssa.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
T: ClassVar = VarConstraint('T', irdl_to_attr_constraint(_NumericTypeInvT, allow_type_var=True))
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
result = result_def(T)
class-attribute
instance-attribute
assembly_format = '$lhs $rhs `:` type($lhs) attr-dict'
class-attribute
instance-attribute
__init__(lhs: SSAValue | Operation, rhs: SSAValue | Operation)
Source code in xdsl/dialects/wasmssa.py
228 229 230 231 232 233 234 | |
AddOp
dataclass
Bases: BinaryNumericalOperation
Sum two WebAssembly numeric values.
Source code in xdsl/dialects/wasmssa.py
237 238 239 240 241 242 243 | |
name = 'wasmssa.add'
class-attribute
instance-attribute
traits = traits_def(Pure(), Commutative())
class-attribute
instance-attribute
AndOp
dataclass
Bases: BinaryNumericalOperation
Compute the bitwise AND between two values.
Source code in xdsl/dialects/wasmssa.py
246 247 248 249 250 251 252 | |
name = 'wasmssa.and'
class-attribute
instance-attribute
traits = traits_def(Pure(), Commutative())
class-attribute
instance-attribute
DivOp
dataclass
Bases: BinaryNumericalOperation[WasmFPType]
Divide two floating-point values.
Source code in xdsl/dialects/wasmssa.py
255 256 257 258 259 260 261 | |
name = 'wasmssa.div'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
DivUIOp
dataclass
Bases: BinaryNumericalOperation[WasmIntegerType]
Divide two values interpreted as unsigned integers.
Source code in xdsl/dialects/wasmssa.py
264 265 266 267 268 269 270 | |
name = 'wasmssa.div_ui'
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
DivSIOp
dataclass
Bases: BinaryNumericalOperation[WasmIntegerType]
Divide two values interpreted as signed integers.
Source code in xdsl/dialects/wasmssa.py
273 274 275 276 277 278 279 | |
name = 'wasmssa.div_si'
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
MulOp
dataclass
Bases: BinaryNumericalOperation
Multiply two values.
Source code in xdsl/dialects/wasmssa.py
282 283 284 285 286 287 288 | |
name = 'wasmssa.mul'
class-attribute
instance-attribute
traits = traits_def(Pure(), Commutative())
class-attribute
instance-attribute
OrOp
dataclass
Bases: BinaryNumericalOperation
Compute the bitwise OR between two values.
Source code in xdsl/dialects/wasmssa.py
291 292 293 294 295 296 297 | |
name = 'wasmssa.or'
class-attribute
instance-attribute
traits = traits_def(Pure(), Commutative())
class-attribute
instance-attribute
SubOp
dataclass
Bases: BinaryNumericalOperation
Subtract two values.
Source code in xdsl/dialects/wasmssa.py
300 301 302 303 304 305 306 | |
name = 'wasmssa.sub'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
RemUIOp
dataclass
Bases: BinaryNumericalOperation[WasmIntegerType]
Compute the unsigned integer remainder of two values.
Source code in xdsl/dialects/wasmssa.py
309 310 311 312 313 314 315 | |
name = 'wasmssa.rem_ui'
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
RemSIOp
dataclass
Bases: BinaryNumericalOperation[WasmIntegerType]
Compute the signed integer remainder of two values.
Source code in xdsl/dialects/wasmssa.py
318 319 320 321 322 323 324 | |
name = 'wasmssa.rem_si'
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
XOrOp
dataclass
Bases: BinaryNumericalOperation
Compute the bitwise XOR between two values.
Source code in xdsl/dialects/wasmssa.py
327 328 329 330 331 332 333 | |
name = 'wasmssa.xor'
class-attribute
instance-attribute
traits = traits_def(Pure(), Commutative())
class-attribute
instance-attribute
MinOp
dataclass
Bases: BinaryNumericalOperation[WasmFPType]
Compute the minimum of two floating-point values.
Source code in xdsl/dialects/wasmssa.py
336 337 338 339 340 341 342 | |
name = 'wasmssa.min'
class-attribute
instance-attribute
traits = traits_def(Pure(), Commutative())
class-attribute
instance-attribute
MaxOp
dataclass
Bases: BinaryNumericalOperation[WasmFPType]
Compute the maximum of two floating-point values.
Source code in xdsl/dialects/wasmssa.py
345 346 347 348 349 350 351 | |
name = 'wasmssa.max'
class-attribute
instance-attribute
traits = traits_def(Pure(), Commutative())
class-attribute
instance-attribute
CopySignOp
dataclass
Bases: BinaryNumericalOperation[WasmFPType]
Copy the sign of the second floating-point value to the first.
Source code in xdsl/dialects/wasmssa.py
354 355 356 357 358 359 360 | |
name = 'wasmssa.copysign'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
BinaryComparisonOperation
Bases: IRDLOperation, ABC, Generic[_NumericTypeInvT]
Base class for binary WebAssembly comparison operations.
Source code in xdsl/dialects/wasmssa.py
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | |
T: ClassVar = VarConstraint('T', irdl_to_attr_constraint(_NumericTypeInvT, allow_type_var=True))
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
result = result_def(I32)
class-attribute
instance-attribute
assembly_format = '$lhs $rhs `:` type($lhs) `->` type($result) attr-dict'
class-attribute
instance-attribute
__init__(lhs: SSAValue | Operation, rhs: SSAValue | Operation)
Source code in xdsl/dialects/wasmssa.py
376 377 378 379 380 381 | |
EqOp
dataclass
Bases: BinaryComparisonOperation
Check if two numeric values are equal.
Source code in xdsl/dialects/wasmssa.py
384 385 386 387 388 389 390 | |
name = 'wasmssa.eq'
class-attribute
instance-attribute
traits = traits_def(Pure(), Commutative())
class-attribute
instance-attribute
NeOp
dataclass
Bases: BinaryComparisonOperation
Check if two numeric values are different.
Source code in xdsl/dialects/wasmssa.py
393 394 395 396 397 398 399 | |
name = 'wasmssa.ne'
class-attribute
instance-attribute
traits = traits_def(Pure(), Commutative())
class-attribute
instance-attribute
LtSIOp
dataclass
Bases: BinaryComparisonOperation[WasmIntegerType]
Check if a signed integer is less than another.
Source code in xdsl/dialects/wasmssa.py
402 403 404 405 406 407 408 | |
name = 'wasmssa.lt_si'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
LtUIOp
dataclass
Bases: BinaryComparisonOperation[WasmIntegerType]
Check if an unsigned integer is less than another.
Source code in xdsl/dialects/wasmssa.py
411 412 413 414 415 416 417 | |
name = 'wasmssa.lt_ui'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
LeSIOp
dataclass
Bases: BinaryComparisonOperation[WasmIntegerType]
Check if a signed integer is less than or equal to another.
Source code in xdsl/dialects/wasmssa.py
420 421 422 423 424 425 426 | |
name = 'wasmssa.le_si'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
LeUIOp
dataclass
Bases: BinaryComparisonOperation[WasmIntegerType]
Check if an unsigned integer is less than or equal to another.
Source code in xdsl/dialects/wasmssa.py
429 430 431 432 433 434 435 | |
name = 'wasmssa.le_ui'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
GtSIOp
dataclass
Bases: BinaryComparisonOperation[WasmIntegerType]
Check if a signed integer is greater than another.
Source code in xdsl/dialects/wasmssa.py
438 439 440 441 442 443 444 | |
name = 'wasmssa.gt_si'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
GtUIOp
dataclass
Bases: BinaryComparisonOperation[WasmIntegerType]
Check if an unsigned integer is greater than another.
Source code in xdsl/dialects/wasmssa.py
447 448 449 450 451 452 453 | |
name = 'wasmssa.gt_ui'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
GeSIOp
dataclass
Bases: BinaryComparisonOperation[WasmIntegerType]
Check if a signed integer is greater than or equal to another.
Source code in xdsl/dialects/wasmssa.py
456 457 458 459 460 461 462 | |
name = 'wasmssa.ge_si'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
GeUIOp
dataclass
Bases: BinaryComparisonOperation[WasmIntegerType]
Check if an unsigned integer is greater than or equal to another.
Source code in xdsl/dialects/wasmssa.py
465 466 467 468 469 470 471 | |
name = 'wasmssa.ge_ui'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
LtOp
dataclass
Bases: BinaryComparisonOperation[WasmFPType]
Check if a floating-point value is less than another.
Source code in xdsl/dialects/wasmssa.py
474 475 476 477 478 479 480 | |
name = 'wasmssa.lt'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
LeOp
dataclass
Bases: BinaryComparisonOperation[WasmFPType]
Check if a floating-point value is less than or equal to another.
Source code in xdsl/dialects/wasmssa.py
483 484 485 486 487 488 489 | |
name = 'wasmssa.le'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
GtOp
dataclass
Bases: BinaryComparisonOperation[WasmFPType]
Check if a floating-point value is greater than another.
Source code in xdsl/dialects/wasmssa.py
492 493 494 495 496 497 498 | |
name = 'wasmssa.gt'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
GeOp
dataclass
Bases: BinaryComparisonOperation[WasmFPType]
Check if a floating-point value is greater than or equal to another.
Source code in xdsl/dialects/wasmssa.py
501 502 503 504 505 506 507 | |
name = 'wasmssa.ge'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
EqzOp
Bases: IRDLOperation
Check if an integer value is equal to zero.
Source code in xdsl/dialects/wasmssa.py
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | |
name = 'wasmssa.eqz'
class-attribute
instance-attribute
input = operand_def(WasmIntegerType)
class-attribute
instance-attribute
result = result_def(I32)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
assembly_format = '$input `:` type($input) `->` type($result) attr-dict'
class-attribute
instance-attribute
__init__(input: SSAValue | Operation)
Source code in xdsl/dialects/wasmssa.py
523 524 | |
ShiftRotateOperation
Bases: IRDLOperation, ABC
Base class for WebAssembly integer shift and rotate operations.
Source code in xdsl/dialects/wasmssa.py
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 | |
T: ClassVar = VarConstraint.get('T', WasmIntegerType)
class-attribute
instance-attribute
val = operand_def(T)
class-attribute
instance-attribute
bits = operand_def(T)
class-attribute
instance-attribute
result = result_def(T)
class-attribute
instance-attribute
assembly_format = '$val `by` $bits `bits` `:` type($val) attr-dict'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(val: SSAValue | Operation, bits: SSAValue | Operation)
Source code in xdsl/dialects/wasmssa.py
540 541 542 543 544 545 546 | |
ShLOp
dataclass
Bases: ShiftRotateOperation
Shift an integer value left.
Source code in xdsl/dialects/wasmssa.py
549 550 551 552 553 | |
name = 'wasmssa.shl'
class-attribute
instance-attribute
ShRSOp
dataclass
Bases: ShiftRotateOperation
Shift a signed integer value right.
Source code in xdsl/dialects/wasmssa.py
556 557 558 559 560 | |
name = 'wasmssa.shr_s'
class-attribute
instance-attribute
ShRUOp
dataclass
Bases: ShiftRotateOperation
Shift an unsigned integer value right.
Source code in xdsl/dialects/wasmssa.py
563 564 565 566 567 | |
name = 'wasmssa.shr_u'
class-attribute
instance-attribute
RotlOp
dataclass
Bases: ShiftRotateOperation
Rotate an integer value left.
Source code in xdsl/dialects/wasmssa.py
570 571 572 573 574 | |
name = 'wasmssa.rotl'
class-attribute
instance-attribute
RotrOp
dataclass
Bases: ShiftRotateOperation
Rotate an integer value right.
Source code in xdsl/dialects/wasmssa.py
577 578 579 580 581 | |
name = 'wasmssa.rotr'
class-attribute
instance-attribute
UnaryNumericalOperation
Bases: IRDLOperation, ABC, Generic[_NumericTypeInvT]
Base class for unary WebAssembly numeric operations.
Source code in xdsl/dialects/wasmssa.py
584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 | |
T: ClassVar = VarConstraint('T', irdl_to_attr_constraint(_NumericTypeInvT, allow_type_var=True))
class-attribute
instance-attribute
src = operand_def(T)
class-attribute
instance-attribute
result = result_def(T)
class-attribute
instance-attribute
assembly_format = '$src `:` type($src) attr-dict'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(src: SSAValue | Operation)
Source code in xdsl/dialects/wasmssa.py
598 599 600 | |
AbsOp
dataclass
Bases: UnaryNumericalOperation[WasmFPType]
Compute the absolute value of a floating-point value.
Source code in xdsl/dialects/wasmssa.py
603 604 605 606 607 | |
name = 'wasmssa.abs'
class-attribute
instance-attribute
CeilOp
dataclass
Bases: UnaryNumericalOperation[WasmFPType]
Round a floating-point value toward positive infinity.
Source code in xdsl/dialects/wasmssa.py
610 611 612 613 614 | |
name = 'wasmssa.ceil'
class-attribute
instance-attribute
FloorOp
dataclass
Bases: UnaryNumericalOperation[WasmFPType]
Round a floating-point value toward negative infinity.
Source code in xdsl/dialects/wasmssa.py
617 618 619 620 621 | |
name = 'wasmssa.floor'
class-attribute
instance-attribute
NegOp
dataclass
Bases: UnaryNumericalOperation[WasmFPType]
Negate a floating-point value.
Source code in xdsl/dialects/wasmssa.py
624 625 626 627 628 | |
name = 'wasmssa.neg'
class-attribute
instance-attribute
SqrtOp
dataclass
Bases: UnaryNumericalOperation[WasmFPType]
Compute the square root of a floating-point value.
Source code in xdsl/dialects/wasmssa.py
631 632 633 634 635 | |
name = 'wasmssa.sqrt'
class-attribute
instance-attribute
TruncOp
dataclass
Bases: UnaryNumericalOperation[WasmFPType]
Round a floating-point value toward zero.
Source code in xdsl/dialects/wasmssa.py
638 639 640 641 642 | |
name = 'wasmssa.trunc'
class-attribute
instance-attribute
ClzOp
dataclass
Bases: UnaryNumericalOperation[WasmIntegerType]
Count leading zeroes in an integer value.
Source code in xdsl/dialects/wasmssa.py
645 646 647 648 649 | |
name = 'wasmssa.clz'
class-attribute
instance-attribute
CtzOp
dataclass
Bases: UnaryNumericalOperation[WasmIntegerType]
Count trailing zeroes in an integer value.
Source code in xdsl/dialects/wasmssa.py
652 653 654 655 656 | |
name = 'wasmssa.ctz'
class-attribute
instance-attribute
PopCntOp
dataclass
Bases: UnaryNumericalOperation[WasmIntegerType]
Count set bits in an integer value.
Source code in xdsl/dialects/wasmssa.py
659 660 661 662 663 | |
name = 'wasmssa.popcnt'
class-attribute
instance-attribute
ConversionOperation
Bases: IRDLOperation, ABC, Generic[_NumericTypeInvT, _NumericResultTypeInvT]
Base class for WebAssembly conversion operations.
Source code in xdsl/dialects/wasmssa.py
666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 | |
input = operand_def(irdl_to_attr_constraint(_NumericTypeInvT, allow_type_var=True))
class-attribute
instance-attribute
result = result_def(irdl_to_attr_constraint(_NumericResultTypeInvT, allow_type_var=True))
class-attribute
instance-attribute
assembly_format = '$input `:` type($input) `to` type($result) attr-dict'
class-attribute
instance-attribute
__init__(input: SSAValue | Operation, result_type: NumericType)
Source code in xdsl/dialects/wasmssa.py
680 681 682 683 684 685 | |
ConvertUOp
dataclass
Bases: ConversionOperation[WasmIntegerType, WasmFPType]
Convert an unsigned integer value to a floating-point value.
Source code in xdsl/dialects/wasmssa.py
688 689 690 691 692 693 694 | |
name = 'wasmssa.convert_u'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
ConvertSOp
dataclass
Bases: ConversionOperation[WasmIntegerType, WasmFPType]
Convert a signed integer value to a floating-point value.
Source code in xdsl/dialects/wasmssa.py
697 698 699 700 701 702 703 | |
name = 'wasmssa.convert_s'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
DemoteOp
dataclass
Bases: ConversionOperation[Float64Type, Float32Type]
Convert an f64 value to f32.
Source code in xdsl/dialects/wasmssa.py
706 707 708 709 710 711 712 | |
name = 'wasmssa.demote'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
ExtendSI32Op
Bases: IRDLOperation
Sign-extend an i32 value to i64.
Source code in xdsl/dialects/wasmssa.py
715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 | |
name = 'wasmssa.extend_i32_s'
class-attribute
instance-attribute
input = operand_def(I32)
class-attribute
instance-attribute
result = result_def(I64)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
assembly_format = '$input `to` type($result) attr-dict'
class-attribute
instance-attribute
__init__(input: SSAValue | Operation)
Source code in xdsl/dialects/wasmssa.py
728 729 | |
ExtendUI32Op
Bases: IRDLOperation
Zero-extend an i32 value to i64.
Source code in xdsl/dialects/wasmssa.py
732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 | |
name = 'wasmssa.extend_i32_u'
class-attribute
instance-attribute
input = operand_def(I32)
class-attribute
instance-attribute
result = result_def(I64)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
assembly_format = '$input `to` type($result) attr-dict'
class-attribute
instance-attribute
__init__(input: SSAValue | Operation)
Source code in xdsl/dialects/wasmssa.py
745 746 | |
ExtendLowBitsSOp
Bases: IRDLOperation
Sign-extend the low bits of an integer value to its full width.
Source code in xdsl/dialects/wasmssa.py
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 | |
name = 'wasmssa.extend'
class-attribute
instance-attribute
T: ClassVar = VarConstraint.get('T', WasmIntegerType)
class-attribute
instance-attribute
input = operand_def(T)
class-attribute
instance-attribute
bitsToTake = prop_def(IntegerAttr)
class-attribute
instance-attribute
result = result_def(T)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
assembly_format = '$bitsToTake `low` `bits` `from` $input `:` type($input) attr-dict'
class-attribute
instance-attribute
__init__(input: SSAValue | Operation, bits_to_take: int | IntegerAttr)
Source code in xdsl/dialects/wasmssa.py
767 768 769 770 771 772 773 774 775 776 777 778 779 | |
verify_() -> None
Source code in xdsl/dialects/wasmssa.py
781 782 783 784 785 786 787 788 789 790 791 792 793 794 | |
PromoteOp
dataclass
Bases: ConversionOperation[Float32Type, Float64Type]
Convert an f32 value to f64.
Source code in xdsl/dialects/wasmssa.py
797 798 799 800 801 802 803 | |
name = 'wasmssa.promote'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
WrapOp
dataclass
Bases: ConversionOperation[I64, I32]
Wrap an i64 value to i32.
Source code in xdsl/dialects/wasmssa.py
806 807 808 809 810 811 812 | |
name = 'wasmssa.wrap'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
ReinterpretOp
dataclass
Bases: ConversionOperation
Reinterpret a numeric value as a different type of the same bit width.
Source code in xdsl/dialects/wasmssa.py
815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 | |
name = 'wasmssa.reinterpret'
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
assembly_format = '$input `:` type($input) `as` type($result) attr-dict'
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/wasmssa.py
825 826 827 828 829 830 831 832 833 834 835 836 | |