*** empty log message ***
[libfirm] / ir / be / bearch.h
index d76a2ea..9c11bb2 100644 (file)
@@ -251,6 +251,27 @@ struct _arch_irn_ops_if_t {
    */
   arch_irn_flags_t (*get_flags)(const void *self, const ir_node *irn);
 
+  /**
+   * Check, if a node modifies the stack pointer by a constant.
+   * @param self The this pointer.
+   * @param irn  The node in question.
+   * @return     The (constant) amount by which the stack pointer is modifies
+   *             by this node. Return 0, if irn does not touch the stack pointer.
+   *             <tt>-n</tt> if the node modifies the sp by n against the stack's growing
+   *             direction and <tt>n</tt> if irn modifies the stack by n along the stack's
+   *             growing direction.
+   */
+  int (*modifies_sp)(const void *self, const ir_node *irn);
+
+  /**
+   * Set a bias for the stack pointer.
+   * If the node in question uses the stack pointer for indexing, it must
+   * consider the value of <code>bias</code> additionally.
+   * @param self The this pointer.
+   * @param irn  The node in question.
+   * @param bias The bias.
+   */
+  void (*set_stack_bias)(const void *self, ir_node *irn, int bias);
 };
 
 /**
@@ -436,14 +457,6 @@ struct _arch_code_generator_if_t {
         */
        ir_node *(*lower_reload)(void *self, ir_node *reload);
 
-       /**
-        * Called in lowering (e.g. alloca lowering) to set the
-        * correct stack register.
-        * @param self The code generator
-        * @return     The stack register for the current irg
-        */
-       const arch_register_t *(*get_stack_register)(void *self);
-
        /**
         * Called after everything happened.
         * The code generator must also be de-allocated here.