summaryrefslogtreecommitdiff
path: root/linux/sparc/gen.pl
blob: 1a320ee65a81d10d3c0b407d555ad9e34c5d64d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
open SPARC, "syscallent.h" || die "no puedo abrir el de la sparc";
open ALPHA, "../alpha/syscallent.h" || die "no puedo abrir el de la alpha";
open PC, "../syscallent.h" || die "no puedo abrir PC\n";

while (<SPARC>) {
    chop;
    ($i1, $i2, $i3, $syscall, $syscall_name) = split;
    $strn[$index]   = $syscall_name;
    $name[$index++] = $syscall;
}

while (<ALPHA>){
    if (/\{/) {
	($i1, $n, $pr, $syscall) = split;
	$par{$syscall} = $n;
	$prr{$syscall} = $pr;
    }
}

while (<PC>){
    if (/\{/) {
	($i1, $n, $pr, $syscall) = split;
	$par{$syscall} = $n;
	$prr{$syscall} = $pr;
    }
}

print "missing \n";

for ($i = 0; $i < $index; $i++){
    $x = $name[$i];
    $y = $strn[$i];
    $n = $par{$x};
    $p = $prr{$x};
    $j++;
    print "\t{ $n\t$p\t$x\t$y },\t /* $j */\n";
}