summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beasm.h
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-05-09 20:29:50 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2018-05-09 20:29:50 +0200
commitb3791a21b6ee22c0533cc513dec7f2edddf6be8c (patch)
tree76d5e3ccf767a5eca857896efa95a59542ff6c48 /ir/be/beasm.h
parent720d6194c99202777977da756fac97c31b5ad887 (diff)
be: Factor out code to add an output to an asm node.
Diffstat (limited to 'ir/be/beasm.h')
-rw-r--r--ir/be/beasm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ir/be/beasm.h b/ir/be/beasm.h
index 3512d82..970f296 100644
--- a/ir/be/beasm.h
+++ b/ir/be/beasm.h
@@ -75,6 +75,13 @@ static inline void be_asm_add_in(be_asm_info_t *const info, be_asm_operand_t *co
ARR_APP1(arch_register_req_t const*, info->in_reqs, req);
}
+static inline void be_asm_add_out(be_asm_info_t *const info, be_asm_operand_t *const op, struct obstack *const obst, be_asm_constraint_t const *const be_constraint, size_t const n_out_constraints, int const opos)
+{
+ be_set_asm_operand(op, BE_ASM_OPERAND_OUTPUT_VALUE, opos);
+ arch_register_req_t const *const oreq = be_make_register_req(obst, be_constraint, n_out_constraints, info->out_reqs, opos);
+ ARR_APP1(arch_register_req_t const*, info->out_reqs, oreq);
+}
+
ir_node *be_make_asm(ir_node const *node, be_asm_info_t const *info, void *operands);
typedef void be_emit_asm_operand_func(ir_node const *asmn, char modifier, unsigned pos);