summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beasm.h
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-05-25 07:41:56 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-05-29 17:35:21 +0200
commitf39784c738cd828ba18c6f274eb3eee8876caff4 (patch)
treeb6238811786b148d717a9a73db3523c7ac7704dd /ir/be/beasm.h
parenta6da8020942bb5b8ebc7e3d357aad0a21922a11d (diff)
be: Factorise code to make a register requirement for an asm operand.
Now we get a nice abort instead of silently generating invalid code, when a sparc immediate constraint cannot be fulfilled.
Diffstat (limited to 'ir/be/beasm.h')
-rw-r--r--ir/be/beasm.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/ir/be/beasm.h b/ir/be/beasm.h
index 4595f49..422ead5 100644
--- a/ir/be/beasm.h
+++ b/ir/be/beasm.h
@@ -10,7 +10,23 @@
#ifndef FIRM_BE_BEASM_H
#define FIRM_BE_BEASM_H
+#include "be_types.h"
#include "firm_types.h"
+#include "obstack.h"
+
+/**
+ * An assembler constraint.
+ */
+typedef struct be_asm_constraint_t {
+ arch_register_class_t const *cls;
+ unsigned allowed_registers;
+ bool all_registers_allowed;
+ bool memory_possible;
+ char immediate_type;
+ int same_as;
+} be_asm_constraint_t;
+
+arch_register_req_t const *be_make_register_req(struct obstack *obst, be_asm_constraint_t const *c, int n_outs, arch_register_req_t const **out_reqs, int pos);
typedef void be_emit_asm_operand_func(ir_node const *asmn, char modifier, unsigned pos);