beifg: Factorise code to count interference components.
[libfirm] / ir / be / sparc / sparc_nodes_attr.h
index 58665ac..366afc4 100644 (file)
@@ -1,31 +1,17 @@
 /*
- * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
- *
  * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
  */
 
 /**
  * @file
  * @brief   attributes attached to all sparc nodes
- * @version $Id$
+ * @author  Hannes Rapp, Matthias Braun
  */
 #ifndef FIRM_BE_SPARC_SPARC_NODES_ATTR_H
 #define FIRM_BE_SPARC_SPARC_NODES_ATTR_H
 
-#include "../bearch.h"
+#include "bearch.h"
 #include <stdint.h>
 
 typedef struct sparc_attr_t  sparc_attr_t;
@@ -41,9 +27,10 @@ struct sparc_attr_t
 };
 
 enum sparc_arch_irn_flags_t {
-       sparc_arch_irn_flag_modifies_flags        = arch_irn_flags_backend << 0,
-       sparc_arch_irn_flag_modifies_fp_flags     = arch_irn_flags_backend << 1,
-       sparc_arch_irn_flag_needs_64bit_spillslot = arch_irn_flags_backend << 2,
+       sparc_arch_irn_flag_needs_64bit_spillslot = arch_irn_flags_backend << 0,
+       sparc_arch_irn_flag_immediate_form        = arch_irn_flags_backend << 1,
+       sparc_arch_irn_flag_aggregate_return      = arch_irn_flags_backend << 2,
+       sparc_arch_irn_flag_has_delay_slot        = arch_irn_flags_backend << 3,
 };
 
 /**
@@ -63,16 +50,7 @@ struct sparc_fp_conv_attr_t {
 };
 
 /**
- * attribute for save instruction
- */
-typedef struct sparc_save_attr_t sparc_save_attr_t;
-struct sparc_save_attr_t {
-       sparc_attr_t  base;              /**< generic attribute */
-       int           initial_stacksize; /* the min. stack size required by the sparc ABI */
-};
-
-/**
- * attributes for load/store adressing modes
+ * attributes for load/store addressing modes
  */
 typedef struct sparc_load_store_attr_t sparc_load_store_attr_t;
 struct sparc_load_store_attr_t {
@@ -88,8 +66,9 @@ struct sparc_load_store_attr_t {
 typedef struct sparc_jmp_cond_attr_t sparc_jmp_cond_attr_t;
 struct sparc_jmp_cond_attr_t {
        sparc_attr_t base;    /**< generic attribute */
-       pn_Cmp       pnc;
-       bool         is_unsigned : 1;
+       ir_relation  relation;
+       bool         is_unsigned      : 1;
+       bool         annul_delay_slot : 1;
 };
 
 /**
@@ -97,9 +76,14 @@ struct sparc_jmp_cond_attr_t {
  */
 typedef struct sparc_switch_jmp_attr_t sparc_switch_jmp_attr_t;
 struct sparc_switch_jmp_attr_t {
-       sparc_attr_t  base;    /**< generic attribute */
-       long          default_proj_num;
-       ir_entity    *jump_table;
+       sparc_attr_t           base;
+       const ir_switch_table *table;
+       ir_entity             *table_entity;
+};
+
+enum n_sparc_Return {
+       n_sparc_Return_mem = 0,
+       n_sparc_Return_sp  = 1,
 };
 
 #endif