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=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by gnuweeb.org (Postfix) with ESMTPS id AFE218060F for ; Fri, 5 Aug 2022 09:42:11 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=txNdr1aF; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=/1jzst56; dkim-atps=neutral Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CA0DE37CCA; Fri, 5 Aug 2022 09:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1659692529; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NmUGqiht02KBLjl2jJqe0krBskvbflhz7qY616lDJqk=; b=txNdr1aFXCn+7avVaUrBxGT8KhhbEulqaTl3HtOZlnRgC49ij/c9UVxLe107921XqE6ws6 HzeQ7nLvAbhApcRk4sQvx52jsRUOJuWylNHVoev7uvL+q2Vr4eI/xpoSvjgh57HM7ycC3F vyGWN0v2sgUUK0mL7WxRXfGkSUl47t4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1659692529; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NmUGqiht02KBLjl2jJqe0krBskvbflhz7qY616lDJqk=; b=/1jzst56ywD7Anfj7VQuVpJ+XMFNy4da9AWYV2twMsnG1ecFxwdDnYPSukXPmR4rdeua8s ZcvLEw7n03DUovDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 22158133B5; Fri, 5 Aug 2022 09:42:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id K61/BvHl7GL/WAAAMHmgww (envelope-from ); Fri, 05 Aug 2022 09:42:09 +0000 Date: Fri, 5 Aug 2022 11:42:07 +0200 From: Joerg Roedel To: David Laight Cc: 'Kanna Scarlet' , Borislav Petkov , Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , "x86@kernel.org" , Ard Biesheuvel , Bill Metzenthen , Brijesh Singh , 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> <20220804180805.9077-1-knscarlet@gnuweeb.org> <126271e264204581a42b079b51481740@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <126271e264204581a42b079b51481740@AcuMS.aculab.com> List-Id: On Fri, Aug 05, 2022 at 09:26:02AM +0000, David Laight wrote: > Use "xor %rax,%rax" instead of "xor %eax,%eax" to save > the 'reg' prefix. Also, some places explicitly use the mov variant to zero a register without touching rflags. Please be careful to not change those. Regards, -- Jörg Rödel jroedel@suse.de SUSE Software Solutions Germany GmbH Frankenstraße 146 90461 Nürnberg Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman