[BACK]Return to locore.S CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / i386 / i386

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/i386/i386/locore.S between version 1.34.2.4 and 1.47.4.4

version 1.34.2.4, 2007/09/03 14:26:41 version 1.47.4.4, 2007/08/14 10:49:59
Line 705  ENTRY(longjmp)
Line 705  ENTRY(longjmp)
         ret          ret
   
 /*  /*
  * struct lwp *cpu_switchto(struct lwp *oldlwp, struct newlwp)   * struct lwp *cpu_switchto(struct lwp *oldlwp, struct newlwp,
    *                          bool returning)
  *   *
  *      1. if (oldlwp != NULL), save its context.   *      1. if (oldlwp != NULL), save its context.
  *      2. then, restore context of newlwp.   *      2. then, restore context of newlwp.
Line 721  ENTRY(cpu_switchto)
Line 722  ENTRY(cpu_switchto)
   
         movl    16(%esp),%esi           # oldlwp          movl    16(%esp),%esi           # oldlwp
         movl    20(%esp),%edi           # newlwp          movl    20(%esp),%edi           # newlwp
           movl    24(%esp),%edx           # returning
         testl   %esi,%esi          testl   %esi,%esi
         jz      1f          jz      1f
   
Line 734  ENTRY(cpu_switchto)
Line 736  ENTRY(cpu_switchto)
         movl    PCB_EBP(%ebx),%ebp          movl    PCB_EBP(%ebx),%ebp
         movl    PCB_ESP(%ebx),%esp          movl    PCB_ESP(%ebx),%esp
   
           /* Set curlwp. */
           movl    %edi,CPUVAR(CURLWP)
   
           /* Skip the rest if returning to a pinned LWP. */
           testl   %edx,%edx
           jnz     4f
   
         /* Switch TSS.  Reset "task busy" flag before loading. */          /* Switch TSS.  Reset "task busy" flag before loading. */
         movl    %cr3,%eax          movl    %cr3,%eax
         movl    %eax,PCB_CR3(%ebx)      # for TSS gates          movl    %eax,PCB_CR3(%ebx)      # for TSS gates
Line 742  ENTRY(cpu_switchto)
Line 751  ENTRY(cpu_switchto)
         andl    $~0x0200,4(%eax,%edx, 1)          andl    $~0x0200,4(%eax,%edx, 1)
         ltr     %dx          ltr     %dx
   
         /* Set curlwp. */  
         movl    %edi,CPUVAR(CURLWP)  
   
         /* Don't bother with the rest if switching to a system process. */          /* Don't bother with the rest if switching to a system process. */
         testl   $LW_SYSTEM,L_FLAG(%edi)          testl   $LW_SYSTEM,L_FLAG(%edi)
         jnz     4f          jnz     4f
Line 792  ENTRY(cpu_switchto)
Line 798  ENTRY(cpu_switchto)
         addl    $8,%esp          addl    $8,%esp
         cmpl    $-1,%eax          cmpl    $-1,%eax
         je      2b          je      2b
         movl    L_MD_REGS(%edi),%ecx          movl    %eax,TF_EIP(%ebx)
         movl    %eax,TF_EIP(%ecx)  
         jmp     2b          jmp     2b
   
 /*  /*

Legend:
Removed from v.1.34.2.4  
changed lines
  Added in v.1.47.4.4

CVSweb <webmaster@jp.NetBSD.org>