Use branch-slot in STACK_SWITCH, suggested by Martin Husemann.
This commit is contained in:
parent
c139cd4893
commit
2cae323122
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pthread_switch.S,v 1.5 2003/08/25 22:48:24 petrov Exp $ */
|
||||
/* $NetBSD: pthread_switch.S,v 1.6 2003/08/25 23:00:23 petrov Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -64,11 +64,11 @@
|
|||
*/
|
||||
#define STACK_SWITCH(pt,tmp) \
|
||||
ldx [pt + PT_TRAPUC], tmp ; \
|
||||
brnz,a tmp, 1f ; \
|
||||
nop ; \
|
||||
brnz,a tmp, 8f ; \
|
||||
stx %g0, [pt + PT_TRAPUC] ; \
|
||||
ldx [pt + PT_UC], tmp ; \
|
||||
1: add tmp, - STACK_ALIGN(STACKSPACE + CONTEXTSIZE) - BIAS, %sp ; \
|
||||
stx %g0, [pt + PT_TRAPUC]
|
||||
8: add tmp, - STACK_ALIGN(STACKSPACE + CONTEXTSIZE) - BIAS, %sp ; \
|
||||
|
||||
|
||||
ENTRY(pthread__switch)
|
||||
save %sp, -STACK_ALIGN(CC64FSZ + CONTEXTSIZE), %sp
|
||||
|
|
Loading…
Reference in New Issue