From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id C65B13858029 for ; Tue, 11 Jan 2022 20:31:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C65B13858029 Received: by mail-pj1-x102d.google.com with SMTP id l10-20020a17090a384a00b001b22190e075so7468781pjf.3 for ; Tue, 11 Jan 2022 12:31:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FV+nl2vWDFwIhT7Bx3KpFbHlBqw68QoL0EVnvTZ1Fnc=; b=AypaoHr22UgjmEqrrizJq8CAjCrxY6L5e8LGQ8CVRPanPEAOqYocvjWg8Uvfdgl+3+ LfFfk0JEDvPsLS2uegwO+vitHAiwkJhRH8XBNpwCbNCVNMxiGKlzQek4uWvXHFJ/NRlT gNzDK/rXP/WJYJyr3gS58xCZb4x92BPlV/kUjSudoKcKTfj1fPI+RhliEMap+IbvyvS1 zcOTqN+3GosArn4QC3IlvjSxjstt0RHQ42u0FQ2IE2GA9blxXPIATFOSioYYj/T0AWb5 krXJukbd0ABgNNRrmNs1+yf+LlTYOL48iRP0d4sFTw4Q7AM/k604qglheuZr1YsBxpWN lWNw== X-Gm-Message-State: AOAM531bOIjDYtDXVHFBNOxvZMtppe4fp6kqGZtUnu/31Uej4r8cwF8y m3A3xtaNtxc23fOubytEhlq6bmJDv+8FCsTOzu0= X-Google-Smtp-Source: ABdhPJxPCNQx6ikSfcWqEDL3MNcnz8dUP+UQxUazjnj2CcLmQShk0RPQtragWOZ0LCSlYDX04gPa75r30yEGi4/rFb0= X-Received: by 2002:a17:90b:4f86:: with SMTP id qe6mr4951464pjb.120.1641933094766; Tue, 11 Jan 2022 12:31:34 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "H.J. Lu" Date: Tue, 11 Jan 2022 12:30:58 -0800 Message-ID: Subject: Re: [PATCH 0/2] Remove some i386 system call optimizations To: Florian Weimer Cc: GNU C Library , Jakub Jelinek Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3021.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2022 20:31:40 -0000 On Tue, Jan 11, 2022 at 6:00 AM H.J. Lu wrote: > > On Tue, Jan 11, 2022 at 2:05 AM Florian Weimer 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 > 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. There are /* 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 or when -fno-omit-frame-pointer is used since asm ("ebp") can't be used to put the 6th argument in %ebp for syscall. */ #if !defined PROF && CAN_USE_REGISTER_ASM_EBP # define OPTIMIZE_FOR_GCC_5 #endif If we want to support profiling or -fno-omit-frame-pointer, we need to keep these codes. > > 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. -- H.J.