Commit 2f8553d9 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

bescripts: Remove unused features and stale uses of gone features.

parent 2b84102b
......@@ -74,14 +74,8 @@ $mode_fpcw = "ia32_mode_fpcw";
BRANCH => [ 1, "BRANCH1", "BRANCH2" ],
); # %cpu
%vliw = (
bundle_size => 1,
bundels_per_cycle => 1
); # vliw
$default_op_attr_type = "ia32_op_attr_t";
$default_attr_type = "ia32_attr_t";
$default_copy_attr = "ia32_copy_attr";
$default_attr_type = "ia32_attr_t";
$default_copy_attr = "ia32_copy_attr";
sub ia32_custom_init_attr {
my $constr = shift;
......
......@@ -33,7 +33,6 @@ our $arch;
our %nodes;
our %emit_templates;
our $finish_line_template = "be_emit_finish_line_gas(node);";
our $indent_line_func;
my $return;
......@@ -60,11 +59,7 @@ sub create_emitter {
our %emit_templates;
our $arch;
if (!defined($indent_line_func)) {
$template = "\\t" . $template;
} else {
push(@{$result}, "${indent}${indent_line_func};\n");
}
$template = "\\t" . $template;
my @tokens = ($template =~ m/(?:[^%]|%%)+|\%[a-zA-Z_][a-zA-Z0-9_]*|%\./g);
for (@tokens) {
......
......@@ -29,15 +29,9 @@ use Data::Dumper;
my $specfile = $ARGV[0];
my $target_dir = $ARGV[1];
my $state = 1;
my $cur_op = "";
my $line_nr = 0;
our $arch;
our $additional_opcodes;
our %nodes;
our %cpu;
our $default_op_attr_type;
our $default_attr_type;
our $default_cmp_attr;
our $default_copy_attr;
......@@ -91,7 +85,6 @@ my @obst_new_irop; # stack for the new_ir_op calls
my @obst_free_irop; # stack for free_ir_op calls
my @obst_enum_op; # stack for creating the <arch>_opcode enum
my $obst_header; # stack for function prototypes
my @obst_is_archirn; # stack for the is_$arch_irn() function
my @obst_cmp_attr; # stack for the compare attribute functions
my $obst_proj = ""; # stack for the pn_ numbers
my $orig_op;
......@@ -128,9 +121,6 @@ foreach my $class_name (keys(%reg_classes)) {
}
# for registering additional opcodes
$n_opcodes += $additional_opcodes if (defined($additional_opcodes));
$obst_header .= "void ${arch}_create_opcodes(const arch_irn_ops_t *be_ops);\n";
$obst_header .= "void ${arch}_free_opcodes(void);\n";
......@@ -540,8 +530,6 @@ foreach my $op (keys(%nodes)) {
push(@obst_get_opvar, "ir_op *get_op_$op(void) { return op_$op; }\n");
push(@obst_get_opvar, "int is_$op(const ir_node *n) { return get_$arch\_irn_opcode(n) == iro_$op; }\n\n");
push(@obst_is_archirn, "is_$op(node)");
$obst_header .= <<EOF;
extern ir_op *op_${op};
ir_op *get_op_${op}(void);
......@@ -685,10 +673,8 @@ EOF
$obst_header .= "\n";
}
push(@obst_enum_op, "\tiro_$arch\_last_generated,\n");
push(@obst_enum_op, "\tiro_$arch\_last = iro_$arch\_last_generated");
push(@obst_enum_op, " + $additional_opcodes") if (defined($additional_opcodes));
push(@obst_enum_op, "\n} $arch\_opcodes;\n\n");
push(@obst_enum_op, "\tiro_$arch\_last\n");
push(@obst_enum_op, "} $arch\_opcodes;\n\n");
# emit the code
......@@ -796,10 +782,7 @@ ENDOFMAIN
print OUT @obst_new_irop;
print OUT "\n";
print OUT "\t$arch\_register_additional_opcodes(cur_opcode);\n" if (defined($additional_opcodes));
print OUT "\t$arch\_opcode_end = cur_opcode + iro_$arch\_last";
print OUT " + $additional_opcodes" if (defined($additional_opcodes));
print OUT ";\n";
print OUT "\t$arch\_opcode_end = cur_opcode + iro_$arch\_last;\n";
print OUT <<ENDOFMAIN;
}
......
......@@ -32,7 +32,6 @@ my $target_dir = $ARGV[1];
our $arch;
our %reg_classes;
our %cpu;
# include spec file
......@@ -58,14 +57,12 @@ sub map_flags {
# stacks for output
my $regtypes_def; # stack for the register type variables definitions
my $regtypes_decl;# stack for the register type variables declarations
my @regclasses; # stack for the register class variables
my $classdef; # stack to define a name for a class index
my $regdef; # stack to define a name for a register index
my $regdef2;
my $regcounts;
my $reginit; # stack for the register type inits
my $single_constraints_decls;
my $single_constraints;
my $class_ptr;
......
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