diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-10-21 19:08:46 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-10-21 19:08:46 +0000 |
commit | 7bb38c70c4d7e4303f34a2185cc6f7d558ca0f7c (patch) | |
tree | 52d63a869c1f4a15cce5e03144695a419cf4f0b2 /sysdeps/unix/sysv | |
parent | adcb550ca6efa4934faece8adc5a40f60f2c03dd (diff) | |
download | glibc-7bb38c70c4d7e4303f34a2185cc6f7d558ca0f7c.tar glibc-7bb38c70c4d7e4303f34a2185cc6f7d558ca0f7c.tar.gz glibc-7bb38c70c4d7e4303f34a2185cc6f7d558ca0f7c.tar.bz2 glibc-7bb38c70c4d7e4303f34a2185cc6f7d558ca0f7c.zip |
Update.
1998-10-21 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/sysdep.h: Remove EXTRAVARS_* macros
and adjust formats.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysdep.h | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 2120f28977..a58bd40b84 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -206,14 +206,13 @@ #define INLINE_SYSCALL(name, nr, args...) \ ({ \ unsigned int resultvar; \ - EXTRAVARS_##nr(args) \ asm volatile ( \ PUSHARGS_##nr \ DOARGS_##nr \ "int $0x80\n\t" \ POPARGS_##nr \ : "=a" (resultvar) \ - ASMFMT_##nr(args) \ + : ASMFMT_##nr(args) \ "i" (__NR_##name) : "memory", "cc"); \ if (resultvar >= 0xfffff001) \ { \ @@ -229,69 +228,52 @@ #define _PUSHARGS_0 /* Nothing */ #define _DOARGS_0 /* Nothing */ #define _POPARGS_0 /* Nothing */ -#define ASMFMT_0() : -#define EXTRAVARS_0() /* Nothing */ +#define ASMFMT_0() #define PUSHARGS_1 "xchgl %%ebx, %%edx\n\t" _PUSHARGS_0 -#define DOARGS_1 _DOARGS_0 "movl %3, %%eax\n\t" +#define DOARGS_1 _DOARGS_0 "movl %2, %%eax\n\t" #define POPARGS_1 _POPARGS_0 "xchgl %%edx, %%ebx" #define _PUSHARGS_1 _PUSHARGS_0 "pushl %%ebx\n\t" -#define _DOARGS_1 "movl %3, %%ebx\n\t" _DOARGS_0 +#define _DOARGS_1 "movl %1, %%ebx\n\t" _DOARGS_0 #define _POPARGS_1 "popl %%ebx\n\t" _POPARGS_0 #define ASMFMT_1(arg1) \ - , "=d" (use_edx) : "1" (arg1), -#define EXTRAVARS_1(arg1) \ - unsigned long int use_edx; + "d" (arg1), #define PUSHARGS_2 PUSHARGS_1 -#define DOARGS_2 _DOARGS_0 "movl %5, %%eax\n\t" +#define DOARGS_2 _DOARGS_0 "movl %3, %%eax\n\t" #define POPARGS_2 POPARGS_1 #define _PUSHARGS_2 _PUSHARGS_1 #define _DOARGS_2 _DOARGS_1 #define _POPARGS_2 _POPARGS_1 #define ASMFMT_2(arg1, arg2) \ - , "=&d" (use_edx), "=c" (use_ecx) : "1" (arg1), "2" (use_ecx), -#define EXTRAVARS_2(arg1, arg2) \ - unsigned long int use_ecx = (unsigned long int) (arg2), use_edx; + "d" (arg1), "c" (arg2), #define PUSHARGS_3 _PUSHARGS_3 -#define DOARGS_3 _DOARGS_3 "movl %6, %%eax\n\t" +#define DOARGS_3 _DOARGS_3 "movl %4, %%eax\n\t" #define POPARGS_3 _POPARGS_3 #define _PUSHARGS_3 _PUSHARGS_2 #define _DOARGS_3 _DOARGS_2 #define _POPARGS_3 _POPARGS_2 #define ASMFMT_3(arg1, arg2, arg3) \ - , "=d" (use_edx), "=c" (use_ecx) \ - : "0" (arg1), "2" (use_ecx), "1" (use_edx), -#define EXTRAVARS_3(arg1, arg2, arg3) \ - unsigned long int use_ecx = (unsigned long int) (arg2); \ - unsigned long int use_edx = (unsigned long int) (arg3); + "0" (arg1), "c" (arg2), "d" (arg3), #define PUSHARGS_4 _PUSHARGS_4 -#define DOARGS_4 _DOARGS_4 "movl %7, %%eax\n\t" +#define DOARGS_4 _DOARGS_4 "movl %5, %%eax\n\t" #define POPARGS_4 _POPARGS_4 #define _PUSHARGS_4 _PUSHARGS_3 #define _DOARGS_4 _DOARGS_3 #define _POPARGS_4 _POPARGS_3 #define ASMFMT_4(arg1, arg2, arg3, arg4) \ - , "=d" (use_edx), "=c" (use_ecx) \ - : "0" (arg1), "2" (use_ecx), "1" (use_edx), "S" (arg4), -#define EXTRAVARS_4(arg1, arg2, arg3, arg4) \ - unsigned long int use_ecx = (unsigned long int) (arg2); \ - unsigned long int use_edx = (unsigned long int) (arg3); + "0" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), #define PUSHARGS_5 _PUSHARGS_5 -#define DOARGS_5 _DOARGS_5 "movl %8, %%eax\n\t" +#define DOARGS_5 _DOARGS_5 "movl %6, %%eax\n\t" #define POPARGS_5 _POPARGS_5 #define _PUSHARGS_5 PUSHARGS_4 #define _DOARGS_5 _DOARGS_4 #define _POPARGS_5 _POPARGS_4 #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \ - , "=d" (use_edx), "=c" (use_ecx) \ - : "0" (arg1), "2" (use_ecx), "1" (use_edx), "S" (arg4), "D" (arg5), -#define EXTRAVARS_5(arg1, arg2, arg3, arg4, arg5) \ - unsigned long int use_ecx = (unsigned long int) (arg2); \ - unsigned long int use_edx = (unsigned long int) (arg3); + "0" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), #endif /* __ASSEMBLER__ */ |