Commit 418806b2 authored by Matthias Braun's avatar Matthias Braun
Browse files

jumps have a special irn flag now so beirgmod can identify them

[r26648]
parent 710a6adb
......@@ -2,8 +2,6 @@
# $Id$
# This is a template specification for the Firm-Backend
$new_emit_syntax = 1;
# the cpu architecture (ia32, ia64, mips, sparc, ppc, ...)
$arch = "TEMPLATE";
......@@ -320,10 +318,11 @@ Const => {
# Control Flow
Jmp => {
state => "pinned",
op_flags => "X",
reg_req => { out => [ "none" ] },
mode => "mode_X",
state => "pinned",
op_flags => "X",
irn_flags => "J",
reg_req => { out => [ "none" ] },
mode => "mode_X",
},
# Load / Store
......
......@@ -47,6 +47,7 @@ typedef enum arch_irn_flags_t {
arch_irn_flags_dont_spill = 1U << 0, /**< This must not be spilled. */
arch_irn_flags_rematerializable = 1U << 1, /**< This can be replicated instead of spilled/reloaded. */
arch_irn_flags_modify_flags = 1U << 2, /**< I modify flags. */
arch_irn_flags_simple_jump = 1U << 3, /**< a simple jump instruction */
} arch_irn_flags_t;
typedef struct _be_lv_t be_lv_t;
......
......@@ -164,7 +164,8 @@ static void remove_empty_block(ir_node *block)
goto check_preds;
sched_foreach(block, node) {
if (! is_Jmp(node))
if (! is_Jmp(node)
&& !(arch_irn_get_flags(node) & arch_irn_flags_simple_jump))
goto check_preds;
if (jump != NULL) {
/* we should never have 2 jumps in a block */
......
......@@ -4,7 +4,6 @@
use File::Basename;
$new_emit_syntax = 1;
my $myname = $0;
# the cpu architecture (ia32, ia64, mips, sparc, ppc, ...)
......@@ -1193,12 +1192,13 @@ SwitchJmp => {
},
Jmp => {
state => "pinned",
op_flags => "X",
reg_req => { out => [ "none" ] },
latency => 1,
units => [ "BRANCH" ],
mode => "mode_X",
state => "pinned",
irn_flags => "J",
op_flags => "X",
reg_req => { out => [ "none" ] },
latency => 1,
units => [ "BRANCH" ],
mode => "mode_X",
},
IJmp => {
......
......@@ -5,7 +5,6 @@
# the cpu architecture (ia32, ia64, mips, sparc, ppc, ...)
$arch = "mips";
$new_emit_syntax = 1;
# register types:
# 0 - no special type
......
......@@ -5,7 +5,6 @@
# the cpu architecture (ia32, ia64, mips, sparc, ppc32, ...)
$arch = "ppc32";
$new_emit_syntax = 1;
# register types:
# 0 - no special type
......
......@@ -37,7 +37,7 @@ our $arch;
our $comment_string = "/*";
our $comment_string_end = "*/" ;
our %nodes;
our $new_emit_syntax = 0;
our $new_emit_syntax = 1;
# include spec file
......
......@@ -505,6 +505,8 @@ EOF
$temp .= "\tflags |= arch_irn_flags_rematerializable;\n";
} elsif ($flag eq "N") {
$temp .= "\tflags |= arch_irn_flags_dont_spill;\n";
} elsif ($flag eq "J") {
$temp .= "\t flags |= arch_irn_flags_simple_jump;\n";
} else {
die "Fatal error: unknown flag $flag for ${op}\n";
}
......
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