refactoring: split stackframe handling completely from beabi struct
[libfirm] / ir / be / beirg.h
index 0ce62e4..881a426 100644 (file)
@@ -66,6 +66,8 @@ struct be_stack_layout_t {
        int initial_offset;                /**< the initial difference between stack pointer and frame pointer */
        int initial_bias;                  /**< the initial stack bias */
        int stack_dir;                     /**< -1 for decreasing, 1 for increasing. */
+       bool sp_relative : 1;              /**< entities are addressed relative to
+                                               stack pointer (omit-fp mode) */
 };
 
 /**
@@ -81,6 +83,8 @@ typedef struct be_irg_t {
        be_dom_front_info_t   *dom_front;
        be_lv_t               *lv;
        be_stack_layout_t      stack_layout;
+       arch_register_req_t   *sp_req; /**< requirements for stackpointer producing
+                                           nodes. */
        struct obstack         obst; /**< birg obstack (mainly used to keep
                                          register constraints which we can't keep
                                          in the irg obst, because it gets replace
@@ -117,6 +121,11 @@ static inline be_abi_irg_t *be_get_irg_abi(const ir_graph *irg)
        return be_birg_from_irg(irg)->abi;
 }
 
+static inline void be_set_irg_abi(ir_graph *irg, be_abi_irg_t *abi)
+{
+       be_birg_from_irg(irg)->abi = abi;
+}
+
 static inline be_options_t *be_get_irg_options(const ir_graph *irg)
 {
        return be_birg_from_irg(irg)->main_env->options;