Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
da6f8fac
Commit
da6f8fac
authored
Jul 18, 2005
by
Kevin Koltzau
Committed by
Alexandre Julliard
Jul 18, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add x86_64 interlocked functions.
parent
ca8c2303
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
interlocked.c
libs/port/interlocked.c
+29
-0
No files found.
libs/port/interlocked.c
View file @
da6f8fac
...
...
@@ -101,6 +101,35 @@ __declspec(naked) long interlocked_xchg_add( long *dest, long incr )
# error You must implement the interlocked* functions for your compiler
#endif
#elif defined(__x86_64__)
#ifdef __GNUC__
__ASM_GLOBAL_FUNC
(
interlocked_cmpxchg
,
"mov %edx, %eax
\n\t
"
"lock cmpxchgl %esi,(%rdi)
\n\t
"
"ret"
);
__ASM_GLOBAL_FUNC
(
interlocked_cmpxchg_ptr
,
"mov %rdx, %rax
\n\t
"
"lock cmpxchgq %rsi,(%rdi)
\n\t
"
"ret"
);
__ASM_GLOBAL_FUNC
(
interlocked_xchg
,
"mov %esi, %eax
\n\t
"
"lock xchgl %eax, (%rdi)
\n\t
"
"ret"
);
__ASM_GLOBAL_FUNC
(
interlocked_xchg_ptr
,
"mov %rsi, %rax
\n\t
"
"lock xchgq %rax,(%rdi)
\n\t
"
"ret"
);
__ASM_GLOBAL_FUNC
(
interlocked_xchg_add
,
"mov %esi, %eax
\n\t
"
"lock xaddl %eax, (%rdi)
\n\t
"
"ret"
);
#else
# error You must implement the interlocked* functions for your compiler
#endif
#elif defined(__powerpc__)
void
*
interlocked_cmpxchg_ptr
(
void
**
dest
,
void
*
xchg
,
void
*
compare
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment