From 0c26267dc1157fa8ec9a5b39d34902dd3ee9d36f Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Tue, 9 Mar 2004 10:19:13 +0000 Subject: INTEGRATION: CWS ooo20040225 (1.10.56); FILE MERGED 2004/02/16 19:51:24 svesik 1.10.56.1: Make interlock code work on both x86 (486+) and x86-64 Issue number: 8593 Submitted by: Pavel Janik Reviewed by: Sander Vesik, Dan Williams --- sal/osl/unx/interlck.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sal/osl/unx/interlck.c') diff --git a/sal/osl/unx/interlck.c b/sal/osl/unx/interlck.c index 9458ec734142..ea248414690e 100644 --- a/sal/osl/unx/interlck.c +++ b/sal/osl/unx/interlck.c @@ -2,9 +2,9 @@ * * $RCSfile: interlck.c,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: hjs $ $Date: 2003-08-18 15:18:36 $ + * last change: $Author: hr $ $Date: 2004-03-09 11:19:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -69,7 +69,8 @@ #error please use asm/interlck_sparc.s #elif defined ( SOLARIS) && defined ( X86 ) #error please use asm/interlck_x86.s -#elif defined ( GCC ) && defined ( X86 ) +#elif defined ( GCC ) && ( defined ( X86 ) || defined ( X86_64 ) ) +/* That's possible on x86-64 too since oslInterlockedCount is a sal_Int32 */ /*****************************************************************************/ /* osl_incrementInterlockedCount */ @@ -81,7 +82,7 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* __asm__ __volatile__ ( "movl $1, %0\n\t" "lock\n\t" - "xadd %0, %2\n\t" + "xaddl %0, %2\n\t" "incl %0" : "=&r" (nCount), "=m" (*pCount) : "m" (*pCount) @@ -97,7 +98,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* __asm__ __volatile__ ( "movl $-1, %0\n\t" "lock\n\t" - "xadd %0, %2\n\t" + "xaddl %0, %2\n\t" "decl %0" : "=&r" (nCount), "=m" (*pCount) : "m" (*pCount) -- cgit