From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id 9D7D43858C00 for ; Thu, 4 Aug 2022 08:13:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9D7D43858C00 Received: by mail-ed1-x52f.google.com with SMTP id e13so5380490edj.12 for ; Thu, 04 Aug 2022 01:13:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=KjqpZfWJ380e+l1tU3dok9y4B+jh1TT3kYMMjv4QzAo=; b=tV7L6ZoBcK9VpfE0C4NQ7ENkDuYQ8ZpuzhgmryqqM+v7WWsx4X+kjws/LzYtLVD6EX waeQ0344MVMWwf1BRDfct0ISmgTR0bMu/RkEndNAILIdKOOoBq1k6ADDuwfW8+CUyTnO D+kx1DFQjWdPtphMMch0gjh6ZEd6yJ1folEsT9vy+GhGygxdr39p1n+1X8u6huEm/dA7 8ntkhDQph86lQXGt1snESISGPmvkmxD9spAlwg+RFu7XXhUQGqN0haPgBYBMqzHBq5oS P5d/uyvjmNyvobqD7LUTt7zIwlhsb8KnX7NG49PsYEpnaZd8AKhAmoO67EIx7cQNuSKw QkdA== X-Gm-Message-State: ACgBeo0R3XtdNSxzRM8wy9blqveYtoTS998uCR8byvsYjVkXNB0A/Cqi A+Ir5wXMRL470El1d5ByOa2qBRk53G7gvuRXnV8= X-Google-Smtp-Source: AA6agR7bzfBOHTTDEAgpCna3APq/JhWY3DW8CJ75i9wZe7hLCWHvFlK3Fo/pis/f5IGYfbPJdXzXXdPgm5+/gKux2u0= X-Received: by 2002:aa7:dd4b:0:b0:43a:d508:7cb9 with SMTP id o11-20020aa7dd4b000000b0043ad5087cb9mr888600edw.218.1659600800960; Thu, 04 Aug 2022 01:13:20 -0700 (PDT) MIME-Version: 1.0 References: <20220804060432.2200849-1-maskray@google.com> In-Reply-To: <20220804060432.2200849-1-maskray@google.com> From: Noah Goldstein Date: Thu, 4 Aug 2022 16:13:08 +0800 Message-ID: Subject: Re: [PATCH] i386: Replace movzx with movzbl To: Fangrui Song Cc: GNU C Library , "H.J. Lu" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Thu, 04 Aug 2022 08:13:24 -0000 On Thu, Aug 4, 2022 at 2:04 PM Fangrui Song via Libc-alpha wrote: > > Similar to 6720d36b6623c5e48c070d86acf61198b33e144e for x86-64. > > Clang cannot assemble movzx in the AT&T dialect mode. Change movzx to > movzbl, which follows the AT&T dialect and is used elsewhere in the > file. > --- > sysdeps/i386/i686/multiarch/strcmp-ssse3.S | 36 +++++++++++----------- > 1 file changed, 18 insertions(+), 18 deletions(-) > > diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S > index ac5096f68d..3435691f23 100644 > --- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S > +++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S > @@ -2141,8 +2141,8 @@ L(less16bytes): > jbe L(eq) > #endif > > - movzx 7(%eax), %ecx > - movzx 7(%edx), %eax > + movzbl 7(%eax), %ecx > + movzbl 7(%edx), %eax > #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L > # ifdef PIC > movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx > @@ -2161,8 +2161,8 @@ L(Byte0): > cmp $0, REM > jbe L(eq) > #endif > - movzx (%eax), %ecx > - movzx (%edx), %eax > + movzbl (%eax), %ecx > + movzbl (%edx), %eax > > #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L > # ifdef PIC > @@ -2182,8 +2182,8 @@ L(Byte1): > cmp $1, REM > jbe L(eq) > #endif > - movzx 1(%eax), %ecx > - movzx 1(%edx), %eax > + movzbl 1(%eax), %ecx > + movzbl 1(%edx), %eax > > #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L > # ifdef PIC > @@ -2203,8 +2203,8 @@ L(Byte2): > cmp $2, REM > jbe L(eq) > #endif > - movzx 2(%eax), %ecx > - movzx 2(%edx), %eax > + movzbl 2(%eax), %ecx > + movzbl 2(%edx), %eax > > #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L > # ifdef PIC > @@ -2224,8 +2224,8 @@ L(Byte3): > cmp $3, REM > jbe L(eq) > #endif > - movzx 3(%eax), %ecx > - movzx 3(%edx), %eax > + movzbl 3(%eax), %ecx > + movzbl 3(%edx), %eax > > #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L > # ifdef PIC > @@ -2245,8 +2245,8 @@ L(Byte4): > cmp $4, REM > jbe L(eq) > #endif > - movzx 4(%eax), %ecx > - movzx 4(%edx), %eax > + movzbl 4(%eax), %ecx > + movzbl 4(%edx), %eax > > #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L > # ifdef PIC > @@ -2266,8 +2266,8 @@ L(Byte5): > cmp $5, REM > jbe L(eq) > #endif > - movzx 5(%eax), %ecx > - movzx 5(%edx), %eax > + movzbl 5(%eax), %ecx > + movzbl 5(%edx), %eax > > #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L > # ifdef PIC > @@ -2287,8 +2287,8 @@ L(Byte6): > cmp $6, REM > jbe L(eq) > #endif > - movzx 6(%eax), %ecx > - movzx 6(%edx), %eax > + movzbl 6(%eax), %ecx > + movzbl 6(%edx), %eax > > #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L > # ifdef PIC > @@ -2337,8 +2337,8 @@ L(2next_8_bytes): > cmp $7, REM > jbe L(eq) > #endif > - movzx 7(%eax), %ecx > - movzx 7(%edx), %eax > + movzbl 7(%eax), %ecx > + movzbl 7(%edx), %eax > > #if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L > # ifdef PIC > -- > 2.37.1.559.g78731f0fdb-goog > LGTM.