projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make more useful.
[pintos-anon]
/
src
/
threads
/
intr-stubs.pl
diff --git
a/src/threads/intr-stubs.pl
b/src/threads/intr-stubs.pl
index ea20e9668ede5de1669138957c5e205079c6e3f4..c333260eef7a812e4262e783e968fa0a342fe99c 100755
(executable)
--- a/
src/threads/intr-stubs.pl
+++ b/
src/threads/intr-stubs.pl
@@
-1,9
+1,10
@@
#! /usr/bin/perl
print <<'EOF';
#! /usr/bin/perl
print <<'EOF';
-#include "
mmu
.h"
+#include "
threads/loader
.h"
- .globl intr_stubs
+ .data
+.globl intr_stubs
intr_stubs:
EOF
intr_stubs:
EOF
@@
-11,11
+12,15
@@
for $i (0...255) {
$x = sprintf ("%02x", $i);
print "\t.long intr${x}_stub\n";
}
$x = sprintf ("%02x", $i);
print "\t.long intr${x}_stub\n";
}
-print "\n";
+
+print <<'EOF';
+
+ .text
+EOF
for $i (0...255) {
$x = sprintf ("%02x", $i);
for $i (0...255) {
$x = sprintf ("%02x", $i);
- print "
\t
.globl intr${x}_stub\n";
+ print ".globl intr${x}_stub\n";
print "intr${x}_stub:\n";
print "\tpushl \$0\n"
if ($i != 8 && $i != 10 && $i != 11
print "intr${x}_stub:\n";
print "\tpushl \$0\n"
if ($i != 8 && $i != 10 && $i != 11
@@
-26,7
+31,6
@@
for $i (0...255) {
print <<'EOF';
intr_entry:
print <<'EOF';
intr_entry:
- # FIXME: build a fake stack frame to improve backtraces.
# Save caller's registers.
pushl %ds
pushl %es
# Save caller's registers.
pushl %ds
pushl %es
@@
-38,19
+42,20
@@
intr_entry:
movl %eax, %ds
movl %eax, %es
movl %eax, %ds
movl %eax, %es
- # Call handler.
+ # Call
interrupt
handler.
pushl %esp
pushl %esp
-
.globl intr_handler
+.globl intr_handler
call intr_handler
call intr_handler
-
- .globl intr_exit
-intr_exit:
addl $4, %esp
addl $4, %esp
+.globl intr_exit
+intr_exit:
# Restore caller's registers.
popal
popl %es
popl %ds
addl $8, %esp
# Restore caller's registers.
popal
popl %es
popl %ds
addl $8, %esp
+
+ # Return to caller.
iret
EOF
iret
EOF