diff options
author | wtchang%redhat.com <devnull@localhost> | 2006-01-09 18:00:14 +0000 |
---|---|---|
committer | wtchang%redhat.com <devnull@localhost> | 2006-01-09 18:00:14 +0000 |
commit | 038f9a7d9f5c48dc322da420b02b0fd273b7d413 (patch) | |
tree | c440b16077e8b73c2b7c22b1461bb942fa19981a | |
parent | 38d5f9ac956959c81bd94dbd2d781befb5a206c2 (diff) | |
download | nspr-hg-038f9a7d9f5c48dc322da420b02b0fd273b7d413.tar.gz |
Bugzilla Bug 322287: the "lock" prefix is not required for the x86 "xchg"
instruction. r=mark.mentovai.
Modified files: os2emx.s os2vacpp.asm os_Linux_x86.s os_Linux_x86_64.s
os_SunOS_x86.s os_SunOS_x86_64.s ntmisc.c
Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rw-r--r-- | pr/src/md/os2/os2emx.s | 1 | ||||
-rw-r--r-- | pr/src/md/os2/os2vacpp.asm | 2 | ||||
-rw-r--r-- | pr/src/md/unix/os_Linux_x86.s | 1 | ||||
-rw-r--r-- | pr/src/md/unix/os_Linux_x86_64.s | 1 | ||||
-rw-r--r-- | pr/src/md/unix/os_SunOS_x86.s | 1 | ||||
-rw-r--r-- | pr/src/md/unix/os_SunOS_x86_64.s | 1 | ||||
-rw-r--r-- | pr/src/md/windows/ntmisc.c | 4 |
7 files changed, 3 insertions, 8 deletions
diff --git a/pr/src/md/os2/os2emx.s b/pr/src/md/os2/os2emx.s index 4dd81e39..90bf2315 100644 --- a/pr/src/md/os2/os2emx.s +++ b/pr/src/md/os2/os2emx.s @@ -89,7 +89,6 @@ __PR_MD_ATOMIC_DECREMENT: __PR_MD_ATOMIC_SET: movl 4(%esp), %ecx movl 8(%esp), %eax - lock xchgl %eax, (%ecx) ret diff --git a/pr/src/md/os2/os2vacpp.asm b/pr/src/md/os2/os2vacpp.asm index 3139924d..58cbbf69 100644 --- a/pr/src/md/os2/os2vacpp.asm +++ b/pr/src/md/os2/os2vacpp.asm @@ -221,7 +221,7 @@ SemReleasex86 ENDP ;;;--------------------------------------------------------------------- ALIGN 10H _PR_MD_ATOMIC_SET proc - lock xchg dword ptr [eax],edx + xchg dword ptr [eax],edx mov eax, edx; ret _PR_MD_ATOMIC_SET endp diff --git a/pr/src/md/unix/os_Linux_x86.s b/pr/src/md/unix/os_Linux_x86.s index d691badd..743eff56 100644 --- a/pr/src/md/unix/os_Linux_x86.s +++ b/pr/src/md/unix/os_Linux_x86.s @@ -89,7 +89,6 @@ _PR_x86_AtomicDecrement: _PR_x86_AtomicSet: movl 4(%esp), %ecx movl 8(%esp), %eax - lock xchgl %eax, (%ecx) ret diff --git a/pr/src/md/unix/os_Linux_x86_64.s b/pr/src/md/unix/os_Linux_x86_64.s index 567ae12d..5aa1c5ab 100644 --- a/pr/src/md/unix/os_Linux_x86_64.s +++ b/pr/src/md/unix/os_Linux_x86_64.s @@ -72,7 +72,6 @@ _PR_x86_64_AtomicDecrement: .align 4 _PR_x86_64_AtomicSet: movl %esi, %eax - lock xchgl %eax, (%rdi) ret diff --git a/pr/src/md/unix/os_SunOS_x86.s b/pr/src/md/unix/os_SunOS_x86.s index da8dded9..a46c20fe 100644 --- a/pr/src/md/unix/os_SunOS_x86.s +++ b/pr/src/md/unix/os_SunOS_x86.s @@ -133,7 +133,6 @@ _MD_AtomicDecrement: _MD_AtomicSet: movl 4(%esp), %ecx movl 8(%esp), %eax - lock xchgl %eax, (%ecx) ret diff --git a/pr/src/md/unix/os_SunOS_x86_64.s b/pr/src/md/unix/os_SunOS_x86_64.s index a1746f26..d4446a5f 100644 --- a/pr/src/md/unix/os_SunOS_x86_64.s +++ b/pr/src/md/unix/os_SunOS_x86_64.s @@ -72,7 +72,6 @@ _MD_AtomicDecrement: .align 4 _MD_AtomicSet: movl %esi, %eax - lock xchgl %eax, (%rdi) ret diff --git a/pr/src/md/windows/ntmisc.c b/pr/src/md/windows/ntmisc.c index f2255d90..7cb5b3cb 100644 --- a/pr/src/md/windows/ntmisc.c +++ b/pr/src/md/windows/ntmisc.c @@ -774,7 +774,7 @@ PR_StackPush(PRStack *stack, PRStackElem *stack_elem) if (*tos == (void *) -1) goto retry; - __asm__("lock xchg %0,%1" + __asm__("xchg %0,%1" : "=r" (tmp), "=m"(*tos) : "0" (-1), "m"(*tos)); @@ -815,7 +815,7 @@ PR_StackPop(PRStack *stack) if (*tos == (void *) -1) goto retry; - __asm__("lock xchg %0,%1" + __asm__("xchg %0,%1" : "=r" (tmp), "=m"(*tos) : "0" (-1), "m"(*tos)); |