summaryrefslogtreecommitdiffhomepage
path: root/ir/be/benode.h
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-02-24 10:51:02 +0100
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-06-05 16:14:49 +0200
commitbd2375e248c5c208df419eb4cea7f6cf2b55476f (patch)
tree1296eff767aebd9d7c13a49b13b4e7bd1df99825 /ir/be/benode.h
parenta2e4439a205c376aa1f0c447f17b6ef9c6387f75 (diff)
be: Introduce a generic be_Asm node.
Diffstat (limited to 'ir/be/benode.h')
-rw-r--r--ir/be/benode.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/ir/be/benode.h b/ir/be/benode.h
index 1c424a9..ee565b0 100644
--- a/ir/be/benode.h
+++ b/ir/be/benode.h
@@ -22,6 +22,7 @@
typedef enum be_opcode {
beo_AnyVal,
beo_first = beo_AnyVal,
+ beo_Asm,
beo_Copy,
beo_CopyKeep,
beo_IncSP,
@@ -31,7 +32,18 @@ typedef enum be_opcode {
beo_last = beo_Perm
} be_opcode;
+typedef struct be_node_attr_t {
+ except_attr exc;
+} be_node_attr_t;
+
+typedef struct be_asm_attr_t {
+ be_node_attr_t base;
+ ident *text;
+ void *operands;
+} be_asm_attr_t;
+
extern ir_op *op_be_AnyVal;
+extern ir_op *op_be_Asm;
extern ir_op *op_be_Copy;
extern ir_op *op_be_CopyKeep;
extern ir_op *op_be_IncSP;
@@ -176,11 +188,14 @@ ir_node *be_new_Phi0(ir_node *block, ir_mode *mode, arch_register_req_t const *r
*/
ir_node *be_complete_Phi(ir_node *phi, unsigned n_ins, ir_node **ins);
+ir_node *be_new_Asm(dbg_info *dbgi, ir_node *block, int n_ins, ir_node **ins, int n_outs, ident *text, void *operands);
+
/**
* Search for output of start node with a specific register
*/
ir_node *be_get_initial_reg_value(ir_graph *irg, const arch_register_t *reg);
+static inline bool be_is_Asm (const ir_node *irn) { return get_irn_op(irn) == op_be_Asm ; }
static inline bool be_is_Copy (const ir_node *irn) { return get_irn_op(irn) == op_be_Copy ; }
static inline bool be_is_CopyKeep(const ir_node *irn) { return get_irn_op(irn) == op_be_CopyKeep ; }
static inline bool be_is_Perm (const ir_node *irn) { return get_irn_op(irn) == op_be_Perm ; }
@@ -188,4 +203,10 @@ static inline bool be_is_MemPerm (const ir_node *irn) { return get_irn_op(irn) =
static inline bool be_is_Keep (const ir_node *irn) { return get_irn_op(irn) == op_be_Keep ; }
static inline bool be_is_IncSP (const ir_node *irn) { return get_irn_op(irn) == op_be_IncSP ; }
+static inline be_asm_attr_t const *get_be_asm_attr_const(ir_node const *const asmn)
+{
+ assert(be_is_Asm(asmn));
+ return (be_asm_attr_t const*)get_irn_generic_attr_const(asmn);
+}
+
#endif