Commit 0b6dc89b authored by Christoph Mallon's avatar Christoph Mallon
Browse files

template: Consistently use the order mem, ptr, val for nodes accessing memory.

* This corrects the requirements of fStore.
parent 83a74d1a
......@@ -226,19 +226,21 @@ Load => {
op_flags => [ "uses_memory" ],
irn_flags => [ "rematerializable" ],
state => "exc_pinned",
reg_req => { in => [ "gp", "none" ], out => [ "gp", "none" ] },
reg_req => { in => [ "none", "gp" ], out => [ "gp", "none" ] },
ins => [ "mem", "ptr" ],
outs => [ "res", "M" ],
emit => '%D0 = load (%S0)',
emit => '%D0 = load (%S1)',
},
Store => {
op_flags => [ "uses_memory" ],
irn_flags => [ "rematerializable" ],
state => "exc_pinned",
reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] },
reg_req => { in => [ "none", "gp", "gp" ], out => [ "none" ] },
ins => [ "mem", "ptr", "val" ],
outs => [ "M" ],
mode => "mode_M",
emit => 'store %S0 -> (%S1)',
emit => '(%S1) = store %S2',
},
# Floating Point operations
......@@ -290,19 +292,21 @@ fLoad => {
op_flags => [ "uses_memory" ],
irn_flags => [ "rematerializable" ],
state => "exc_pinned",
reg_req => { in => [ "gp", "none" ], out => [ "fp", "none" ] },
reg_req => { in => [ "none", "gp" ], out => [ "fp", "none" ] },
ins => [ "mem", "ptr" ],
outs => [ "res", "M" ],
emit => '%D0 = fload (%S0)',
emit => '%D0 = fload (%S1)',
},
fStore => {
op_flags => [ "uses_memory" ],
irn_flags => [ "rematerializable" ],
state => "exc_pinned",
reg_req => { in => [ "gp", "fp", "none" ], out => [ "none" ] },
reg_req => { in => [ "none", "gp", "fp" ], out => [ "none" ] },
ins => [ "mem", "ptr", "val" ],
outs => [ "M" ],
mode => "mode_M",
emit => 'fstore %S0 -> (%S1)',
emit => '(%S1) = fstore %S2',
},
);
......@@ -186,9 +186,9 @@ static ir_node *gen_Load(ir_node *node)
ir_mode *mode = get_Load_mode(node);
if (mode_is_float(mode)) {
return new_bd_TEMPLATE_fLoad(dbgi, new_block, new_ptr, new_mem);
return new_bd_TEMPLATE_fLoad(dbgi, new_block, new_mem, new_ptr);
}
return new_bd_TEMPLATE_Load(dbgi, new_block, new_ptr, new_mem);
return new_bd_TEMPLATE_Load(dbgi, new_block, new_mem, new_ptr);
}
static ir_node *gen_Store(ir_node *node)
......@@ -205,9 +205,9 @@ static ir_node *gen_Store(ir_node *node)
ir_mode *mode = get_irn_mode(node);
if (mode_is_float(mode)) {
return new_bd_TEMPLATE_fStore(dbgi, new_block, new_val, new_ptr, new_mem);
return new_bd_TEMPLATE_fStore(dbgi, new_block, new_mem, new_ptr, new_val);
}
return new_bd_TEMPLATE_Store(dbgi, new_block, new_val, new_ptr, new_mem);
return new_bd_TEMPLATE_Store(dbgi, new_block, new_mem, new_ptr, new_val);
}
static ir_node *gen_Jmp(ir_node *node)
......
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