projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d6de554
)
support empty emitter (in contrast to no emitter if you don't specify anything)
author
Matthias Braun
<matze@braunis.de>
Thu, 8 Feb 2007 11:40:26 +0000
(11:40 +0000)
committer
Matthias Braun
<matze@braunis.de>
Thu, 8 Feb 2007 11:40:26 +0000
(11:40 +0000)
ir/be/scripts/generate_emitter.pl
patch
|
blob
|
history
diff --git
a/ir/be/scripts/generate_emitter.pl
b/ir/be/scripts/generate_emitter.pl
index
7edb847
..
6fe175f
100755
(executable)
--- a/
ir/be/scripts/generate_emitter.pl
+++ b/
ir/be/scripts/generate_emitter.pl
@@
-43,14
+43,21
@@
foreach my $op (keys(%nodes)) {
my %n = %{ $nodes{"$op"} };
# skip this node description if no emit information is available
my %n = %{ $nodes{"$op"} };
# skip this node description if no emit information is available
- next if (!
$n{"emit"} || length($n{"emit"}) < 1
);
+ next if (!
defined($n{"emit"})
);
$line = "static void emit_".$arch."_".$op."(const ir_node *n, $arch\_emit_env_t *env)";
$line = "static void emit_".$arch."_".$op."(const ir_node *n, $arch\_emit_env_t *env)";
+
+ push(@obst_register, " BE_EMIT($op);\n");
+
+ if($n{"emit"} eq "") {
+ push(@obst_func, $line." {\n");
+ push(@obst_func, "}\n\n");
+ next;
+ }
+
push(@obst_func, $line." {\n FILE *F = env->out;\n");
push(@obst_func, " char cmd_buf[256], cmnt_buf[256];\n");
push(@obst_func, " const lc_arg_env_t *arg_env = $arch\_get_arg_env();\n\n");
push(@obst_func, $line." {\n FILE *F = env->out;\n");
push(@obst_func, " char cmd_buf[256], cmnt_buf[256];\n");
push(@obst_func, " const lc_arg_env_t *arg_env = $arch\_get_arg_env();\n\n");
- push(@obst_register, " BE_EMIT($op);\n");
-
my @emit = split(/\n/, $n{"emit"});
foreach my $template (@emit) {
my @emit = split(/\n/, $n{"emit"});
foreach my $template (@emit) {