Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 593784 | Differences between
and this patch

Collapse All | Expand All

(-)glibc-2.23/config.h.in (+4 lines)
Lines 231-234 Link Here
231
/* PowerPC32 uses fctidz for floating point to long long conversions.  */
231
/* PowerPC32 uses fctidz for floating point to long long conversions.  */
232
#define HAVE_PPC_FCTIDZ 0
232
#define HAVE_PPC_FCTIDZ 0
233
233
234
/* Some compiler options may now allow to use ebp in __asm__ (used mainly
235
   in i386 6 argument syscall issue).  */
236
#define CAN_USE_REGISTER_ASM_EBP 0
237
234
#endif
238
#endif
(-)glibc-2.23/sysdeps/unix/sysv/linux/i386/configure (+39 lines)
Lines 1-5 Link Here
1
# This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
1
# This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2
 # Local configure fragment for sysdeps/unix/sysv/linux/i386.
2
 # Local configure fragment for sysdeps/unix/sysv/linux/i386.
3
3
4
# Check if CFLAGS allows compiler to use ebp register in inline assembly.
5
6
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flags allows ebp in inline assembly" >&5
7
$as_echo_n "checking if compiler flags allows ebp in inline assembly... " >&6; }
8
if ${libc_cv_can_use_register_asm_ebp+:} false; then :
9
  $as_echo_n "(cached) " >&6
10
else
11
12
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13
/* end confdefs.h.  */
14
15
    void foo (int i)
16
    {
17
      register int reg asm ("ebp") = i;
18
      asm ("# %0" : : "r" (reg));
19
    }
20
int
21
main ()
22
{
23
24
  ;
25
  return 0;
26
}
27
_ACEOF
28
if ac_fn_c_try_compile "$LINENO"; then :
29
  libc_cv_can_use_register_asm_ebp=yes
30
else
31
  libc_cv_can_use_register_asm_ebp=no
32
fi
33
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34
35
fi
36
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_can_use_register_asm_ebp" >&5
37
$as_echo "$libc_cv_can_use_register_asm_ebp" >&6; }
38
if test $libc_cv_can_use_register_asm_ebp = yes; then
39
  $as_echo "#define CAN_USE_REGISTER_ASM_EBP 1" >>confdefs.h
40
41
fi
42
4
libc_cv_gcc_unwind_find_fde=yes
43
libc_cv_gcc_unwind_find_fde=yes
5
ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
44
ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
(-)glibc-2.23/sysdeps/unix/sysv/linux/i386/configure.ac (+17 lines)
Lines 1-5 Link Here
1
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
1
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2
# Local configure fragment for sysdeps/unix/sysv/linux/i386.
2
# Local configure fragment for sysdeps/unix/sysv/linux/i386.
3
3
4
# Check if CFLAGS allows compiler to use ebp register in inline assembly.
5
AC_CACHE_CHECK([if compiler flags allows ebp in inline assembly],
6
                libc_cv_can_use_register_asm_ebp, [
7
AC_COMPILE_IFELSE(
8
  [AC_LANG_PROGRAM([
9
    void foo (int i)
10
    {
11
      register int reg asm ("ebp") = i;
12
      asm ("# %0" : : "r" (reg));
13
    }])],
14
  [libc_cv_can_use_register_asm_ebp=yes],
15
  [libc_cv_can_use_register_asm_ebp=no])
16
])
17
if test $libc_cv_can_use_register_asm_ebp = yes; then
18
  AC_DEFINE(CAN_USE_REGISTER_ASM_EBP)
19
fi
20
4
libc_cv_gcc_unwind_find_fde=yes
21
libc_cv_gcc_unwind_find_fde=yes
5
ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
22
ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
(-)glibc-2.23/sysdeps/unix/sysv/linux/i386/Makefile (-13 lines)
Lines 3-21 Link Here
3
3
4
ifeq ($(subdir),misc)
4
ifeq ($(subdir),misc)
5
sysdep_routines += ioperm iopl vm86
5
sysdep_routines += ioperm iopl vm86
6
# %ebp may be used to pass the 6th argument to syscall.
7
CFLAGS-epoll_pwait.o += -fomit-frame-pointer
8
CFLAGS-epoll_pwait.os += -fomit-frame-pointer
9
CFLAGS-mmap.o += -fomit-frame-pointer
10
CFLAGS-mmap.os += -fomit-frame-pointer
11
CFLAGS-mmap64.o += -fomit-frame-pointer
12
CFLAGS-mmap64.os += -fomit-frame-pointer
13
endif
14
15
ifeq ($(subdir),sysvipc)
16
# %ebp may be used to pass the 6th argument to syscall.
17
CFLAGS-semtimedop.o += -fomit-frame-pointer
18
CFLAGS-semtimedop.os += -fomit-frame-pointer
19
endif
6
endif
20
7
21
ifeq ($(subdir),elf)
8
ifeq ($(subdir),elf)
(-)glibc-2.23/sysdeps/unix/sysv/linux/i386/sysdep.h (-3 / +3 lines)
Lines 44-52 Link Here
44
/* Since GCC 5 and above can properly spill %ebx with PIC when needed,
44
/* Since GCC 5 and above can properly spill %ebx with PIC when needed,
45
   we can inline syscalls with 6 arguments if GCC 5 or above is used
45
   we can inline syscalls with 6 arguments if GCC 5 or above is used
46
   to compile glibc.  Disable GCC 5 optimization when compiling for
46
   to compile glibc.  Disable GCC 5 optimization when compiling for
47
   profiling since asm ("ebp") can't be used to put the 6th argument
47
   profiling or when -fno-omit-frame-pointer is used since asm ("ebp")
48
   in %ebp for syscall.  */
48
   can't be used to put the 6th argument in %ebp for syscall.  */
49
#if __GNUC_PREREQ (5,0) && !defined PROF
49
#if __GNUC_PREREQ (5,0) && !defined PROF && CAN_USE_REGISTER_ASM_EBP
50
# define OPTIMIZE_FOR_GCC_5
50
# define OPTIMIZE_FOR_GCC_5
51
#endif
51
#endif
52
52

Return to bug 593784