added Carry and Borrow opcodes
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sat, 18 Mar 2006 12:12:12 +0000 (12:12 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sat, 18 Mar 2006 12:12:12 +0000 (12:12 +0000)
[r7471]

ir/ir/irop.c
ir/ir/irop.h

index 6f7ddd7..ea0bdaa 100644 (file)
@@ -67,6 +67,8 @@ ir_op *op_Shrs;        ir_op *get_op_Shrs      (void) { return op_Shrs;      }
 ir_op *op_Rot;         ir_op *get_op_Rot       (void) { return op_Rot;       }
 ir_op *op_Conv;        ir_op *get_op_Conv      (void) { return op_Conv;      }
 ir_op *op_Cast;        ir_op *get_op_Cast      (void) { return op_Cast;      }
+ir_op *op_Carry;       ir_op *get_op_Carry     (void) { return op_Carry;     }
+ir_op *op_Borrow;      ir_op *get_op_Borrow    (void) { return op_Borrow;    }
 
 ir_op *op_Phi;         ir_op *get_op_Phi       (void) { return op_Phi;       }
 
@@ -245,6 +247,8 @@ init_op(void)
   op_Rot       = new_ir_op(iro_Rot,       "Rot",       op_pin_state_floats, N,       oparity_binary,    0, 0, NULL);
   op_Conv      = new_ir_op(iro_Conv,      "Conv",      op_pin_state_floats, N,       oparity_unary,     0, 0, NULL);
   op_Cast      = new_ir_op(iro_Cast,      "Cast",      op_pin_state_floats, N|H,     oparity_unary,     0, sizeof(cast_attr), NULL);
+  op_Carry     = new_ir_op(iro_Carry,     "Carry",     op_pin_state_floats, C,       oparity_binary,    0, 0, NULL);
+  op_Borrow    = new_ir_op(iro_Borrow,    "Borrow",    op_pin_state_floats, N,       oparity_binary,    0, 0, NULL);
 
   op_Phi       = new_ir_op(iro_Phi,       "Phi",       op_pin_state_pinned, N,       oparity_variable, -1, sizeof(int), NULL);
 
@@ -321,6 +325,8 @@ void finish_op(void) {
   free_ir_op (op_Rot      ); op_Rot       = NULL;
   free_ir_op (op_Conv     ); op_Conv      = NULL;
   free_ir_op (op_Cast     ); op_Cast      = NULL;
+  free_ir_op (op_Carry    ); op_Carry     = NULL;
+  free_ir_op (op_Borrow   ); op_Borrow    = NULL;
 
   free_ir_op (op_Phi      ); op_Phi       = NULL;
 
index d711344..87672d0 100644 (file)
@@ -71,6 +71,7 @@ typedef enum {
   iro_Call, iro_Add, iro_Sub, iro_Minus, iro_Mul, iro_Quot, iro_DivMod,
   iro_Div,  iro_Mod, iro_Abs, iro_And, iro_Or, iro_Eor, iro_Not,
   iro_Cmp,  iro_Shl, iro_Shr, iro_Shrs, iro_Rot, iro_Conv, iro_Cast,
+  iro_Carry, iro_Borrow,
   iro_Phi,
   iro_Load, iro_Store, iro_Alloc, iro_Free, iro_Sync,
   iro_Proj, iro_Tuple, iro_Id, iro_Bad, iro_Confirm,
@@ -116,6 +117,8 @@ extern ir_op *op_Shrs;            ir_op *get_op_Shrs      (void);
 extern ir_op *op_Rot;             ir_op *get_op_Rot       (void);
 extern ir_op *op_Conv;            ir_op *get_op_Conv      (void);
 extern ir_op *op_Cast;            ir_op *get_op_Cast      (void);
+extern ir_op *op_Carry;           ir_op *get_op_Carry     (void);
+extern ir_op *op_Borrow;          ir_op *get_op_Borrow    (void);
 
 extern ir_op *op_Phi;             ir_op *get_op_Phi       (void);