Repair the RAS check.

This commit is contained in:
ad 2007-09-28 17:02:39 +00:00
parent fff21ff359
commit 2b42802f4e
1 changed files with 12 additions and 15 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.S,v 1.30 2007/09/27 21:14:04 bouyer Exp $ */ /* $NetBSD: locore.S,v 1.31 2007/09/28 17:02:39 ad Exp $ */
/* NetBSD: locore.S,v 1.31 2004/08/26 10:12:33 junyoung Exp */ /* NetBSD: locore.S,v 1.31 2004/08/26 10:12:33 junyoung Exp */
/* /*
@ -697,9 +697,17 @@ switch_skipsave:
* Check for restartable atomic sequences (RAS) * Check for restartable atomic sequences (RAS)
*/ */
movl L_PROC(%edi),%ebx movl L_PROC(%edi),%eax
cmpl $0,P_RASLIST(%ebx) cmpl $0,P_RASLIST(%eax)
jne check_ras jz switch_return
movl L_MD_REGS(%edi),%ebx
pushl TF_EIP(%ebx)
pushl %eax
call _C_LABEL(ras_lookup)
addl $8,%esp
cmpl $-1,%eax
je switch_return
movl %eax,TF_EIP(%ebx)
switch_return: switch_return:
movl %esi,%eax # return 'oldlwp' movl %esi,%eax # return 'oldlwp'
@ -708,17 +716,6 @@ switch_return:
popl %ebx popl %ebx
ret ret
check_ras:
movl L_MD_REGS(%edi),%ecx
pushl TF_EIP(%ecx)
pushl %eax
call _C_LABEL(ras_lookup)
addl $8,%esp
cmpl $-1,%eax
je switch_return
movl L_MD_REGS(%edi),%ecx
movl %eax,TF_EIP(%ecx)
jmp switch_return
/* /*
* void savectx(struct pcb *pcb); * void savectx(struct pcb *pcb);