Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e5fdc454
Commit
e5fdc454
authored
Oct 11, 2004
by
Vincent Béron
Committed by
Alexandre Julliard
Oct 11, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement interlocked* and wine_switch_to_stack for Alpha.
parent
ef138f09
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
0 deletions
+58
-0
interlocked.c
libs/port/interlocked.c
+51
-0
port.c
libs/wine/port.c
+7
-0
No files found.
libs/port/interlocked.c
View file @
e5fdc454
...
@@ -244,6 +244,57 @@ long interlocked_xchg_add( long *dest, long incr )
...
@@ -244,6 +244,57 @@ long interlocked_xchg_add( long *dest, long incr )
_lwp_mutex_unlock
(
&
interlocked_mutex
);
_lwp_mutex_unlock
(
&
interlocked_mutex
);
return
retv
;
return
retv
;
}
}
#elif defined(__ALPHA__) && defined(__GNUC__)
__ASM_GLOBAL_FUNC
(
interlocked_cmpxchg
,
"L0cmpxchg:
\n\t
"
"ldq_l $0,0($16)
\n\t
"
"cmpeq $0,$18,$1
\n\t
"
"beq $1,L1cmpxchg
\n\t
"
"mov $17,$0
\n\t
"
"stq_c $0,0($16)
\n\t
"
"beq $0,L0cmpxchg
\n\t
"
"mov $18,$0
\n
"
"L1cmpxchg:
\n\t
"
"mb"
);
__ASM_GLOBAL_FUNC
(
interlocked_cmpxchg_ptr
,
"L0cmpxchg_ptr:
\n\t
"
"ldq_l $0,0($16)
\n\t
"
"cmpeq $0,$18,$1
\n\t
"
"beq $1,L1cmpxchg_ptr
\n\t
"
"mov $17,$0
\n\t
"
"stq_c $0,0($16)
\n\t
"
"beq $0,L0cmpxchg_ptr
\n\t
"
"mov $18,$0
\n
"
"L1cmpxchg_ptr:
\n\t
"
"mb"
);
__ASM_GLOBAL_FUNC
(
interlocked_xchg
,
"L0xchg:
\n\t
"
"ldq_l $0,0($16)
\n\t
"
"mov $17,$1
\n\t
"
"stq_c $1,0($16)
\n\t
"
"beq $1,L0xchg
\n\t
"
"mb"
);
__ASM_GLOBAL_FUNC
(
interlocked_xchg_ptr
,
"L0xchg_ptr:
\n\t
"
"ldq_l $0,0($16)
\n\t
"
"mov $17,$1
\n\t
"
"stq_c $1,0($16)
\n\t
"
"beq $1,L0xchg_ptr
\n\t
"
"mb"
);
__ASM_GLOBAL_FUNC
(
interlocked_xchg_add
,
"L0xchg_add:
\n\t
"
"ldq_l $0,0($16)
\n\t
"
"addq $0,$17,$1
\n\t
"
"stq_c $1,0($16)
\n\t
"
"beq $1,L0xchg_add
\n\t
"
"mb"
);
#else
#else
# error You must implement the interlocked* functions for your CPU
# error You must implement the interlocked* functions for your CPU
#endif
#endif
libs/wine/port.c
View file @
e5fdc454
...
@@ -135,6 +135,13 @@ __ASM_GLOBAL_FUNC( wine_switch_to_stack,
...
@@ -135,6 +135,13 @@ __ASM_GLOBAL_FUNC( wine_switch_to_stack,
"mr 1,5
\n\t
"
/* stack */
"mr 1,5
\n\t
"
/* stack */
"bctr
\n\t
"
/* call ctr */
"bctr
\n\t
"
/* call ctr */
"1:
\t
b 1b"
);
/* loop */
"1:
\t
b 1b"
);
/* loop */
#elif defined(__ALPHA__) && defined(__GNUC__)
__ASM_GLOBAL_FUNC
(
wine_switch_to_stack
,
"mov $16,$0
\n\t
"
/* func */
"mov $17,$16
\n\t
"
/* arg */
"mov $18,$30
\n\t
"
/* stack */
"jsr $31,($0),0
\n\t
"
/* call func */
"L1:
\t
br $31,L1"
);
/* loop */
#else
#else
#error You must implement wine_switch_to_stack for your platform
#error You must implement wine_switch_to_stack for your platform
#endif
#endif
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