Message ID | 20240222111636.2214523-3-nik.borisov@suse.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-76393-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp181843dyb; Thu, 22 Feb 2024 03:17:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWc/dR37qvcSbTGvP3U894qiSXNXQAlK21OsnhaIeFNe+mB55lHTehsUX/PN7ewNCi+X1LkAaHqayRCwEtJm6dINY2DbQ== X-Google-Smtp-Source: AGHT+IE7wJdtYjcttcWkUYjw5Vl34y2E4/QHDXRY0iuEGAk5s9HpzXo53PWwfVoOB/WtXH/Ku+0X X-Received: by 2002:a50:d5d4:0:b0:563:d16b:a050 with SMTP id g20-20020a50d5d4000000b00563d16ba050mr12901627edj.42.1708600676632; Thu, 22 Feb 2024 03:17:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708600676; cv=pass; d=google.com; s=arc-20160816; b=JFJjJVEs1Be1IDZ6fxGKWHx34Ac8Gx5KqP0jOlZDzvGQsiVa9x+lPWetKBDyRumNyK xRqsPsjc7x4iYXv8aR6W593g+Rxsz4/c/yGVCmfAHRFC1lAK+nWHrJbzTnrYapeN1R5z O1XSWRxSFpdmyO9KIGGBWX7umR5nlaVZDYVEllpqERZgWea7x0NHHeC+c3aLPBLQf/va uI0SSTfW4CHGgV2Qf6OxbWOp3O6rJIa5NUlXOShOl9EprOnmQ8YktWTeBjFmbTle5e0E 0eviwC/AsqIDMnYNYW47RZ32zIcGZ0fPPnoJynSxC8ie84Wh0386qA3dW3IbnS6oQ4K+ XZAw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature; bh=5/YD9GWMk8p3PrUPaDfQKLAsZ5U02sG/PlLxn+IalyI=; fh=Hu45STTqb7AiaRzx9E09MDox39bxU5VqqiroUJtANag=; b=IEVKXlfxFxfIxup6Z7itUybBqhYS2+488McqzYb/VBPTdNkpLknHOHvaSlFOPVyAdx p3fZVGANO6R5FpuA+Nj9XXCwsv+AARE2dc5svmX0+RLgOLoPj02S2WE8tdl21ZOKcd+9 BxMhXCiDaSfvyXbav7hx8ok7muCMPZJ7ghjmoX2rnfUkkhhRKW6G6EZCscW0JvLfTpqv y88Vx0rvh5DbhMF+81sRTEP/83wlIMf5wrxQFPk00upQUXRf13pPOFW8GBLsW/LajhfX 3vqirZganQvRhh54olnbkd3t9ghK3LttDYv3omfsoxBxp3ulNFiUcF8HmtlV3RLHxC8G 1X1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=plA23eWb; dkim=pass header.i=@suse.com header.s=susede1 header.b=plA23eWb; 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-76393-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76393-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b17-20020a056402351100b005644ff02319si4201067edd.94.2024.02.22.03.17.56 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:17:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76393-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=plA23eWb; dkim=pass header.i=@suse.com header.s=susede1 header.b=plA23eWb; 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-76393-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76393-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 820A81F23A48 for <ouuuleilei@gmail.com>; Thu, 22 Feb 2024 11:17:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2BEB9219E8; Thu, 22 Feb 2024 11:16:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="plA23eWb"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="plA23eWb" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 5E9B2405F4 for <linux-kernel@vger.kernel.org>; Thu, 22 Feb 2024 11:16:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708600615; cv=none; b=Ea4SMQgQ6lUeWZVH72ljCijc+X53ef2BzJWiKfnXJnDFHyuZow15YZWb2zWlA+P1Bn9QO9rjsPG2WCU2xVmoHymUA1CE66tVzmNxy0zgTraQncdCzVnrsSZL27fEU+BVwDGxgmVaxBVTqNxwH1Jr3W4xsrE979yAJ5IDCRKSDZU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708600615; c=relaxed/simple; bh=wIBGGeIaNfSeyrkvzBZ1D01uQ3bxKni4qhhnuwVG9eg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PqeYt6JkvLdS5bhYv+WUyQx0HCNBCrvx/dbiRftbQIHeGhSfY+D9QTis+QxVaG125Q7SZaWNTeX8EINYdLkthnsLUL19cJ2wtvEEOnlxTr+0+rGWkr43Y+5t4lZ59GmwQxiJBzW+2xEe8Ke9mPFQsl9Ud4jwNcznc59xZyts9xo= 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=plA23eWb; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=plA23eWb; arc=none smtp.client-ip=195.135.223.130 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-out1.suse.de (Postfix) with ESMTPS id 9CF52222CA; Thu, 22 Feb 2024 11:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1708600610; 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: in-reply-to:in-reply-to:references:references; bh=5/YD9GWMk8p3PrUPaDfQKLAsZ5U02sG/PlLxn+IalyI=; b=plA23eWbwnmO0t1WdETuN6PXwZFwUFhm6Lil7pnbcZIBhhg3g/81arlXExOwvblMn9LPFe g2oDp+cuiM5JyIZIn6t/jEuPj5KpAtvb/56Jc+gf3EU4KtntSEJpwf0eoHVamodKKwXZPm ySfutLg+dAx4U+vw4ksQlexVgwQfuNo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1708600610; 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: in-reply-to:in-reply-to:references:references; bh=5/YD9GWMk8p3PrUPaDfQKLAsZ5U02sG/PlLxn+IalyI=; b=plA23eWbwnmO0t1WdETuN6PXwZFwUFhm6Lil7pnbcZIBhhg3g/81arlXExOwvblMn9LPFe g2oDp+cuiM5JyIZIn6t/jEuPj5KpAtvb/56Jc+gf3EU4KtntSEJpwf0eoHVamodKKwXZPm ySfutLg+dAx4U+vw4ksQlexVgwQfuNo= 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 5178913A8C; Thu, 22 Feb 2024 11:16:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id 2PmjESIt12VrGgAAD6G6ig (envelope-from <nik.borisov@suse.com>); Thu, 22 Feb 2024 11:16:50 +0000 From: Nikolay Borisov <nik.borisov@suse.com> To: bp@alien8.de Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Nikolay Borisov <nik.borisov@suse.com> Subject: [PATCH 2/2] x86/insn: Directly assign x86_64 state in init_ins Date: Thu, 22 Feb 2024 13:16:36 +0200 Message-Id: <20240222111636.2214523-3-nik.borisov@suse.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222111636.2214523-1-nik.borisov@suse.com> References: <20240222111636.2214523-1-nik.borisov@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [5.87 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_SPAM(4.97)[99.67%]; 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]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; 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-Level: ***** X-Spam-Score: 5.87 X-Spam-Flag: NO X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791597663339454800 X-GMAIL-MSGID: 1791597663339454800 |
Series |
Cleanup x86 instruction decoder
|
|
Commit Message
Nikolay Borisov
Feb. 22, 2024, 11:16 a.m. UTC
No point in checking again as this was already done by the caller.
Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
---
arch/x86/lib/insn.c | 2 +-
tools/arch/x86/lib/insn.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/lib/insn.c b/arch/x86/lib/insn.c index 3946bdc75087..1bb155a0955b 100644 --- a/arch/x86/lib/insn.c +++ b/arch/x86/lib/insn.c @@ -71,7 +71,7 @@ void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64) insn->kaddr = kaddr; insn->end_kaddr = kaddr + buf_len; insn->next_byte = kaddr; - insn->x86_64 = x86_64 ? 1 : 0; + insn->x86_64 = x86_64; insn->opnd_bytes = 4; if (x86_64) insn->addr_bytes = 8; diff --git a/tools/arch/x86/lib/insn.c b/tools/arch/x86/lib/insn.c index 5d81924478d9..ada4b4a79dd4 100644 --- a/tools/arch/x86/lib/insn.c +++ b/tools/arch/x86/lib/insn.c @@ -71,7 +71,7 @@ void insn_init(struct insn *insn, const void *kaddr, int buf_len, int x86_64) insn->kaddr = kaddr; insn->end_kaddr = kaddr + buf_len; insn->next_byte = kaddr; - insn->x86_64 = x86_64 ? 1 : 0; + insn->x86_64 = x86_64; insn->opnd_bytes = 4; if (x86_64) insn->addr_bytes = 8;