Commit 8d00fec2 authored by yb9976's avatar yb9976
Browse files

Make generator scripts more deterministic.

parent 2c5bde40
......@@ -36,7 +36,7 @@ my $obst_func = ""; # buffer for the emit functions
my $obst_register = ""; # buffer for emitter register code
foreach my $op (keys(%nodes)) {
foreach my $op (sort(keys(%nodes))) {
my %n = %{ $nodes{"$op"} };
# skip this node description if no emit information is available
......
......@@ -76,7 +76,7 @@ my %reg2class = ();
my %regclass2len = ();
# build register->class hashes
foreach my $class_name (keys(%reg_classes)) {
foreach my $class_name (sort(keys(%reg_classes))) {
my @class = @{ $reg_classes{"$class_name"} };
my $old_classname = $class_name;
......@@ -441,7 +441,7 @@ my @node_attrs = (
);
$obst_enum_op .= "typedef enum ${arch}_opcodes {\n";
foreach my $op (keys(%nodes)) {
foreach my $op (sort(keys(%nodes))) {
my %n = %{ $nodes{"$op"} };
my $known_mode;
my $num_outs = 0;
......@@ -579,7 +579,7 @@ EOF
%constructors = ( "" => \%constructor );
}
foreach my $constr (keys(%constructors)) {
foreach my $constr (sort(keys(%constructors))) {
my %cstr = %{ $constructors{$constr} };
# Copy some values from outer node if they don't exists in the constr
foreach my $a (@node_attrs) {
......
......@@ -59,7 +59,7 @@ my %reg2class = ();
$classdef .= "enum reg_classes {\n";
foreach my $class_name (keys(%reg_classes)) {
foreach my $class_name (sort(keys(%reg_classes))) {
my @class = @{ $reg_classes{"$class_name"} };
my $idx = 0;
......@@ -108,7 +108,7 @@ sub get_limited_array {
}
# generate register type and class variable, init function and default requirements
foreach my $class_name (keys(%reg_classes)) {
foreach my $class_name (sort(keys(%reg_classes))) {
my @class = @{ $reg_classes{"$class_name"} };
my $old_classname = $class_name;
......
Markdown is supported
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