const changes and enhancements to irouts
[libfirm] / include / libfirm / ircons.h
index 44f85ac..ceab9a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
  *    ir_node *new_Shl    (ir_node *op,  ir_node *k,   ir_mode *mode);
  *    ir_node *new_Shr    (ir_node *op,  ir_node *k,   ir_mode *mode);
  *    ir_node *new_Shrs   (ir_node *op,  ir_node *k,   ir_mode *mode);
- *    ir_node *new_Rot    (ir_node *op,  ir_node *k,   ir_mode *mode);
+ *    ir_node *new_Rotl   (ir_node *op,  ir_node *k,   ir_mode *mode);
  *    ir_node *new_Cmp    (ir_node *op1, ir_node *op2);
  *    ir_node *new_Conv   (ir_node *op, ir_mode *mode);
  *    ir_node *new_Cast   (ir_node *op, ir_type *to_tp);
  *
  *    Arithmetic shift right, i.e., sign extended.
  *
- *    ir_node *new_Rot (ir_node *op, ir_node *k, ir_mode *mode)
+ *    ir_node *new_Rotl (ir_node *op, ir_node *k, ir_mode *mode)
  *    ---------------------------------------------------------
  *
- *    Rotates the operand to the (right?) by k bits.
+ *    Rotates the operand to the left by k bits.
  *
  *    ir_node *new_Carry (ir_node *op1, ir_node *op2, ir_mode *mode)
  *    ------------------------------------------------------------
