- ],
- attr_struct = "long",
- custom_is = True,
-),
-
-Quot = dict(
- ins = [ "mem", "left", "right" ],
- outs = [ "M", "X_regular", "X_except", "res" ],
- flags = "fragile, uses_memory",
- attrs_name = "divmod",
+ ]
+ attr_struct = "sel_attr"
+
+class Shl(Binop):
+ """Returns its first operands bits shifted left by the amount of the 2nd
+ operand"""
+ flags = []
+
+class Shr(Binop):
+ """Returns its first operands bits shifted right by the amount of the 2nd
+ operand. No special handling for the sign bit (zero extension)"""
+ flags = []
+
+class Shrs(Binop):
+ """Returns its first operands bits shifted right by the amount of the 2nd
+ operand. The leftmost bit (usually the sign bit) stays the same
+ (sign extension)"""
+ flags = []
+
+class Start(Op):
+ """The first node of a graph. Execution starts with this node."""
+ outs = [
+ ("X_initial_exec", "control flow"),
+ ("M", "initial memory"),
+ ("P_frame_base", "frame base pointer"),
+ ("T_args", "function arguments")
+ ]
+ mode = "mode_T"
+ pinned = "yes"
+ flags = [ "cfopcode" ]
+ singleton = True
+ knownBlock = True
+ customSerializer = True
+ block = "get_irg_start_block(irg)"
+
+class Store(Op):
+ """Stores a value into memory (heap or stack)."""
+ ins = [
+ ("mem", "memory dependency"),
+ ("ptr", "address to store to"),
+ ("value", "value to store"),
+ ]
+ outs = [
+ ("M", "memory result", "pn_Generic_M"),
+ ("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
+ ("X_except", "control flow when exception occured", "pn_Generic_X_except"),
+ ]
+ flags = [ "fragile", "uses_memory" ]
+ pinned = "exception"
+ attr_struct = "store_attr"
+ pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned"