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.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, T_SPF_HELO_TEMPERROR,T_SPF_TEMPERROR,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by gnuweeb.org (Postfix) with ESMTPS id 030A5807CA for ; Thu, 4 Aug 2022 15:53:37 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (1024-bit key; unprotected) header.d=alien8.de header.i=@alien8.de header.a=rsa-sha256 header.s=dkim header.b=qnZKNeN0; dkim-atps=neutral Received: from zn.tnic (p200300ea970f4fa7329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:970f:4fa7:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 87B551EC04D3; Thu, 4 Aug 2022 17:53:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1659628411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=abo3jbeF3qSuMw54GRiN5rY2eXZCIq4VNp+WXQVhrgc=; b=qnZKNeN0Y1dOTd6f2AeQaxcJu00g4Ic1ffDgz3Zdsvf5Dt5nR65wxSScvyWgynbry0+YYZ WorFioawtrKTyHcGcQBoARkTKfucvt7Nvt5/2avUiQVhtprSrWZsTqM6tQiOKKWsNfimFP yh0vFShV2K4LQjtgzxZyNsrW4M8nrCE= Date: Thu, 4 Aug 2022 17:53:27 +0200 From: Borislav Petkov To: Kanna Scarlet Cc: 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 Subject: Re: [PATCH 1/1] x86: Change mov $0, %reg with xor %reg, %reg Message-ID: References: <20220804152656.8840-1-knscarlet@gnuweeb.org> <20220804152656.8840-2-knscarlet@gnuweeb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220804152656.8840-2-knscarlet@gnuweeb.org> List-Id: On Thu, Aug 04, 2022 at 03:26:55PM +0000, Kanna Scarlet wrote: > Change mov $0, %reg with xor %reg, %reg because xor %reg, %reg is > smaller so it is good to save space Bonus points if you find out what other advantage XOR reg,reg has when it comes to clearing integer registers. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette