[PATCH 0/2] Remove some i386 system call optimizations

H.J. Lu hjl.tools@gmail.com
Tue Jan 11 14:00:23 GMT 2022


On Tue, Jan 11, 2022 at 2:05 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> The configure check for CAN_USE_REGISTER_ASM_EBP is unreliable.  And we
> used it to switch away from using %ebx in assembler constraints, but
> this appears to be no longer necessary.

This GCC bug has been fixed in GCC 5 as seen in

commit 021478683cc091de9902d297a7b161f8343ffb6a
Author: Uros Bizjak <uros@gcc.gnu.org>
Date:   Fri Oct 17 08:00:58 2014 +0200

    cpuid.h (__cpuid): Remove definitions that handle %ebx register in
a special way.

            * config/i386/cpuid.h (__cpuid): Remove definitions that handle %ebx
            register in a special way.
            (__cpuid_count): Ditto.
            * config/i386/driver-i386.h: Protect with
            "#if defined(__GNUC__) && (__GNUC__ >= 5 || !defined(__PIC__))".
            (host_detect_local_cpu): Mention that GCC with non-fixed %ebx
            is required to compile the function.

    From-SVN: r216362

Since GCC 6.2 or above is required to build glibc, please
remove the !OPTIMIZE_FOR_GCC_5 path and this issue
will be resolved automatically.

> Tested on i686-linux-gnu.  Built with build-many-glibcs.py.
>
> Thanks,
> Florian
>
> Florian Weimer (2):
>   i386: Always treat %ebx as an allocatable register
>   i386: Always use __libc_do_syscall for 6-argument syscalls (bug 27997)
>
>  config.h.in                               |   4 -
>  sysdeps/unix/sysv/linux/i386/configure    |  39 ----
>  sysdeps/unix/sysv/linux/i386/configure.ac |  17 --
>  sysdeps/unix/sysv/linux/i386/sysdep.h     | 222 +++-------------------
>  4 files changed, 27 insertions(+), 255 deletions(-)
>
>
> base-commit: e72ef23ee88187284b4b1ca9b2e314e618429d35
> --
> 2.34.1
>


--
H.J.


More information about the Libc-alpha mailing list