Commit ba8c08bb authored by Matthias Braun's avatar Matthias Braun
Browse files

fix fehler39, exchange left/right is no good idea after register allocation...

fix fehler39, exchange left/right is no good idea after register allocation occured on cosntrained nodes

[r15020]
parent 689eae09
......@@ -805,14 +805,28 @@ static int ia32_possible_memory_operand(const void *self, const ir_node *irn, un
! (get_ia32_am_support(irn) & ia32_am_Source) || /* must be capable of source addressmode */
! ia32_is_spillmode_compatible(mode, spillmode) ||
(i != 2 && i != 3) || /* a "real" operand position must be requested */
(i == 2 && ! is_ia32_commutative(irn)) || /* if first operand requested irn must be commutative */
is_ia32_use_frame(irn)) /* must not already use frame */
return 0;
if(i == 2) {
const arch_register_req_t *req;
if(!is_ia32_commutative(irn))
return 0;
/* we can't swap left/right for limited registers
* (As this (currently) breaks constraint handling copies)
*/
req = get_ia32_in_req(irn, 2);
if(req->type & arch_register_req_type_limited) {
return 0;
}
}
return 1;
}
static void ia32_perform_memory_operand(const void *self, ir_node *irn, ir_node *spill, unsigned int i) {
static void ia32_perform_memory_operand(const void *self, ir_node *irn,
ir_node *spill, unsigned int i)
{
const ia32_irn_ops_t *ops = self;
ia32_code_gen_t *cg = ops->cg;
......
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