use arch_emitf for emit lines without dot prefix
authorMatthias Braun <matthias.braun@kit.edu>
Wed, 18 Jul 2012 12:09:33 +0000 (14:09 +0200)
committerMatthias Braun <matthias.braun@kit.edu>
Wed, 18 Jul 2012 12:09:33 +0000 (14:09 +0200)
ir/be/scripts/generate_emitter_new.pl

index f1d9b63..1ffc8fb 100755 (executable)
@@ -107,11 +107,13 @@ foreach my $op (keys(%nodes)) {
 
        foreach my $template (@emit) {
                # substitute only lines, starting with a '.'
-               if ($template =~ /^(\s*)\.\s*(.*)/) {
+               if ($template eq '') {
+                       # nothing
+               } elsif ($template =~ /^(\s*)\.\s*(.*)/) {
                        my $indent = "\t$1";
                        create_emitter(\@obst_func, $indent, $2);
                } else {
-                       push(@obst_func, "\t$template\n");
+                       push(@obst_func, "\t${arch}_emitf(node, \"$template\");\n");
                }
        }