make sparc+arm backend completely independent from beabi
[libfirm] / ir / be / bearch.h
index 81c4830..4952624 100644 (file)
@@ -145,15 +145,6 @@ void            arch_perform_memory_operand(ir_node *irn, ir_node *spill,
  */
 const arch_register_req_t *arch_get_register_req(const ir_node *irn, int pos);
 
-/**
- * Put all registers which shall not be ignored by the register
- * allocator in a bit set.
- * @param cls The register class to consider.
- * @param bs  The bit set to put the registers to.
- */
-extern void arch_put_non_ignore_regs(const arch_register_class_t *cls,
-                                     bitset_t *bs);
-
 /**
  * Check, if a register is assignable to an operand of a node.
  * @param irn The node.
@@ -241,8 +232,9 @@ void be_register_isa_if(const char *name, const arch_isa_if_t *isa);
 struct arch_register_t {
        const char                  *name;       /**< The name of the register. */
        const arch_register_class_t *reg_class;  /**< The class of the register */
-       unsigned                     index;      /**< The index of the register in
+       unsigned short               index;      /**< The index of the register in
                                                      the class. */
+       unsigned short               global_index;
        arch_register_type_t         type;       /**< The type of the register. */
        /** register constraint allowing just this register */
        const arch_register_req_t   *single_req;
@@ -480,19 +472,6 @@ struct arch_isa_if_t {
         */
        void (*handle_intrinsics)(void);
 
-       /**
-        * Get the the number of register classes in the isa.
-        * @return The number of register classes.
-        */
-       unsigned (*get_n_reg_class)(void);
-
-       /**
-        * Get the i-th register class.
-        * @param i The number of the register class.
-        * @return The register class.
-        */
-       const arch_register_class_t *(*get_reg_class)(unsigned i);
-
        /**
         * Get the register class which shall be used to store a value of a given
         * mode.
@@ -604,8 +583,6 @@ struct arch_isa_if_t {
 #define arch_env_done(env)                             ((env)->impl->done(env))
 #define arch_env_handle_intrinsics(env)                \
        do { if((env)->impl->handle_intrinsics != NULL) (env)->impl->handle_intrinsics(); } while(0)
-#define arch_env_get_n_reg_class(env)                  ((env)->impl->get_n_reg_class())
-#define arch_env_get_reg_class(env,i)                  ((env)->impl->get_reg_class(i))
 #define arch_env_get_reg_class_for_mode(env,mode)      ((env)->impl->get_reg_class_for_mode((mode)))
 #define arch_env_get_call_abi(env,tp,abi)              ((env)->impl->get_call_abi((env), (tp), (abi)))
 #define arch_env_get_reg_class_alignment(env,cls)      ((env)->impl->get_reg_class_alignment((cls)))
@@ -623,6 +600,10 @@ struct arch_isa_if_t {
  */
 struct arch_env_t {
        const arch_isa_if_t   *impl;
+       unsigned               n_registers;      /**< number of registers */
+       const arch_register_t *registers;        /**< register array */
+       unsigned               n_register_classes; /**< number of register classes*/
+       const arch_register_class_t *register_classes; /**< register classes */
        const arch_register_t *sp;               /**< The stack pointer register. */
        const arch_register_t *bp;               /**< The base pointer register. */
        const arch_register_class_t *link_class; /**< The static link pointer
@@ -634,8 +615,8 @@ struct arch_env_t {
        int                    spill_cost;       /**< cost for a be_Spill node */
        int                    reload_cost;      /**< cost for a be_Reload node */
        bool                   custom_abi : 1;   /**< backend does all abi handling
-                                                     and does not need the generic stuff
-                                                     from beabi.h/.c */
+                                                     and does not need the generic
+                                                     stuff from beabi.h/.c */
 };
 
 static inline unsigned arch_irn_get_n_outs(const ir_node *node)