Commit 39eb7f19 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

arm: Implement computed goto.

This fixes C/gnu99/combo_load_mode.c, C/gnu99/computed_goto.c, C/gnu99/ijmp.c, C/gnu99/vlabel2.c and C/gnu99/vlabel3.c.
parent 762a36f9
...@@ -35,6 +35,7 @@ libFirm 1.22.1 (2016-01-07) ...@@ -35,6 +35,7 @@ libFirm 1.22.1 (2016-01-07)
* amd64: Improve use of `lea` in instruction selection * amd64: Improve use of `lea` in instruction selection
* sparc: Support the asm constaint `K` * sparc: Support the asm constaint `K`
* sparc: Support computed goto * sparc: Support computed goto
* arm: Support computed goto
* Bugfixes * Bugfixes
libFirm 1.22.0 (2015-12-31) libFirm 1.22.0 (2015-12-31)
......
...@@ -486,6 +486,16 @@ Jmp => { ...@@ -486,6 +486,16 @@ Jmp => {
out_reqs => [ "exec" ], out_reqs => [ "exec" ],
}, },
IJmp => {
op_flags => [ "cfopcode", "forking" ],
state => "pinned",
in_reqs => [ "gp" ],
ins => [ "target" ],
out_reqs => [ "exec" ],
outs => [ "jmp" ],
emit => "mov pc, %S0",
},
SwitchJmp => { SwitchJmp => {
op_flags => [ "cfopcode", "forking" ], op_flags => [ "cfopcode", "forking" ],
state => "pinned", state => "pinned",
......
...@@ -1187,6 +1187,15 @@ static ir_node *gen_Store(ir_node *node) ...@@ -1187,6 +1187,15 @@ static ir_node *gen_Store(ir_node *node)
return new_store; return new_store;
} }
static ir_node *gen_IJmp(ir_node *const node)
{
dbg_info *const dbgi = get_irn_dbg_info(node);
ir_node *const block = be_transform_nodes_block(node);
ir_node *const target = get_IJmp_target(node);
ir_node *const new_target = be_transform_node(target);
return new_bd_arm_IJmp(dbgi, block, new_target);
}
static ir_node *gen_Jmp(ir_node *node) static ir_node *gen_Jmp(ir_node *node)
{ {
ir_node *new_block = be_transform_nodes_block(node); ir_node *new_block = be_transform_nodes_block(node);
...@@ -1971,6 +1980,7 @@ static void arm_register_transformers(void) ...@@ -1971,6 +1980,7 @@ static void arm_register_transformers(void)
be_set_transform_function(op_Conv, gen_Conv); be_set_transform_function(op_Conv, gen_Conv);
be_set_transform_function(op_Div, gen_Div); be_set_transform_function(op_Div, gen_Div);
be_set_transform_function(op_Eor, gen_Eor); be_set_transform_function(op_Eor, gen_Eor);
be_set_transform_function(op_IJmp, gen_IJmp);
be_set_transform_function(op_Jmp, gen_Jmp); be_set_transform_function(op_Jmp, gen_Jmp);
be_set_transform_function(op_Load, gen_Load); be_set_transform_function(op_Load, gen_Load);
be_set_transform_function(op_Member, gen_Member); be_set_transform_function(op_Member, gen_Member);
......
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