Commit b8a5aa74 authored by yb9976's avatar yb9976
Browse files

added support for ASM nodes

[r20728]
parent 29bb6875
......@@ -3636,29 +3636,9 @@ static ir_node *create_immediate_or_transform(ir_node *node,
return new_node;
}
static const arch_register_req_t no_register_req = {
arch_register_req_type_none,
NULL, /* regclass */
NULL, /* limit bitset */
0, /* same pos */
0 /* different pos */
};
/**
* An assembler constraint.
*/
typedef struct constraint_t constraint_t;
struct constraint_t {
int is_in;
int n_outs;
const arch_register_req_t **out_reqs;
const arch_register_req_t *req;
unsigned immediate_possible;
char immediate_type;
};
static void parse_asm_constraint(int pos, constraint_t *constraint, const char *c)
void parse_asm_constraint(int pos, constraint_t *constraint, const char *c)
{
int immediate_possible = 0;
char immediate_type = 0;
......@@ -3931,7 +3911,7 @@ const arch_register_t *ia32_get_clobber_register(const char *clobber)
return reg;
}
static void parse_clobber(ir_node *node, int pos, constraint_t *constraint,
void parse_clobber(ir_node *node, int pos, constraint_t *constraint,
const char *clobber)
{
ir_graph *irg = get_irn_irg(node);
......
......@@ -54,6 +54,28 @@ typedef enum {
ia32_known_const_max /**< last constant */
} ia32_known_const_t;
static const arch_register_req_t no_register_req = {
arch_register_req_type_none,
NULL, /* regclass */
NULL, /* limit bitset */
0, /* same pos */
0 /* different pos */
};
/**
* An assembler constraint.
*/
typedef struct constraint_t constraint_t;
struct constraint_t {
int is_in;
int n_outs;
const arch_register_req_t **out_reqs;
const arch_register_req_t *req;
unsigned immediate_possible;
char immediate_type;
};
/**
* Generate a known floating point constant
*/
......@@ -76,6 +98,10 @@ ir_type *ia32_get_prim_type(pmap *types, ir_mode *mode);
*/
int ia32_mode_needs_gp_reg(ir_mode *mode);
void parse_asm_constraint(int pos, constraint_t *constraint, const char *c);
void parse_clobber(ir_node *node, int pos, constraint_t *constraint,
const char *clobber);
/**
* returns register by name (used for determining clobber specifications in
* asm instructions)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment