Inlcude the assembly language implementation of the stack operations only when
authorsrinivas%netscape.com
Wed, 18 Aug 1999 02:17:13 +0000
changeset 752 1cf86cbe45398d07e4f2a47d33a2eff4a1e09a33
parent 744 d44116bf163a30894031e3a220018c1f8479a748
child 790 2cedfd765466cb4f165d97d9aa5539a529884e48
push idunknown
push userunknown
push dateunknown
bugs11576
Inlcude the assembly language implementation of the stack operations only when _PR_HAVE_ATOMIC_CAS is defined. Bugzilla #11576.
config/SunOS5.mk
pr/src/md/unix/os_SunOS_x86.s
--- a/config/SunOS5.mk
+++ b/config/SunOS5.mk
@@ -49,16 +49,17 @@ else
     USE_PTHREADS = 1
     IMPL_STRATEGY = _PTH
   endif
 endif
 
 ifdef NS_USE_GCC
 CC			= gcc -Wall
 CCC			= g++ -Wall
+ASFLAGS			+= -Wa,-P
 COMPILER_TAG		= _gcc
 ifdef NO_MDUPDATE
 OS_CFLAGS		= $(NOMD_OS_CFLAGS)
 else
 OS_CFLAGS		= $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
 endif
 else
 CC			= cc -xstrconst
--- a/pr/src/md/unix/os_SunOS_x86.s
+++ b/pr/src/md/unix/os_SunOS_x86.s
@@ -54,16 +54,17 @@ sol_getsp:
 /
 / Return a unique identifier for the currently active thread.
 /
 	.globl sol_curthread
 sol_curthread:
 	movl	%ecx, %eax
 	ret
 
+#ifdef _PR_HAVE_ATOMIC_CAS
 /
 / PR_StackPush(listp, elementp)
 /
 / Atomically push ElementP onto linked list ListP.
 /
 	.text
 	.globl	PR_StackPush
 	.align	4
@@ -132,8 +133,9 @@ polock:
 empty:
 / Put elements previous "next" value into listp
 / NOTE: This also unlocks the listp
 	movl	%edx, (%ecx)
 
 / Return previous listp value (already in eax)
 	ret
 
+#endif / _PR_HAVE_ATOMIC_CAS