diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-10-27 10:59:57 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-10-27 10:59:57 +0000 |
commit | 37889c81b91e416b93e5816a73c98aabf8763b63 (patch) | |
tree | a25dec253d85c30306878df9b228f503a9e0dac1 /sal | |
parent | 6add962c40b5258527505490c14b81dc901baa52 (diff) |
INTEGRATION: CWS hr39 (1.2.156); FILE MERGED
2006/10/06 14:14:35 hr 1.2.156.1: #i70157#: don't use lock prefix on a single processor, single core, non HT machine
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/asm/interlck_x86.s | 78 |
1 files changed, 46 insertions, 32 deletions
diff --git a/sal/osl/unx/asm/interlck_x86.s b/sal/osl/unx/asm/interlck_x86.s index b1aa88191a06..b106f82544cc 100644 --- a/sal/osl/unx/asm/interlck_x86.s +++ b/sal/osl/unx/asm/interlck_x86.s @@ -4,9 +4,9 @@ * * $RCSfile: interlck_x86.s,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2005-09-08 15:04:37 $ + * last change: $Author: rt $ $Date: 2006-10-27 11:59:57 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,22 +39,29 @@ osl_incrementInterlockedCount: - push %ebp - mov %esp,%ebp - push %ebx - call 1f + push %ebp + mov %esp,%ebp + push %ebx + call 1f 1: - pop %ebx - add $_GLOBAL_OFFSET_TABLE_+0x1,%ebx - mov 8(%ebp),%ecx - mov $1,%eax - lock - xadd %eax,(%ecx) - inc %eax - pop %ebx - mov %ebp,%esp - pop %ebp - ret + pop %ebx + add $_GLOBAL_OFFSET_TABLE_+0x1,%ebx + mov 8(%ebp),%ecx + mov $1,%eax + mov osl_isSingleCPU@GOT(%ebx),%edx + cmp $0,(%edx) + je 2f + xadd %eax,(%ecx) + jmp 3f +2: + lock + xadd %eax,(%ecx) +3: + inc %eax + pop %ebx + mov %ebp,%esp + pop %ebp + ret .type osl_incrementInterlockedCount,@function .size osl_incrementInterlockedCount,.-osl_incrementInterlockedCount @@ -64,22 +71,29 @@ osl_incrementInterlockedCount: osl_decrementInterlockedCount: - push %ebp - mov %esp,%ebp - push %ebx - call 1f + push %ebp + mov %esp,%ebp + push %ebx + call 1f 1: - pop %ebx - add $_GLOBAL_OFFSET_TABLE_+0x1,%ebx - mov 8(%ebp),%ecx - mov $-1,%eax - lock - xadd %eax,(%ecx) - dec %eax - pop %ebx - mov %ebp,%esp - pop %ebp - ret + pop %ebx + add $_GLOBAL_OFFSET_TABLE_+0x1,%ebx + mov 8(%ebp),%ecx + orl $-1,%eax + mov osl_isSingleCPU@GOT(%ebx),%edx + cmp $0,(%edx) + je 2f + xadd %eax,(%ecx) + jmp 3f +2: + lock + xadd %eax,(%ecx) +3: + dec %eax + pop %ebx + mov %ebp,%esp + pop %ebp + ret .type osl_decrementInterlockedCount,@function .size osl_decrementInterlockedCount,.-osl_decrementInterlockedCount |