path: root/ir/be/beasm.h
diff options
authorChristoph Mallon <>2015-05-25 09:18:05 +0200
committerChristoph Mallon <>2015-05-29 17:35:22 +0200
commit78087bf56678564f6a7c6d47e6cc0fd5a8aaf123 (patch)
treeb9ff113b59c0344e953cb908769d15e704ae07f3 /ir/be/beasm.h
parent3c223b1bccb2c2fd7c0770778ccb41d9b1e89852 (diff)
be: Factorise code to parse asm constraints.
* This also resolves an out-of-bounds access when a '#' is encountered. * This also corrects a wrong format specifier in a panic message in the x86 backend.
Diffstat (limited to 'ir/be/beasm.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/ir/be/beasm.h b/ir/be/beasm.h
index 422ead5..a8273a0 100644
--- a/ir/be/beasm.h
+++ b/ir/be/beasm.h
@@ -28,6 +28,10 @@ typedef struct 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 parse_constraint_letter_func_t(void const *env, be_asm_constraint_t*, char l);
+void be_parse_asm_constraints_internal(be_asm_constraint_t *constraint, ident *constraint_text, bool is_output, parse_constraint_letter_func_t *parse_constraint_letter, void const *env);
typedef void be_emit_asm_operand_func(ir_node const *asmn, char modifier, unsigned pos);
void be_emit_asm(ir_node const *asmn, ident *text, unsigned n_operands, be_emit_asm_operand_func *emit_asm_operand);