diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2011-11-08 16:04:34 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2011-11-08 21:14:09 -0800 |
| commit | 2edd3135adcf4a3812487df75c503a95fbbc1a38 (patch) | |
| tree | 965ecc47c43741b7f76f05c9727002dd3d21c901 | |
| parent | 1a28ad4fa4c3b2dfa3f57eed9e0115559d4263e7 (diff) | |
| download | rust-2edd3135adcf4a3812487df75c503a95fbbc1a38.tar.gz rust-2edd3135adcf4a3812487df75c503a95fbbc1a38.zip | |
cleanup, removing comments and dead code
| -rw-r--r-- | src/rt/arch/i386/_context.S | 41 |
1 files changed, 10 insertions, 31 deletions
diff --git a/src/rt/arch/i386/_context.S b/src/rt/arch/i386/_context.S index b892342ee31..a9e329f0bf3 100644 --- a/src/rt/arch/i386/_context.S +++ b/src/rt/arch/i386/_context.S @@ -20,56 +20,35 @@ The registers_t variable is in (%esp) swap_registers: // save the old context movl 4(%esp), %eax - //movl %eax, 0(%eax) movl %ebx, 4(%eax) - //movl %ecx, 8(%eax) - //movl %edx, 12(%eax) movl %ebp, 16(%eax) movl %esi, 20(%eax) movl %edi, 24(%eax) - //movl %cs, 32(%eax) - //movl %ds, 34(%eax) - //movl %ss, 36(%eax) - //movl %es, 38(%eax) - //movl %fs, 40(%eax) - //movl %gs, 42(%eax) - // save the flags - pushf - popl %ecx - movl %ecx, 44(%eax) + // save the flags + pushf + popl %ecx + movl %ecx, 44(%eax) - // save the return address as the instruction pointer + // save the return address as the instruction pointer // and save the stack pointer of the caller popl %ecx movl %esp, 28(%eax) - movl %ecx, 48(%eax) + movl %ecx, 48(%eax) // restore the new context movl 4(%esp), %eax movl 4(%eax), %ebx - // save ecx for later... - //movl 12(%eax), %edx movl 16(%eax), %ebp movl 20(%eax), %esi movl 24(%eax), %edi movl 28(%eax), %esp - // We can't actually change this... - //movl 32(%eax), %cs - //movl 34(%eax), %ds - //movl 36(%eax), %ss - //movl 38(%eax), %es - //movl 40(%eax), %fs - //movl 42(%eax), %gs - - // restore the flags - movl 44(%eax), %ecx - push %ecx - popf - // ok, now we can restore ecx - //movl 8(%eax), %ecx + // restore the flags + movl 44(%eax), %ecx + push %ecx + popf // Return! jmp *48(%eax) |
