diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysdep.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 449b23e49b..c455c9b1b4 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -34,11 +34,13 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name -#if defined USE_DL_SYSINFO \ - && (IS_IN (libc) || IS_IN (libpthread)) -# define I386_USE_SYSENTER 1 -#else -# undef I386_USE_SYSENTER +#ifndef I386_USE_SYSENTER +# if defined USE_DL_SYSINFO \ + && (IS_IN (libc) || IS_IN (libpthread)) +# define I386_USE_SYSENTER 1 +# else +# define I386_USE_SYSENTER 0 +# endif #endif /* Since GCC 5 and above can properly spill %ebx with PIC when needed, @@ -110,8 +112,8 @@ /* The original calling convention for system calls on Linux/i386 is to use int $0x80. */ -#ifdef I386_USE_SYSENTER -# ifdef SHARED +#if I386_USE_SYSENTER +# ifdef PIC # define ENTER_KERNEL call *%gs:SYSINFO_OFFSET # else # define ENTER_KERNEL call *_dl_sysinfo @@ -357,9 +359,9 @@ struct libc_do_syscall_args register unsigned int resultvar; \ INTERNAL_SYSCALL_MAIN_##nr (name, err, args); \ (int) resultvar; }) -#ifdef I386_USE_SYSENTER +#if I386_USE_SYSENTER # ifdef OPTIMIZE_FOR_GCC_5 -# ifdef SHARED +# ifdef PIC # define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \ LOADREGS_##nr(args) \ asm volatile ( \ @@ -395,7 +397,7 @@ struct libc_do_syscall_args (int) resultvar; }) # endif # else /* GCC 5 */ -# ifdef SHARED +# ifdef PIC # define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \ EXTRAVAR_##nr \ asm volatile ( \ @@ -494,7 +496,7 @@ struct libc_do_syscall_args #define LOADARGS_0 #ifdef __PIC__ -# if defined I386_USE_SYSENTER && defined SHARED +# if I386_USE_SYSENTER && defined PIC # define LOADARGS_1 \ "bpushl .L__X'%k3, %k3\n\t" # define LOADARGS_5 \ @@ -521,7 +523,7 @@ struct libc_do_syscall_args #define RESTOREARGS_0 #ifdef __PIC__ -# if defined I386_USE_SYSENTER && defined SHARED +# if I386_USE_SYSENTER && defined PIC # define RESTOREARGS_1 \ "bpopl .L__X'%k3, %k3\n\t" # define RESTOREARGS_5 \ |