#include "mmu.h"
.data
- .globl intr_stubs
+.globl intr_stubs
intr_stubs:
EOF
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
# Call handler.
pushl %esp
- .globl intr_handler
+.globl intr_handler
call intr_handler
addl $4, %esp
- .globl intr_exit
+.globl intr_exit
intr_exit:
-
# Restore caller's registers.
popal
popl %es
#include "switch.h"
- .globl switch_threads
+.globl switch_threads
switch_threads:
# Save caller's register state.
# Note that the SVR4 ABI allows us to destroy %eax, %ecx, %edx.
pushl %edi
# Get offsetof (struct thread, stack).
- .globl thread_stack_ofs
+.globl thread_stack_ofs
mov thread_stack_ofs, %edx
# Save current stack pointer to old thread's stack, if any.
popl %ebx
ret
- .globl switch_entry
+.globl switch_entry
switch_entry:
# Discard thread_switch() arguments.
addl $8, %esp
# Call schedule_tail(prev).
pushl %eax
- .globl schedule_tail
+.globl schedule_tail
call schedule_tail
addl $4, %esp