[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.45.2.6 and 1.45.2.7

version 1.45.2.6, 2007/03/29 19:00:24 version 1.45.2.7, 2007/04/04 13:04:09
Line 746  ENTRY(cpu_switchto)
Line 746  ENTRY(cpu_switchto)
   
         /* 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     3f          jnz     4f
   
         /* Is this process using RAS (restartable atomic sequences)? */          /* Is this process using RAS (restartable atomic sequences)? */
         movl    L_PROC(%edi),%eax          movl    L_PROC(%edi),%eax
         cmpl    $0,P_RASLIST(%eax)          cmpl    $0,P_RASLIST(%eax)
         jne     4f          jne     5f
   
         /*          /*
          * Restore cr0 (including FPU state).  Raise the IPL to IPL_IPI.           * Restore cr0 (including FPU state).  Raise the IPL to IPL_IPI.
Line 768  ENTRY(cpu_switchto)
Line 768  ENTRY(cpu_switchto)
          */           */
         movl    PCB_FPCPU(%ebx),%eax          movl    PCB_FPCPU(%ebx),%eax
         cmpl    CPUVAR(SELF),%eax          cmpl    CPUVAR(SELF),%eax
         movl    $0,%eax          je      3f
         setne   %al                     # CR0_TS is bit 0          orl     $CR0_TS,%ecx
         orl     %eax,%ecx  
   
         /* Reloading CR0 is very expensive - avoid if possible. */          /* Reloading CR0 is very expensive - avoid if possible. */
         cmpl    %edx,%ecx  3:      cmpl    %edx,%ecx
         je      3f          je      4f
         movl    %ecx,%cr0          movl    %ecx,%cr0
   
         /* Return to the new LWP, returning 'oldlwp' in %eax. */          /* Return to the new LWP, returning 'oldlwp' in %eax. */
 3:      movl    %esi,%eax  4:      movl    %esi,%eax
         popl    %edi          popl    %edi
         popl    %esi          popl    %esi
         popl    %ebx          popl    %ebx
         ret          ret
   
         /* Check for restartable atomic sequences (RAS). */          /* Check for restartable atomic sequences (RAS). */
 4:      movl    L_MD_REGS(%edi),%ecx  5:      movl    L_MD_REGS(%edi),%ecx
         pushl   TF_EIP(%ecx)          pushl   TF_EIP(%ecx)
         pushl   %eax          pushl   %eax
         call    _C_LABEL(ras_lookup)          call    _C_LABEL(ras_lookup)

Legend:
Removed from v.1.45.2.6  
changed lines
  Added in v.1.45.2.7

CVSweb <webmaster@jp.NetBSD.org>