Commit ed63710b authored by Christoph Mallon's avatar Christoph Mallon
Browse files

amd64, ia32: Check for must_be_same copies for be_Asm.

parent c3729497
libFirm 1.22.1 (2016-01-07)
---------------------------
* Fix cmake/make build
* Bugfixes
libFirm 1.22.0 (2015-12-31)
---------------------------
......
......@@ -237,7 +237,7 @@ static void amd64_finish_irg_walker(ir_node *const block, void *const env)
/* Insert copies for should_be_same constraints. */
sched_foreach_safe(block, irn) {
if (is_amd64_irn(irn))
if (is_amd64_irn(irn) || be_is_Asm(irn))
assure_should_be_same_requirements(irn);
}
}
......
......@@ -206,14 +206,17 @@ static void ia32_transform_ShlD_to_ShrD_imm(ir_node *const irn)
static inline int need_constraint_copy(ir_node *irn)
{
/* TODO this should be determined from the node specification */
switch (get_ia32_irn_opcode(irn)) {
if (is_ia32_irn(irn)) {
switch (get_ia32_irn_opcode(irn)) {
case iro_ia32_Lea:
case iro_ia32_Minus64:
return 0;
default:
return 1;
}
}
return be_is_Asm(irn);
}
/**
......@@ -354,12 +357,10 @@ static void ia32_finish_irg_walker(ir_node *block, void *env)
/* second: insert copies and finish irg */
sched_foreach_safe(block, irn) {
if (is_ia32_irn(irn)) {
/* some nodes are just a bit less efficient, but need no fixing if the
* should be same requirement is not fulfilled */
if (need_constraint_copy(irn))
assure_should_be_same_requirements(irn);
}
/* some nodes are just a bit less efficient, but need no fixing if the
* should be same requirement is not fulfilled */
if (need_constraint_copy(irn))
assure_should_be_same_requirements(irn);
}
}
......
Markdown is supported
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