summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beinsn_t.h
diff options
context:
space:
mode:
authorSebastian Hack <hack@ipd.info.uni-karlsruhe.de>2006-04-06 13:19:53 +0200
committerSebastian Hack <hack@ipd.info.uni-karlsruhe.de>2006-04-06 13:19:53 +0200
commita62baf3793037f4657a37c7f298d18dfafedd1e5 (patch)
treed7f9691ee6ffa237e3e05fcc4dd883c54b8e914a /ir/be/beinsn_t.h
parentd3a2b29742fce2a95aed605fbbe83f4c8ac3a28b (diff)
Added insn support
Diffstat (limited to 'ir/be/beinsn_t.h')
-rw-r--r--ir/be/beinsn_t.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/ir/be/beinsn_t.h b/ir/be/beinsn_t.h
new file mode 100644
index 0000000..53fc828
--- /dev/null
+++ b/ir/be/beinsn_t.h
@@ -0,0 +1,52 @@
+/**
+ * Instructions
+ *
+ * A data structure to treat nodes and node-proj collections uniformly.
+ */
+
+#ifndef _BEINSN_T_H
+#define _BEINSN_T_H
+
+#include "bitset.h"
+
+#include "bearch.h"
+
+typedef struct _be_operand_t be_operand_t;
+typedef struct _be_insn_t be_insn_t;
+typedef struct _be_insn_env_t be_insn_env_t;
+
+struct _be_operand_t {
+ ir_node *irn;
+ ir_node *carrier;
+ be_operand_t *partner;
+ bitset_t *regs;
+ int pos;
+ arch_register_req_t req;
+ unsigned has_constraints : 1;
+};
+
+struct _be_insn_t {
+ be_operand_t *ops;
+ int n_ops;
+ int use_start;
+ ir_node *next_insn;
+ ir_node *irn;
+ unsigned in_constraints : 1;
+ unsigned out_constraints : 1;
+ unsigned has_constraints : 1;
+ unsigned pre_colored : 1;
+};
+
+struct _be_insn_env_t {
+ struct obstack *obst;
+ const arch_env_t *aenv;
+ const arch_register_class_t *cls;
+ bitset_t *ignore_colors;
+};
+
+#define be_insn_n_defs(insn) ((insn)->use_start)
+#define be_insn_n_uses(insn) ((insn)->n_ops - (insn)->use_start)
+
+be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn);
+
+#endif /* _BEINSN_T_H */