From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by sourceware.org (Postfix) with ESMTPS id 4382F3858C2C; Sat, 23 Apr 2022 01:37:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4382F3858C2C Received: by mail-qk1-x72c.google.com with SMTP id d198so7037058qkc.12; Fri, 22 Apr 2022 18:37:18 -0700 (PDT) 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=2eNZBoRlRw5CwiUciE8/KnthhCj03DADh2WXDbeesIQ=; b=C8+7fxop9lr5UzXD5vmang6XNN4e2tBJQCOR2Gup6VgpNHQPkNFNCodg7HpG3qYh1l 2N3TwE3PcOVbgR5RKq9IozvkalrOtpXkmkLj8GaYozE7tWOLR0kgZfB131avTAMWzrY4 HMHh1L0DZPbvEohS5v+u2+AS7Vi79qQksxFdtNUdmsMCReEKOHsskiVPg6SXi16Me43I k3HIzCsBHTLQvb138vpwXP1EmZETS9fEYZ2R70OAB0hcs4nmtYD0NvZ1jglVak4yxquX UziC3sSeeFns4ONk4K0LquyHXtt2HQzUBViVg0NGSC/fArKPhsZyLJufEg2X8AAjqv9C EBwA== X-Gm-Message-State: AOAM532FKHlIaiDrj7qrDgbWU3L0eH9+EcCMO3a6TjStBeE/mrFD9XE0 VV4mqdVJZaqW4chmTTVdLCaHtqCwoI25/gV4WkQ= X-Google-Smtp-Source: ABdhPJyqUHkh4bs/YM3oN5+aj2lFAEqQApx8/BNtTsRikV1nMHq2wVSC9TfjOsPTVRR3cuGRPwwdM/Ksx33X6PxBJFE= X-Received: by 2002:a05:620a:d87:b0:67b:f949:1ee6 with SMTP id q7-20020a05620a0d8700b0067bf9491ee6mr4576982qkl.140.1650677837681; Fri, 22 Apr 2022 18:37:17 -0700 (PDT) MIME-Version: 1.0 References: <20211102204459.3405575-1-maskray@google.com> <20211103011531.yiuufsybf5e56rnt@google.com> In-Reply-To: <20211103011531.yiuufsybf5e56rnt@google.com> From: Sunil Pandey Date: Fri, 22 Apr 2022 18:36:42 -0700 Message-ID: Subject: Re: [PATCH] x86-64: Replace movzx with movzbl To: Fangrui Song , libc-stable@sourceware.org Cc: "H.J. Lu" , GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, HK_RANDOM_ENVFROM, HK_RANDOM_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-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2022 01:37:19 -0000 On Tue, Nov 2, 2021 at 6:16 PM Fangrui Song via Libc-alpha wrote: > > On 2021-11-02, H.J. Lu wrote: > >On Tue, Nov 2, 2021 at 1:45 PM Fangrui Song wrote: > >> > >> Clang cannot assemble movzx in the AT&T dialect mode. > >> > >> ../sysdeps/x86_64/strcmp.S:2232:16: error: invalid operand for instruction > >> movzx (%rsi), %ecx > >> ^~~~ > >> > >> Change movzx to movzbl, which follows the AT&T dialect and is used > >> elsewhere in the file. > >> --- > >> sysdeps/x86_64/strcmp.S | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/sysdeps/x86_64/strcmp.S b/sysdeps/x86_64/strcmp.S > >> index c7cbe4042a..bfe83abede 100644 > >> --- a/sysdeps/x86_64/strcmp.S > >> +++ b/sysdeps/x86_64/strcmp.S > >> @@ -2229,8 +2229,8 @@ LABEL(strcmp_exitz): > >> > >> .p2align 4 > >> LABEL(Byte0): > >> - movzx (%rsi), %ecx > >> - movzx (%rdi), %eax > >> + movzbl (%rsi), %ecx > >> + movzbl (%rdi), %eax > >> > >> #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L > >> leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rdx > >> -- > >> 2.33.1.1089.g2158813163f-goog > >> > > > >LGTM. > > > >Reviewed-by: H.J. Lu > > > >Thanks. > > Thanks for the quick review! > > Just noticed that sysdeps/x86_64/multiarch/strcmp-sse42.S has a similar > pattern which needs fixing as well. I'll fix that, too. I would like to backport this patch to release branches. Any comments or objections? --Sunil