Commit 4ede2963 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Change "g" (general regs) into "r" (hardregs) in clone / modify_ldt /

wine_sigaction __PIC__ cases, since "g" will not work with -fomit-frame-pointer ("g" is referenced using %esp which was invalidated before). Bug found and (other) fix suggested by <daniel@mat.utfsm.cl> Daniel Serpell.
parent a7f87851
...@@ -96,7 +96,7 @@ static __inline__ int wine_sigaction( int sig, struct kernel_sigaction *new, ...@@ -96,7 +96,7 @@ static __inline__ int wine_sigaction( int sig, struct kernel_sigaction *new,
"popl %%ebx" "popl %%ebx"
: "=a" (sig) : "=a" (sig)
: "0" (SYS_sigaction), : "0" (SYS_sigaction),
"g" (sig), "r" (sig),
"c" (new), "c" (new),
"d" (old) ); "d" (old) );
#else #else
......
...@@ -39,7 +39,7 @@ static __inline__ int modify_ldt( int func, struct modify_ldt_s *ptr, ...@@ -39,7 +39,7 @@ static __inline__ int modify_ldt( int func, struct modify_ldt_s *ptr,
"popl %%ebx" "popl %%ebx"
: "=a" (res) : "=a" (res)
: "0" (SYS_modify_ldt), : "0" (SYS_modify_ldt),
"g" (func), "r" (func),
"c" (ptr), "c" (ptr),
"d" (count) ); "d" (count) );
#else #else
......
...@@ -88,7 +88,7 @@ int clone( int (*fn)(void *), void *stack, int flags, void *arg ) ...@@ -88,7 +88,7 @@ int clone( int (*fn)(void *), void *stack, int flags, void *arg )
"xorl %%eax,%%eax\n\t" /* Just in case it does*/ "xorl %%eax,%%eax\n\t" /* Just in case it does*/
"0:" "0:"
: "=a" (ret) : "=a" (ret)
: "0" (SYS_clone), "g" (flags), "c" (stack_ptr) ); : "0" (SYS_clone), "r" (flags), "c" (stack_ptr) );
assert( ret ); /* If ret is 0, we returned from the child function */ assert( ret ); /* If ret is 0, we returned from the child function */
if (ret > 0) return ret; if (ret > 0) return ret;
errno = -ret; errno = -ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment