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
505dfdef
Commit
505dfdef
authored
Dec 02, 2004
by
Peter Chapman
Committed by
Alexandre Julliard
Dec 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up several inline assembler blocks so that they produce correct
code with the -fomit-frame-pointer gcc flag.
parent
faa7df1e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
24 deletions
+23
-24
cppexcept.c
dlls/msvcrt/cppexcept.c
+3
-3
except.c
dlls/msvcrt/except.c
+1
-1
cpp.c
dlls/msvcrt/tests/cpp.c
+4
-5
signal_i386.c
dlls/ntdll/signal_i386.c
+2
-2
virtual.c
dlls/ntdll/virtual.c
+1
-1
ldt.c
libs/wine/ldt.c
+1
-1
kthread.c
loader/kthread.c
+1
-1
preloader.c
loader/preloader.c
+7
-7
fd.c
server/fd.c
+3
-3
No files found.
dlls/msvcrt/cppexcept.c
View file @
505dfdef
...
...
@@ -53,7 +53,7 @@ inline static void *call_ebp_func( void *func, void *ebp )
{
void
*
ret
;
__asm__
__volatile__
(
"pushl %%ebp; movl %2,%%ebp; call *%%eax; popl %%ebp"
\
:
"=a"
(
ret
)
:
"0"
(
func
),
"
g
"
(
ebp
)
:
"ecx"
,
"edx"
,
"memory"
);
:
"=a"
(
ret
)
:
"0"
(
func
),
"
r
"
(
ebp
)
:
"ecx"
,
"edx"
,
"memory"
);
return
ret
;
}
...
...
@@ -64,10 +64,10 @@ inline static void call_copy_ctor( void *func, void *this, void *src, int has_vb
if
(
has_vbase
)
/* in that case copy ctor takes an extra bool indicating whether to copy the base class */
__asm__
__volatile__
(
"pushl $1; pushl %2; call *%0"
:
:
"r"
(
func
),
"c"
(
this
),
"
g
"
(
src
)
:
"eax"
,
"edx"
,
"memory"
);
:
:
"r"
(
func
),
"c"
(
this
),
"
r
"
(
src
)
:
"eax"
,
"edx"
,
"memory"
);
else
__asm__
__volatile__
(
"pushl %2; call *%0"
:
:
"r"
(
func
),
"c"
(
this
),
"
g
"
(
src
)
:
"eax"
,
"edx"
,
"memory"
);
:
:
"r"
(
func
),
"c"
(
this
),
"
r
"
(
src
)
:
"eax"
,
"edx"
,
"memory"
);
}
/* call the destructor of the exception object */
...
...
dlls/msvcrt/except.c
View file @
505dfdef
...
...
@@ -76,7 +76,7 @@ inline static DWORD call_filter( void *func, void *arg, void *ebp )
DWORD
ret
;
__asm__
__volatile__
(
"pushl %%ebp; pushl %3; movl %2,%%ebp; call *%%eax; popl %%ebp; popl %%ebp"
:
"=a"
(
ret
)
:
"0"
(
func
),
"
g"
(
ebp
),
"g
"
(
arg
)
:
"0"
(
func
),
"
r"
(
ebp
),
"r
"
(
arg
)
:
"ecx"
,
"edx"
,
"memory"
);
return
ret
;
}
...
...
dlls/msvcrt/tests/cpp.c
View file @
505dfdef
...
...
@@ -154,19 +154,18 @@ inline static void* do_call_func2(void *func, void *_this, void* arg)
static
void
*
do_call_func1
(
void
*
func
,
void
*
_this
)
{
void
*
ret
;
__asm__
__volatile__
(
"
pushl %%ecx;
\n\t
movl %2, %%ecx;
\n\t
call *%1;
\n\t
popl %%ecx;
"
__asm__
__volatile__
(
"
call *%1
"
:
"=a"
(
ret
)
:
"g"
(
func
),
"
m
"
(
_this
)
:
"g"
(
func
),
"
c
"
(
_this
)
:
"memory"
);
return
ret
;
}
static
void
*
do_call_func2
(
void
*
func
,
void
*
_this
,
void
*
arg
)
{
void
*
ret
;
__asm__
__volatile__
(
"pushl %%ecx;
\n\t
pushl %2;
\n\t
"
"movl %3, %%ecx;
\n\t
call *%1;
\n\t
popl %%ecx;"
__asm__
__volatile__
(
"pushl %2
\n\t
call *%1"
:
"=a"
(
ret
)
:
"
g"
(
func
),
"m"
(
arg
),
"m
"
(
_this
)
:
"
r"
(
func
),
"g"
(
arg
),
"c
"
(
_this
)
:
"memory"
);
return
ret
;
}
...
...
dlls/ntdll/signal_i386.c
View file @
505dfdef
...
...
@@ -111,7 +111,7 @@ static inline int wine_sigaction( int sig, struct kernel_sigaction *new,
"int $0x80
\n\t
"
"popl %%ebx"
:
"=a"
(
sig
)
:
"0"
(
SYS_sigaction
),
"
r
"
(
sig
),
"c"
(
new
),
"d"
(
old
)
);
:
"0"
(
SYS_sigaction
),
"
S
"
(
sig
),
"c"
(
new
),
"d"
(
old
)
);
if
(
sig
>=
0
)
return
0
;
errno
=
-
sig
;
return
-
1
;
...
...
@@ -128,7 +128,7 @@ static inline int wine_sigaltstack( const struct sigaltstack *new,
"int $0x80
\n\t
"
"popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
SYS_sigaltstack
),
"
r
"
(
new
),
"c"
(
old
)
);
:
"0"
(
SYS_sigaltstack
),
"
q
"
(
new
),
"c"
(
old
)
);
if
(
ret
>=
0
)
return
0
;
errno
=
-
ret
;
return
-
1
;
...
...
dlls/ntdll/virtual.c
View file @
505dfdef
...
...
@@ -672,7 +672,7 @@ static void *unaligned_mmap( void *addr, size_t length, unsigned int prot,
"popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
90
),
/* SYS_mmap */
"
g
"
(
&
args
)
"
q
"
(
&
args
)
:
"memory"
);
if
(
ret
<
0
&&
ret
>
-
4096
)
{
...
...
libs/wine/ldt.c
View file @
505dfdef
...
...
@@ -94,7 +94,7 @@ static inline int set_thread_area( struct modify_ldt_s *ptr )
"int $0x80
\n\t
"
"popl %%ebx"
:
"=a"
(
res
)
:
"0"
(
243
)
/* SYS_set_thread_area */
,
"
r
"
(
ptr
)
);
:
"0"
(
243
)
/* SYS_set_thread_area */
,
"
q
"
(
ptr
)
);
if
(
res
>=
0
)
return
res
;
errno
=
-
res
;
return
-
1
;
...
...
loader/kthread.c
View file @
505dfdef
...
...
@@ -272,7 +272,7 @@ int wine_pthread_create_thread( struct wine_pthread_thread_info *info )
"ret;
\n
"
"1:
\n\t
"
/* parent -> caller thread */
"addl $8,%%esp"
:
:
"r"
(
sp
),
"
g"
(
SYS_rfork
),
"g
"
(
RFPROC
|
RFMEM
|
RFTHREAD
)
:
"r"
(
sp
),
"
r"
(
SYS_rfork
),
"r
"
(
RFPROC
|
RFMEM
|
RFTHREAD
)
:
"eax"
,
"edx"
);
return
0
;
}
...
...
loader/preloader.c
View file @
505dfdef
...
...
@@ -174,14 +174,14 @@ static inline __attribute__((noreturn)) void wld_exit( int code )
{
for
(;;)
/* avoid warning */
__asm__
__volatile__
(
"pushl %%ebx; movl %1,%%ebx; int $0x80; popl %%ebx"
:
:
"a"
(
SYS_exit
),
"
g
"
(
code
)
);
:
:
"a"
(
SYS_exit
),
"
r
"
(
code
)
);
}
static
inline
int
wld_open
(
const
char
*
name
,
int
flags
)
{
int
ret
;
__asm__
__volatile__
(
"pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
SYS_open
),
"
g
"
(
name
),
"c"
(
flags
)
);
:
"=a"
(
ret
)
:
"0"
(
SYS_open
),
"
r
"
(
name
),
"c"
(
flags
)
);
return
SYSCALL_RET
(
ret
);
}
...
...
@@ -189,7 +189,7 @@ static inline int wld_close( int fd )
{
int
ret
;
__asm__
__volatile__
(
"pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
SYS_close
),
"
g
"
(
fd
)
);
:
"=a"
(
ret
)
:
"0"
(
SYS_close
),
"
r
"
(
fd
)
);
return
SYSCALL_RET
(
ret
);
}
...
...
@@ -198,7 +198,7 @@ static inline ssize_t wld_read( int fd, void *buffer, size_t len )
int
ret
;
__asm__
__volatile__
(
"pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
SYS_read
),
"
g
"
(
fd
),
"c"
(
buffer
),
"d"
(
len
)
:
"0"
(
SYS_read
),
"
r
"
(
fd
),
"c"
(
buffer
),
"d"
(
len
)
:
"memory"
);
return
SYSCALL_RET
(
ret
);
}
...
...
@@ -207,7 +207,7 @@ static inline ssize_t wld_write( int fd, const void *buffer, size_t len )
{
int
ret
;
__asm__
__volatile__
(
"pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
SYS_write
),
"
g
"
(
fd
),
"c"
(
buffer
),
"d"
(
len
)
);
:
"=a"
(
ret
)
:
"0"
(
SYS_write
),
"
r
"
(
fd
),
"c"
(
buffer
),
"d"
(
len
)
);
return
SYSCALL_RET
(
ret
);
}
...
...
@@ -215,7 +215,7 @@ static inline int wld_mprotect( const void *addr, size_t len, int prot )
{
int
ret
;
__asm__
__volatile__
(
"pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
SYS_mprotect
),
"
g
"
(
addr
),
"c"
(
len
),
"d"
(
prot
)
);
:
"=a"
(
ret
)
:
"0"
(
SYS_mprotect
),
"
r
"
(
addr
),
"c"
(
len
),
"d"
(
prot
)
);
return
SYSCALL_RET
(
ret
);
}
...
...
@@ -240,7 +240,7 @@ static void *wld_mmap( void *start, size_t len, int prot, int flags, int fd, off
args
.
fd
=
fd
;
args
.
offset
=
offset
;
__asm__
__volatile__
(
"pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
SYS_mmap
),
"
g
"
(
&
args
)
:
"memory"
);
:
"=a"
(
ret
)
:
"0"
(
SYS_mmap
),
"
q
"
(
&
args
)
:
"memory"
);
return
(
void
*
)
SYSCALL_RET
(
ret
);
}
...
...
server/fd.c
View file @
505dfdef
...
...
@@ -87,7 +87,7 @@ static inline int epoll_create( int size )
{
int
ret
;
__asm__
(
"pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
254
/*NR_epoll_create*/
),
"
g
"
(
size
)
);
:
"=a"
(
ret
)
:
"0"
(
254
/*NR_epoll_create*/
),
"
r
"
(
size
)
);
SYSCALL_RET
(
ret
);
}
...
...
@@ -96,7 +96,7 @@ static inline int epoll_ctl( int epfd, int op, int fd, const struct epoll_event
int
ret
;
__asm__
(
"pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
255
/*NR_epoll_ctl*/
),
"
g
"
(
epfd
),
"c"
(
op
),
"d"
(
fd
),
"S"
(
event
),
"m"
(
*
event
)
);
:
"0"
(
255
/*NR_epoll_ctl*/
),
"
r
"
(
epfd
),
"c"
(
op
),
"d"
(
fd
),
"S"
(
event
),
"m"
(
*
event
)
);
SYSCALL_RET
(
ret
);
}
...
...
@@ -105,7 +105,7 @@ static inline int epoll_wait( int epfd, struct epoll_event *events, int maxevent
int
ret
;
__asm__
(
"pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx"
:
"=a"
(
ret
)
:
"0"
(
256
/*NR_epoll_wait*/
),
"
g
"
(
epfd
),
"c"
(
events
),
"d"
(
maxevents
),
"S"
(
timeout
)
:
"0"
(
256
/*NR_epoll_wait*/
),
"
r
"
(
epfd
),
"c"
(
events
),
"d"
(
maxevents
),
"S"
(
timeout
)
:
"memory"
);
SYSCALL_RET
(
ret
);
}
...
...
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