From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 739FA385829C for ; Thu, 4 Aug 2022 21:27:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 739FA385829C Received: by mail-pl1-x62b.google.com with SMTP id m2so971855pls.4 for ; Thu, 04 Aug 2022 14:27:46 -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=1w5QWga6aY6mg1/OYuBcPYuGP7eZ/01WYLSK94Md8ZM=; b=DizcY66ZF6Mm6W+kSvEixwpOaqQ/fvmTaPgJEy6cEA3uRSZdAGcqmuRNdtOmhd+I6M tjayyO3T0bkPVlYFDt8ZmmkQokn593lPj68Dwsu3oI1Itrs4Q1cGk+47ZLYZTrCZEGpx xVDGgdyoKosjPZImQsjQLyzSeSLBUl1Kao6uIy/aYbNB36tcX4R/1APNbEShL87rVwcU yH+uQS7z9qzv5mcRK4mjIR+h/guCadGlrRUO6mdl+uhprLGMuuzGdvVqBj9R2hVz666m Di64LJfF6PJ7SA/SlRhUYwocPqoiVbXZMVR8yvmHmeDTkMK8iwmP2bEWuyWiALSIYlT1 EYBQ== X-Gm-Message-State: ACgBeo2T8L8iTg663s742sj3gQQ1pa740uYZxNDgvuFiDIzxmQ4QFUl1 szJ39fgSuKtlCpIDJbD8Rgiiobh24wM0z43Eh0E= X-Google-Smtp-Source: AA6agR4LmMYPq/UTtA06ZUPkMwUYYswI2wKQLFmGLyH8ZLRgebMv2eOc/qx4QUmHSWLfzkOKReD05cPvjtfnSyfxaqw= X-Received: by 2002:a17:90b:3ec9:b0:1f5:7e38:1fd1 with SMTP id rm9-20020a17090b3ec900b001f57e381fd1mr2186504pjb.101.1659648465415; Thu, 04 Aug 2022 14:27:45 -0700 (PDT) MIME-Version: 1.0 References: <20220804060432.2200849-1-maskray@google.com> In-Reply-To: <20220804060432.2200849-1-maskray@google.com> From: "H.J. Lu" Date: Thu, 4 Aug 2022 14:27:09 -0700 Message-ID: Subject: Re: [PATCH] i386: Replace movzx with movzbl To: Fangrui Song Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3024.5 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 21:27:48 -0000 On Wed, Aug 3, 2022 at 11:04 PM Fangrui Song 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. Thanks. -- H.J.