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
26e41222
Commit
26e41222
authored
Oct 29, 2012
by
Matthias Braun
Browse files
fix bad input register requirements
some inputs had "no requirement" set instead of the correct one
parent
e0363056
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/benode.c
View file @
26e41222
...
@@ -241,10 +241,10 @@ static void init_node_attr(ir_node *node, int n_inputs, int n_outputs)
...
@@ -241,10 +241,10 @@ static void init_node_attr(ir_node *node, int n_inputs, int n_outputs)
}
}
}
}
static
void
add_register_req_in
(
ir_node
*
node
)
static
void
add_register_req_in
(
ir_node
*
node
,
const
arch_register_req_t
*
req
)
{
{
backend_info_t
*
info
=
be_get_info
(
node
);
backend_info_t
*
info
=
be_get_info
(
node
);
ARR_APP1
(
const
arch_register_req_t
*
,
info
->
in_reqs
,
arch_no_register_
req
);
ARR_APP1
(
const
arch_register_req_t
*
,
info
->
in_reqs
,
req
);
}
}
ir_node
*
be_new_Spill
(
const
arch_register_class_t
*
cls
,
ir_node
*
be_new_Spill
(
const
arch_register_class_t
*
cls
,
...
@@ -461,8 +461,11 @@ ir_node *be_new_Keep(ir_node *block, int n, ir_node *in[])
...
@@ -461,8 +461,11 @@ ir_node *be_new_Keep(ir_node *block, int n, ir_node *in[])
attr
->
exc
.
pin_state
=
op_pin_state_pinned
;
attr
->
exc
.
pin_state
=
op_pin_state_pinned
;
for
(
i
=
0
;
i
<
n
;
++
i
)
{
for
(
i
=
0
;
i
<
n
;
++
i
)
{
add_irn_n
(
res
,
in
[
i
]);
ir_node
*
pred
=
in
[
i
];
add_register_req_in
(
res
);
add_irn_n
(
res
,
pred
);
const
arch_register_req_t
*
req
=
arch_get_irn_register_req
(
pred
);
req
=
req
->
cls
!=
NULL
?
req
->
cls
->
class_req
:
arch_no_register_req
;
add_register_req_in
(
res
,
req
);
}
}
keep_alive
(
res
);
keep_alive
(
res
);
...
@@ -471,12 +474,9 @@ ir_node *be_new_Keep(ir_node *block, int n, ir_node *in[])
...
@@ -471,12 +474,9 @@ ir_node *be_new_Keep(ir_node *block, int n, ir_node *in[])
void
be_Keep_add_node
(
ir_node
*
keep
,
const
arch_register_class_t
*
cls
,
ir_node
*
node
)
void
be_Keep_add_node
(
ir_node
*
keep
,
const
arch_register_class_t
*
cls
,
ir_node
*
node
)
{
{
int
n
;
assert
(
be_is_Keep
(
keep
));
assert
(
be_is_Keep
(
keep
));
n
=
add_irn_n
(
keep
,
node
);
add_irn_n
(
keep
,
node
);
add_register_req_in
(
keep
);
add_register_req_in
(
keep
,
cls
->
class_req
);
be_node_set_reg_class_in
(
keep
,
n
,
cls
);
}
}
ir_node
*
be_new_Call
(
dbg_info
*
dbg
,
ir_graph
*
irg
,
ir_node
*
bl
,
ir_node
*
mem
,
ir_node
*
be_new_Call
(
dbg_info
*
dbg
,
ir_graph
*
irg
,
ir_node
*
bl
,
ir_node
*
mem
,
...
@@ -730,6 +730,12 @@ ir_node *be_new_CopyKeep(ir_node *bl, ir_node *src, int n, ir_node *in_keep[])
...
@@ -730,6 +730,12 @@ ir_node *be_new_CopyKeep(ir_node *bl, ir_node *src, int n, ir_node *in_keep[])
attr
->
exc
.
pin_state
=
op_pin_state_floats
;
attr
->
exc
.
pin_state
=
op_pin_state_floats
;
be_node_set_reg_class_in
(
irn
,
0
,
cls
);
be_node_set_reg_class_in
(
irn
,
0
,
cls
);
be_node_set_reg_class_out
(
irn
,
0
,
cls
);
be_node_set_reg_class_out
(
irn
,
0
,
cls
);
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
ir_node
*
pred
=
in_keep
[
i
];
const
arch_register_req_t
*
req
=
arch_get_irn_register_req
(
pred
);
req
=
req
->
cls
!=
NULL
?
req
->
cls
->
class_req
:
arch_no_register_req
;
be_set_constr_in
(
irn
,
i
+
1
,
req
);
}
return
irn
;
return
irn
;
}
}
...
...
ir/be/ia32/ia32_common_transform.c
View file @
26e41222
...
@@ -536,6 +536,7 @@ ir_node *ia32_gen_ASM(ir_node *node)
...
@@ -536,6 +536,7 @@ ir_node *ia32_gen_ASM(ir_node *node)
if
(
parsed_constraint
.
cls
==
NULL
if
(
parsed_constraint
.
cls
==
NULL
&&
parsed_constraint
.
same_as
<
0
)
{
&&
parsed_constraint
.
same_as
<
0
)
{
is_memory_op
=
1
;
is_memory_op
=
1
;
in_reg_reqs
[
i
]
=
ia32_reg_classes
[
CLASS_ia32_gp
].
class_req
;
}
else
if
(
parsed_constraint
.
memory_possible
)
{
}
else
if
(
parsed_constraint
.
memory_possible
)
{
/* TODO: match Load or Load/Store if memory possible is set */
/* TODO: match Load or Load/Store if memory possible is set */
}
}
...
...
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