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

ia32: Repair ClimbFrame.

parent 6e66bcfb
......@@ -1342,14 +1342,11 @@ static void emit_ia32_ClimbFrame(const ir_node *node)
ia32_emitf(node, "movl %S0, %D0");
ia32_emitf(node, "movl $%u, %S1", attr->count);
be_gas_emit_block_name(node);
be_emit_cstring(":\n");
be_emit_cstring("0:\n");
be_emit_write_line();
ia32_emitf(node, "movl (%D0), %D0");
ia32_emitf(node, "dec %S1");
be_emit_cstring("\tjnz ");
be_gas_emit_block_name(node);
be_emit_finish_line_gas(node);
ia32_emitf(node, "jnz 0b");
}
static void emit_be_Return(const ir_node *node)
......
......@@ -4721,10 +4721,10 @@ static ir_node *gen_debugbreak(ir_node *node)
static ir_node *gen_return_address(ir_node *node)
{
ir_node *param = get_Builtin_param(node, 0);
ir_node *frame = get_Builtin_param(node, 1);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *ptr = be_transform_node(frame);
ir_graph *irg = get_irn_irg(node);
ir_node *ptr = get_irg_frame(irg);
ir_tarval *tv = get_Const_tarval(param);
unsigned long value = get_tarval_long(tv);
if (value > 0) {
......@@ -4740,7 +4740,6 @@ static ir_node *gen_return_address(ir_node *node)
set_ia32_op_type(load, ia32_AddrModeS);
set_ia32_ls_mode(load, ia32_mode_gp);
ir_graph *irg = get_irn_irg(node);
set_ia32_am_offs_int(load, 0);
set_ia32_use_frame(load);
set_ia32_frame_ent(load, ia32_get_return_address_entity(irg));
......@@ -4762,12 +4761,11 @@ static ir_node *gen_return_address(ir_node *node)
static ir_node *gen_frame_address(ir_node *node)
{
ir_node *param = get_Builtin_param(node, 0);
ir_node *frame = get_Builtin_param(node, 1);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_tarval *tv = get_Const_tarval(param);
ir_graph *irg = get_irn_irg(node);
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *ptr = be_transform_node(frame);
ir_node *ptr = get_irg_frame(irg);
unsigned long value = get_tarval_long(tv);
if (value > 0) {
ir_node *cnt = new_bd_ia32_ProduceVal(dbgi, block);
......
Supports Markdown
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