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=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.86.80] (unknown [180.246.144.41]) by gnuweeb.org (Postfix) with ESMTPSA id 3976E80615; Mon, 8 Aug 2022 16:38:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1659976732; bh=D9li3UZHC7gHF0JnLSNNjigsZnnKC880jXkuikq7ErI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mPN/mvvSNwj2RIjPRetwc9wK2r0n9+e//wXGVKdtJ8L89A4M5BwlJ0xtfUK7v03v/ +2UGQXjkZRQEpsgLwp1FZSJahJp2EluMs/+SCk8QF19RYtrROgOEShSCfuzr9MpI9j LhCbl61evDdPrqKiNrUxtTBl78J/NgBjAp3t5uch+gENsIVRY/GBHpR2zkQs3O+DJz 2viYLIu+DZhW5iarc5I5lGZte3jYMF8pI4VbECv8yDWkXArTFnFDkuLZuOnndpWPJr BQ5/CfmsfxpXA8dNPLvz0JW0+AKGaSvHDyi9aNVYW3U8Ky4MRuB8x7u5ih8H9l5J4b tFuVLcJOda58w== Message-ID: <97c052a1-44e4-3c59-d4c8-34176d1d601a@gnuweeb.org> Date: Mon, 8 Aug 2022 23:38:34 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 1/1] x86: Change mov $0, %reg with xor %reg, %reg Content-Language: en-US To: David Laight Cc: Borislav Petkov , Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , "x86@kernel.org" , Ard Biesheuvel , Bill Metzenthen , Brijesh Singh , Joerg Roedel , Josh Poimboeuf , "Kirill A. Shutemov" , Mark Rutland , Michael Roth , Peter Zijlstra , Sean Christopherson , Steven Rostedt , Ammar Faizi , GNU/Weeb Mailing List , Linux Kernel Mailing List References: <20220804152656.8840-1-knscarlet@gnuweeb.org> <20220804152656.8840-2-knscarlet@gnuweeb.org> <20220804180805.9077-1-knscarlet@gnuweeb.org> <126271e264204581a42b079b51481740@AcuMS.aculab.com> From: Kanna Scarlet In-Reply-To: <126271e264204581a42b079b51481740@AcuMS.aculab.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 8/5/22 4:26 PM, David Laight wrote: > Use "xor %rax,%rax" instead of "xor %eax,%eax" to save > the 'reg' prefix. hello David Laight "xor %rax,%rax" is bigger because of rex prefix, "xor %eax,%eax" is smaller because it doesn't need rex prefix. asm: 0: 48 31 c0 xor %rax,%rax 3: 31 c0 xor %eax,%eax so i think to save from rex prefix, use xor %eax,%eax instead of xor %rax,%rax. Best regards, -- Kanna Scarlet