diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/sysdep.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysdep.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 58305447d4..dbe5654f58 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -41,6 +41,15 @@ # undef I386_USE_SYSENTER #endif +/* Since GCC 5 and above can properly spill %ebx with PIC when needed, + we can inline syscalls with 6 arguments if GCC 5 or above is used + to compile glibc. Disable GCC 5 optimization when compiling for + profiling since asm ("ebp") can't be used to put the 6th argument + in %ebp for syscall. */ +#if __GNUC_PREREQ (5,0) && !defined PROF +# define OPTIMIZE_FOR_GCC_5 +#endif + #ifdef __ASSEMBLER__ /* Linux uses a negative return value to indicate syscall errors, @@ -227,16 +236,6 @@ extern int __syscall_error (int) attribute_hidden __attribute__ ((__regparm__ (1))); -/* Since GCC 5 and above can properly spill %ebx with PIC when needed, - we can inline syscalls with 6 arguments if GCC 5 or above is used - to compile glibc. Disable GCC 5 optimization when compiling for - profiling since asm ("ebp") can't be used to put the 6th argument - in %ebp for syscall. */ - -#if __GNUC_PREREQ (5,0) && !defined PROF -# define OPTIMIZE_FOR_GCC_5 -#endif - #ifndef OPTIMIZE_FOR_GCC_5 /* We need some help from the assembler to generate optimal code. We define some macros here which later will be used. */ |