Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp273040rdb; Thu, 22 Feb 2024 03:22:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVGWzD2qKaTineWMxTiKYz4snMHSWn6bTXw6JA4GBlLikoXhGykhTNLOIhSbOdGOPZJ2bbjQKzt8ILcvsdW5djcig6CS77WDAxSrOyItg== X-Google-Smtp-Source: AGHT+IFmMqFG2U1Lq9r+lliapFCcQVOPkeJiftBWUUqfqru7SE78iUgYX9AIralA+TQyGf2IGfyW X-Received: by 2002:a05:6e02:1be8:b0:365:4b67:df58 with SMTP id y8-20020a056e021be800b003654b67df58mr8278920ilv.0.1708600935350; Thu, 22 Feb 2024 03:22:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708600935; cv=pass; d=google.com; s=arc-20160816; b=ohw7/TPm5H/aJYnAbuYNJszbLun3hdBQ9k1CnMoOOukHXt+dvxH2gxXaDlJYoppgR3 bJv36FKzLtokdpyU/pYN3YGWoaIdCEVfWrDao1xL0oDQX3Xf8P+tBNUld/J+1hXLkQDw 5zo9UpRCdKSdy6Jc432RFhc7k7YKYv6KzFR4YQZHA+zM3LlLqOEBRVs70aTOoXVNpx5N qSCOoMvaJLz4ts0FhMNUNtbMrdMRjCB8rz4zY/vgqRor9XX6O5uk+fK6CnCEpnro/pQt 7h5cZtJrQbEmbgRBewYWSPIUvDnepEKewkP4/+8Mz9GH37mgruGE1pHaoRjvd6LNS2DZ IfvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=f0WDjPpBEd8T8+uDymIvKTcUlaDMEk2bJipS39+mDFQ=; fh=Hu45STTqb7AiaRzx9E09MDox39bxU5VqqiroUJtANag=; b=nn18fGlxJL6Y24Ok7b1ZatBqbzpk9tghKXuQ3bR130YmkKzBcSUAB40fSEO/7UwDIs 25iX0icl3RfpguPz7SZJsexBu9lM3cnBbTGTl30skm7mA/40qQeu8l2d91A2joaO3FaT mUfmgaVg/Ox7+obsTjFSzw7q8RPl0Wz4BORUgrVHouncK29mOqL4aBX6Zr384ru0Kaux wdX+eNHO+FG8ayqAJ0MMyJNLSJzmPmrJnjQKqWmbtmvvpd9TSuSG0mOnuk7KNDkKiDZN Y9Ss8cngeP/lhLwRh0lApmT1wJFr2ZYbCSe8w2GNIZ/ynYcsp1M5XUP3lhL5JFeJnh6c DFvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=l+JLbPaq; dkim=pass header.i=@suse.com header.s=susede1 header.b=l+JLbPaq; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-76391-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76391-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b6-20020a6567c6000000b005dc89485b21si10061074pgs.535.2024.02.22.03.22.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:22:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76391-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=l+JLbPaq; dkim=pass header.i=@suse.com header.s=susede1 header.b=l+JLbPaq; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-76391-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76391-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 49251B22C17 for ; Thu, 22 Feb 2024 11:17:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B28941775; Thu, 22 Feb 2024 11:16:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="l+JLbPaq"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="l+JLbPaq" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AEC8208A2 for ; Thu, 22 Feb 2024 11:16:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708600613; cv=none; b=Ia6yN5VGozqaf7PNNwIorEO8PMMBsxlVWJEhOSZ3Pkr7Sy06YEVrUDQ8R6iGlZdk5i8tbOfwIJ2BCtOiP0NNB2Hlp1vT89F+4r8nizasd+BK1iXkIJIfAwOI95NOZ5oUwVEWd3ePaDBUdF/75eUHCwsTGZvC//dkJRW2NyYUNdU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708600613; c=relaxed/simple; bh=UudV8mpjkdJ5wQfiRKfqyLU7x/qxGZ9m5FYON9r4mo0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=qOY+RTt9JwqLtwZzXs5O+p/LwWDPb1qDX056SZtJ1HAw7NxKiPpR/PiEMX2p9MWB9chjeYqHPCrDYo42CpmswrrhjC2M9o7ASAUhUaSvZ3rL2KJGy6Rme23sScjtss5l/uCpH3BpnHDB09oMq8JELjiGp7eND6LAVGE72rN0CJ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=l+JLbPaq; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=l+JLbPaq; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E890C1F457; Thu, 22 Feb 2024 11:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1708600609; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=f0WDjPpBEd8T8+uDymIvKTcUlaDMEk2bJipS39+mDFQ=; b=l+JLbPaq25ao+vDyscSAN90wt2Aj42HDL+FaXFFMt4hW2273hPfd0iN73ptpstUP/cXm1c iLvx8Kz9gsDrAjp1DTbTI5CaQFWUOax43segG2JJYyQDsDQBzcpVWjrHNgLyZhRta6j05T nAC2Zz9Zc51CcZXPyLLKaYtyVpZ/RmI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1708600609; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=f0WDjPpBEd8T8+uDymIvKTcUlaDMEk2bJipS39+mDFQ=; b=l+JLbPaq25ao+vDyscSAN90wt2Aj42HDL+FaXFFMt4hW2273hPfd0iN73ptpstUP/cXm1c iLvx8Kz9gsDrAjp1DTbTI5CaQFWUOax43segG2JJYyQDsDQBzcpVWjrHNgLyZhRta6j05T nAC2Zz9Zc51CcZXPyLLKaYtyVpZ/RmI= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A174313A8C; Thu, 22 Feb 2024 11:16:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id pn8BJSEt12VrGgAAD6G6ig (envelope-from ); Thu, 22 Feb 2024 11:16:49 +0000 From: Nikolay Borisov To: bp@alien8.de Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Nikolay Borisov Subject: [PATCH 0/2] Cleanup x86 instruction decoder Date: Thu, 22 Feb 2024 13:16:34 +0200 Message-Id: <20240222111636.2214523-1-nik.borisov@suse.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: *** X-Spam-Score: 3.70 X-Spamd-Result: default: False [3.70 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_SPAM(0.00)[41.09%]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO First patch removes some duplicated checks in caller/callee second one is trivial to remove a check in init_ins() Nikolay Borisov (2): x86/insn: Remove superfluous checks from instruction decoding routines x86/insn: Directly assign x86_64 state in init_ins arch/x86/lib/insn.c | 58 +++++++++++++++------------------------ tools/arch/x86/lib/insn.c | 58 +++++++++++++++------------------------ 2 files changed, 44 insertions(+), 72 deletions(-) -- 2.34.1