@@ -1515,6 +1515,20 @@ ir_node *new_rd_DivMod (dbg_info *db, ir_graph *irg, ir_node *block,
 ir_node *new_rd_Div    (dbg_info *db, ir_graph *irg, ir_node *block,
                ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
+/** Constructor for a remainderless Div node.
+ *
+ * @param   *db    A pointer for debug information.
+ * @param   *irg   The IR graph the node  belongs to.
+ * @param   *block The IR block the node belongs to.
+ * @param   *memop The store needed to model exceptions
+ * @param   *op1   The first operand.
+ * @param   *op2   The second operand.
+ * @param   *mode  The mode of the result.
+ * @param   state  The pinned state.
+ */
+ir_node *new_rd_DivRL  (dbg_info *db, ir_graph *irg, ir_node *block,
+               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+
 /** Constructor for a Mod node.
  *
  * @param   *db    A pointer for debug information.
@@ -1634,7 +1648,7 @@ ir_node *new_rd_Shr    (dbg_info *db, ir_graph *irg, ir_node *block,
 ir_node *new_rd_Shrs   (dbg_info *db, ir_graph *irg, ir_node *block,
                ir_node *op, ir_node *k, ir_mode *mode);
 
-/** Constructor for a Rot node.
+/** Constructor for a Rotl node.
  *
  * @param   *db    A pointer for debug information.
  * @param   *irg   The IR graph the node  belongs to.
@@ -1643,7 +1657,7 @@ ir_node *new_rd_Shrs   (dbg_info *db, ir_graph *irg, ir_node *block,
  * @param   *k     The number of bits to rotate the operand.
  * @param   *mode  The mode of the operand.
  */
-ir_node *new_rd_Rot    (dbg_info *db, ir_graph *irg, ir_node *block,
+ir_node *new_rd_Rotl    (dbg_info *db, ir_graph *irg, ir_node *block,
                ir_node *op, ir_node *k, ir_mode *mode);
 
 
@@ -1744,7 +1758,7 @@ ir_node *new_rd_Store  (dbg_info *db, ir_graph *irg, ir_node *block,
  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
  */
 ir_node *new_rd_Alloc  (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
-               ir_node *size, ir_type *alloc_type, where_alloc where);
+               ir_node *size, ir_type *alloc_type, ir_where_alloc where);
 
 /** Constructor for a Free node.
  *
@@ -1761,7 +1775,7 @@ ir_node *new_rd_Alloc  (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *st
  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
  */
 ir_node *new_rd_Free   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
-                       ir_node *ptr, ir_node *size, ir_type *free_type, where_alloc where);
+                       ir_node *ptr, ir_node *size, ir_type *free_type, ir_where_alloc where);
 
 /** Constructor for a Sync node.
  *
@@ -2349,6 +2363,19 @@ ir_node *new_r_DivMod (ir_graph *irg, ir_node *block,
 ir_node *new_r_Div    (ir_graph *irg, ir_node *block,
                ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
+/** Constructor for a remainderless Div node.
+ *
+ * @param   *irg   The IR graph the node  belongs to.
+ * @param   *block The IR block the node belongs to.
+ * @param   *memop The store needed to model exceptions
+ * @param   *op1   The first operand.
+ * @param   *op2   The second operand.
+ * @param   *mode  The mode of the result.
+ * @param   state  The pinned state.
+ */
+ir_node *new_r_DivRL  (ir_graph *irg, ir_node *block,
+               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+
 /** Constructor for a Mod node.
  *
  * @param   *irg   The IR graph the node  belongs to.
@@ -2459,7 +2486,7 @@ ir_node *new_r_Shr    (ir_graph *irg, ir_node *block,
 ir_node *new_r_Shrs   (ir_graph *irg, ir_node *block,
                ir_node *op, ir_node *k, ir_mode *mode);
 
-/** Constructor for a Rot node.
+/** Constructor for a Rotl node.
  *
  * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
@@ -2467,7 +2494,7 @@ ir_node *new_r_Shrs   (ir_graph *irg, ir_node *block,
  * @param   *k     The number of bits to rotate the operand.
  * @param   *mode  The mode of the operand.
  */
-ir_node *new_r_Rot    (ir_graph *irg, ir_node *block,
+ir_node *new_r_Rotl   (ir_graph *irg, ir_node *block,
                ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Conv node.
@@ -2560,7 +2587,7 @@ ir_node *new_r_Store  (ir_graph *irg, ir_node *block,
  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
  */
 ir_node *new_r_Alloc  (ir_graph *irg, ir_node *block, ir_node *store,
-               ir_node *size, ir_type *alloc_type, where_alloc where);
+               ir_node *size, ir_type *alloc_type, ir_where_alloc where);
 
 /** Constructor for a Free node.
  *
@@ -2576,7 +2603,7 @@ ir_node *new_r_Alloc  (ir_graph *irg, ir_node *block, ir_node *store,
  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
  */
 ir_node *new_r_Free   (ir_graph *irg, ir_node *block, ir_node *store,
-               ir_node *ptr, ir_node *size, ir_type *free_type, where_alloc where);
+               ir_node *ptr, ir_node *size, ir_type *free_type, ir_where_alloc where);
 
 /** Constructor for a Sync node.
  *
@@ -3167,6 +3194,19 @@ ir_node *new_d_DivMod (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2,
  */
 ir_node *new_d_Div    (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
+/** Constructor for a remainderless Div node.
+ *
+ * Adds the node to the block in current_ir_block.
+ *
+ * @param   *db    A pointer for debug information.
+ * @param   *memop The store needed to model exceptions
+ * @param   *op1   The first operand.
+ * @param   *op2   The second operand.
+ * @param   *mode  The mode of the result.
+ * @param   state  The pinned state.
+ */
+ir_node *new_d_DivRL  (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+
 /** Constructor for a Mod node.
  *
  * Adds the node to the block in current_ir_block.
@@ -3266,7 +3306,7 @@ ir_node *new_d_Shr    (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
  */
 ir_node *new_d_Shrs   (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
 
-/** Constructor for a Rot node.
+/** Constructor for a Rotl node.
  *
  * Adds the node to the block in current_ir_block.
  *
@@ -3275,7 +3315,7 @@ ir_node *new_d_Shrs   (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
  * @param   *k     The number of bits to rotate the operand.
  * @param   *mode  The mode of the operand.
  */
-ir_node *new_d_Rot    (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
+ir_node *new_d_Rotl   (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
 
 /** Constructor for a Cmp node.
  *
@@ -3385,7 +3425,7 @@ ir_node *new_d_Store  (dbg_info *db, ir_node *store, ir_node *addr, ir_node *val
  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
  */
 ir_node *new_d_Alloc  (dbg_info *db, ir_node *store, ir_node *size, ir_type *alloc_type,
-                       where_alloc where);
+                       ir_where_alloc where);
 
  /** Constructor for a Free node.
  *
@@ -3401,7 +3441,7 @@ ir_node *new_d_Alloc  (dbg_info *db, ir_node *store, ir_node *size, ir_type *all
  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
  */
 ir_node *new_d_Free   (dbg_info *db, ir_node *store, ir_node *ptr, ir_node *size,
-             ir_type *free_type, where_alloc where);
+             ir_type *free_type, ir_where_alloc where);
 
 /** Constructor for a Sync node.
  *
@@ -3989,6 +4029,18 @@ ir_node *new_DivMod (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode,
  */
 ir_node *new_Div    (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
+/** Constructor for a remainderless Div node.
+ *
+ * Adds the node to the block in current_ir_block.
+ *
+ * @param   *memop The store needed to model exceptions
+ * @param   *op1   The first operand.
+ * @param   *op2   The second operand.
+ * @param   *mode  The mode of the result.
+ * @param   state  The pinned state.
+ */
+ir_node *new_DivRL  (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+
 /** Constructor for a Mod node.
  *
  * Adds the node to the block in current_ir_block.
@@ -4076,7 +4128,7 @@ ir_node *new_Shr    (ir_node *op,  ir_node *k,   ir_mode *mode);
  */
 ir_node *new_Shrs   (ir_node *op,  ir_node *k,   ir_mode *mode);
 
-/** Constructor for a Rot node.
+/** Constructor for a Rotl node.
  *
  * Adds the node to the block in current_ir_block.
  *
@@ -4084,7 +4136,7 @@ ir_node *new_Shrs   (ir_node *op,  ir_node *k,   ir_mode *mode);
  * @param   *k     The number of bits to rotate the operand.
  * @param   *mode  The mode of the operand.
  */
-ir_node *new_Rot    (ir_node *op,  ir_node *k,   ir_mode *mode);
+ir_node *new_Rotl   (ir_node *op,  ir_node *k,   ir_mode *mode);
 
 /** Constructor for a Cmp node.
  *
@@ -4180,7 +4232,7 @@ ir_node *new_Store  (ir_node *store, ir_node *addr, ir_node *val);
  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
  */
 ir_node *new_Alloc  (ir_node *store, ir_node *size, ir_type *alloc_type,
-                     where_alloc where);
+                     ir_where_alloc where);
 
 /** Constructor for a Free node.
  *
@@ -4195,7 +4247,7 @@ ir_node *new_Alloc  (ir_node *store, ir_node *size, ir_type *alloc_type,
  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
  */
 ir_node *new_Free   (ir_node *store, ir_node *ptr, ir_node *size,
-                            ir_type *free_type, where_alloc where);
+                            ir_type *free_type, ir_where_alloc where);
 
 /** Constructor for a Sync node.
  *