From patchwork Mon Nov 28 04:43:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 26493 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5432319wrr; Sun, 27 Nov 2022 20:44:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf652RwZp4RaKi+V4qF3PeRr6HyZY89BuIl6rDi18C8PUQnfH2QZ8v8Uv7Xl/F9IsTkgmevt X-Received: by 2002:a17:906:1695:b0:7aa:493b:679 with SMTP id s21-20020a170906169500b007aa493b0679mr25788461ejd.320.1669610669837; Sun, 27 Nov 2022 20:44:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669610669; cv=none; d=google.com; s=arc-20160816; b=PhxQvQaF/glUTLmBvYpcNZDskUKgt1rwGG6OEeNghKVD6Dvo9x/W3Cb7xLnRC1N6Vy agLIZcZk7lYK/cE4rk6W2yBEyLq8vFgd1dlUOKhp2PTN4WE8F8rHisTvGViwUjDUKlf+ LsOVDShqDaUfSEfjcvTzjcrhzKgvc6u5hjUm/ZZCqKNUybgbwRd1wKR19gRu3HSrGoq9 RtRUulKctCNO0S7fdhL/WfJ+ev8hFIxwtvgJqsqji701inu72rIXqqWBSzNjOWg+U4DN NjfbHATQ0Wo6CDaU7dggpXKY7/k+ps1kLVcae+8iDFky6jpH2nNrj1PsdhALj2nfUKQB 3v5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=qJef31EYBv3kk2BeFCjhXOpP9jMnQ3/rB8hh0u3Iupc=; b=duYlvX6Gl5F5QSDTsN20NeU46FzFkh/2xQEjrXtpcZbUen5+bKQNYSTqxXBm/fkVSX wYfVnEdQnJur4XuDu9iufRQV30bsJFOYc7csYsoGMCkB1ZhkZCJtsMU5mqkJ28spXHKg LGSzR2LJZYTSVdBusTOHNPgwdn0k72+EtXsorflDaCa3mtBYRedYAs9Ob7AgjKX4Lhkf 1ipnpYUIM9Kiw5zQX3M3IMw9aYrQ2CaFcb9AYB7q5QOTKKWRNqqBtgUAOSVjjFQOA4gx hvI+fOf+2/M4KhJ7gKC2uXnUnzagT8Dm7ot781clW4wzobI+issgjT2Gtc3UNb3dYBac 970Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=UxrxB8pA; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id hg4-20020a1709072cc400b007ae0e8f697fsi9493014ejc.652.2022.11.27.20.44.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 20:44:29 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=UxrxB8pA; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B861F385842B for ; Mon, 28 Nov 2022 04:44:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B861F385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669610667; bh=qJef31EYBv3kk2BeFCjhXOpP9jMnQ3/rB8hh0u3Iupc=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=UxrxB8pALRsYGnAUa72CTnfQjeAIVSwJ5mKxRRHTo2xQpQ5WDXZ09HDUCnDc3h5vl F65ReaXJzuTK+knP7yBZpfnj9xP2qSPsdm1AL61XV8pE+Nq3UGpoVe2+xjPtGnJG2K 7QsfvfX3yTT8enjzhye+aj2k9BJsA7gcReMFBsFM= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id D6213385802F for ; Mon, 28 Nov 2022 04:44:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D6213385802F Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 5FA66300089; Mon, 28 Nov 2022 04:44:15 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Cc: binutils@sourceware.org Subject: [PATCH v2 01/11] opcodes/riscv-dis.c: More tidying Date: Mon, 28 Nov 2022 04:43:36 +0000 Message-Id: <5965a4d1d20a33accd4a9872f87da9e0fd6c1747.1669610611.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749536766377404391?= X-GMAIL-MSGID: =?utf-8?q?1750713677771316030?= From: Tsukasa OI This is a general tidying commit. opcodes/ChangeLog: * riscv-dis.c (struct riscv_private_data) Add summary. Make length of hi_addr more meaningful. --- opcodes/riscv-dis.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c index 0e1f3b4610aa..768b44ee6003 100644 --- a/opcodes/riscv-dis.c +++ b/opcodes/riscv-dis.c @@ -52,11 +52,12 @@ static riscv_parse_subset_t riscv_rps_dis = false, /* check_unknown_prefixed_ext. */ }; +/* Private data structure for the RISC-V disassembler. */ struct riscv_private_data { bfd_vma gp; bfd_vma print_addr; - bfd_vma hi_addr[OP_MASK_RD + 1]; + bfd_vma hi_addr[NGPR]; bool to_print_addr; bool has_gp; };