From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D74A0C00140 for ; Fri, 5 Aug 2022 09:42:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240401AbiHEJmP (ORCPT ); Fri, 5 Aug 2022 05:42:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237309AbiHEJmM (ORCPT ); Fri, 5 Aug 2022 05:42:12 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43EB01263A for ; Fri, 5 Aug 2022 02:42:11 -0700 (PDT) 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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