From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by gnuweeb.org (Postfix) with ESMTPSA id 244C07E34D for ; Thu, 24 Mar 2022 08:34:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1648110851; bh=TSeBThyR27cR0wXvkrlR2MNOHO4p/zPPjfVaKmUn8DY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nGS8rAeDB87coxni8HOPl+4umCInNVqMmzVg6ERZaZtdXELz2zsC7H8R2wPTm8gin 2vUAB36goaX3frdpDfGi4G0BYwqNycNHWeJfcc6zl3tFNZz8kF47OtyNQBYTpblH+7 DVbfIw51LEDj8rlkbqVcLS+7IiBUHrmHaCJdY3r/EzuYS97Ds2m4qB0J1K8lVdvBEW NtDGUHIo9HwpI+sFTanyKiZ+5koyN4smPxVZepx9HCgLOIeB/WW80yQSC9lMCR8UDX PQZfbgRs9G/Qq38n+P0G1OCoXWjaI+Vo89/A2YMLSXCnRI3pkE8JKXQeSc5lKJ3mEs EWRbmAVmKBmzw== Received: by mail-lf1-f51.google.com with SMTP id h7so6809384lfl.2 for ; Thu, 24 Mar 2022 01:34:11 -0700 (PDT) X-Gm-Message-State: AOAM530wfcEmEi1Og0qAot+9E32Y5jmLblhAJJcJ0NAGtR4KZ8HkoV23 s+y5g62wnmSzydivRvyVig8B42PLwe5BrOiZqKw= X-Google-Smtp-Source: ABdhPJx2muH6RwyzO+bv39vRMGEcdwHNBDP6x2XXTA7g2lwLJiJBRFDj5/HNfwsw6iNge0P4fSEFyp669PZqHPHlB50= X-Received: by 2002:a05:6512:3f90:b0:446:6b95:24aa with SMTP id x16-20020a0565123f9000b004466b9524aamr3030514lfa.610.1648110849139; Thu, 24 Mar 2022 01:34:09 -0700 (PDT) MIME-Version: 1.0 References: <20220324073039.140946-1-ammarfaizi2@gnuweeb.org> <20220324073039.140946-5-ammarfaizi2@gnuweeb.org> <20220324075728.GC18586@1wt.eu> In-Reply-To: <20220324075728.GC18586@1wt.eu> From: Alviro Iskandar Setiawan Date: Thu, 24 Mar 2022 15:33:57 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 04/11] tools/nolibc: x86-64: Use appropriate register constraints if exist To: Willy Tarreau Cc: Ammar Faizi , "Paul E. McKenney" , Nugraha , Linux Kernel Mailing List , "GNU/Weeb Mailing List" , David Laight Content-Type: text/plain; charset="UTF-8" List-Id: On Thu, Mar 24, 2022 at 2:57 PM Willy Tarreau wrote: > On Thu, Mar 24, 2022 at 02:30:32PM +0700, Ammar Faizi wrote: > > Use appropriate register constraints if exist. Don't use register > > variables for all inputs. > > > > Register variables with "r" constraint should be used when we need to > > pass data through a specific register to extended inline assembly that > > doesn't have a specific register constraint associated with it (anything > > outside %rax, %rbx, %rcx, %rdx, %rsi, %rdi). > > > > It also simplifies the macro definition. > > I'm a bit bothered by this one because I went the exact opposite route > in the early design precisely because I found that the current one was > simpler. [...] [...] > I'd say that if there is any technical benefit in doing this (occasional > code improvement or better support for older or exotic compilers), I'd say > "ok go for it", but if it's only a matter of taste, I'm not convinced at > all and am rather seeing this as a regression. Now if there's rough > consensus around this approach I'll abide, but then I'd request that other > archs are adapted as well so that we don't keep a different approach only > for these two ones. I don't see any technical benefit for x86-64, so I don't think there is a need in doing this. Though I personally prefer to use register constraints if they exist instead of register variables for everything (oh yeah, matter of taste since I don't have any technical argument to say it's better respecting the resulting codegen). The only real issue is for the syscall6() implementation on i386 as we've been bitten by a real compiler issue. In short, I am neutral on this change. Regards~~ -- Viro