blob: 368aad71f1b64cacff257aa731ee68db962179d4 (
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
|
#!/usr/bin/perl -w
# Generate vectors.S, the trap/interrupt entry points.
# There has to be one entry point per interrupt number
# since otherwise there's no way to tell the interrupt
# number.
print "/* generated by vectors.pl */\n";
print "/* handlers */\n";
print ".text\n";
print ".globl alltraps\n";
for(my $i = 0; $i < 256; $i++){
print ".globl vector$i\n";
print "vector$i:\n";
if(($i < 8 || $i > 14) && $i != 17){
print "\tpushl \$0\n";
}
print "\tpushl \$$i\n";
print "\tjmp alltraps\n";
}
print "\n/* vector table */\n";
print ".data\n";
print ".globl vectors\n";
print "vectors:\n";
for(my $i = 0; $i < 256; $i++){
print "\t.long vector$i\n";
}
|