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

HACK: Prevent folding reload AM when the node already has a "real" memory...

HACK: Prevent folding reload AM when the node already has a "real" memory input.  This should fix 176.gcc

[r22655]
parent a676ad45
...@@ -832,7 +832,9 @@ static int ia32_possible_memory_operand(const ir_node *irn, unsigned int i) ...@@ -832,7 +832,9 @@ static int ia32_possible_memory_operand(const ir_node *irn, unsigned int i)
return 0; return 0;
case ia32_am_unary: case ia32_am_unary:
return i == n_ia32_unary_op; if (i != n_ia32_unary_op)
return 0;
break;
case ia32_am_binary: case ia32_am_binary:
switch (i) { switch (i) {
...@@ -847,20 +849,27 @@ static int ia32_possible_memory_operand(const ir_node *irn, unsigned int i) ...@@ -847,20 +849,27 @@ static int ia32_possible_memory_operand(const ir_node *irn, unsigned int i)
req = get_ia32_in_req(irn, n_ia32_binary_left); req = get_ia32_in_req(irn, n_ia32_binary_left);
if (req->type & arch_register_req_type_limited) if (req->type & arch_register_req_type_limited)
return 0; return 0;
break;
return 1;
} }
case n_ia32_binary_right: case n_ia32_binary_right:
return 1; break;
default: default:
return 0; return 0;
} }
break;
default: default:
panic("Unknown AM type"); panic("Unknown AM type");
} }
/* HACK: must not already use "real" memory.
* This can happen for Call and Div */
if (!is_NoMem(get_irn_n(irn, n_ia32_mem)))
return 0;
return 1;
} }
static void ia32_perform_memory_operand(ir_node *irn, ir_node *spill, static void ia32_perform_memory_operand(ir_node *irn, ir_node *spill,
......
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