Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
b8a5aa74
Commit
b8a5aa74
authored
Jul 28, 2008
by
yb9976
Browse files
added support for ASM nodes
[r20728]
parent
29bb6875
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_transform.c
View file @
b8a5aa74
...
...
@@ -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
);
...
...
ir/be/ia32/ia32_transform.h
View file @
b8a5aa74
...
...
@@ -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)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment