-#ifndef _ARM_NODES_ATTR_H_
-#define _ARM_NODES_ATTR_H_
+/*
+ * Copyright (C) 1995-2007 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.
+ */
-#include "../bearch.h"
-#include "../../common/firm_types.h"
+/**
+ * @file
+ * @brief declarations for arm node attributes
+ * @author Oliver Richter, Tobias Gneist
+ * @version $Id$
+ */
+#ifndef FIRM_BE_ARM_ARM_NODES_ATTR_H
+#define FIRM_BE_ARM_ARM_NODES_ATTR_H
+
+#include "firm_types.h"
+#include "irnode_t.h"
+#include "../bearch_t.h"
/**
* Possible ARM register shift types.
/** Set the condition code to flags */
#define ARM_SET_COND(attr, code) ((attr)->instr_fl = (((attr)->instr_fl & ~(15 << 3)) | ((code) << 3)))
+/** Generic ARM node attributes. */
typedef struct _arm_attr_t {
- arch_irn_flags_t flags; /**< indicating if spillable, rematerializeable ... etc. */
- int n_res; /**< number of results for this node */
+ except_attr exc; /**< the exception attribute. MUST be the first one. */
+ arch_irn_flags_t flags; /**< indicating if spillable, rematerializeable ... etc. */
const arch_register_req_t **in_req; /**< register requirements for arguments */
const arch_register_req_t **out_req; /**< register requirements for results */
- ir_mode *op_mode; /**< operation mode */
- unsigned instr_fl; /**< condition code, shift modifier */
- tarval *value; /**< immediate */
- const char *symconst_label;
- int proj_num;
- int n_projs;
- long default_proj_num;
+ ir_mode *op_mode; /**< operation mode if different from node's mode */
+ unsigned instr_fl; /**< condition code, shift modifier */
+ tarval *value; /**< immediate */
+ int *out_flags; /**< flags for each produced value */
- /* must be last, dynamically allocated */
- const arch_register_t *slots[1]; /**< register slots for assigned registers */
+ const arch_register_t **slots; /**< register slots for assigned registers */
} arm_attr_t;
+/** Attributes for a SymConst */
+typedef struct _arm_SymConst_attr_t {
+ arm_attr_t attr;
+ ident *symconst_id; /**< for SymConsts: its ident */
+} arm_SymConst_attr_t;
+
+/** Attributes for a CondJmp */
+typedef struct _arm_CondJmp_attr_t {
+ arm_attr_t attr;
+ int proj_num;
+} arm_CondJmp_attr_t;
+
+/** Attributes for a SwitchJmp */
+typedef struct _arm_SwitchJmp_attr_t {
+ arm_attr_t attr;
+ int n_projs;
+ long default_proj_num;
+} arm_SwitchJmp_attr_t;
+
/**
* Returns the shift modifier string.
*/
const char *arm_shf_mod_name(arm_shift_modifier mod);
-#endif /* _ARM_NODES_ATTR_H_ */
+#endif