From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22009 invoked by alias); 3 Jun 2019 02:26:33 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 21994 invoked by uid 89); 3 Jun 2019 02:26:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=Beulich, beulich, H*i:sk:5CF36DA, H*f:sk:5CF36DA X-HELO: mail-pg1-f194.google.com Received: from mail-pg1-f194.google.com (HELO mail-pg1-f194.google.com) (209.85.215.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Jun 2019 02:26:31 +0000 Received: by mail-pg1-f194.google.com with SMTP id s27so1756944pgl.2 for ; Sun, 02 Jun 2019 19:26:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=An+LettQNT8yfmEA7vjPrZC2vyV/L8WMHdLa56Z8PRE=; b=GkuoLZY9WsO+LmD9JFmL7SaQiDI765WKGfYDehmAEhp3/XXFGsyrdUb8XOGjYuxdDz kDKhP5AYXPefh2ZWvW2CyJOX2YhNj2SLEceTiCKL5v4v40S1XgoakrmyR6Muaf2MHAZW 0L1YCQaw5tpCQc7S2amCl+Z4lgDnDxWqXC7DTTQtNRIFT9Fw9TsDCwfmi4xq5fM1xWqS NZqfb5GFYZ1Q02LS502A2jOxo1S1jf7eCt9wNFtVmzhVlkMGylGDSynTO33lx4Ktx80v 8DeKU6go36jOuBv4DR5RU3yKTvgNDk1bipAZVLqF1BId9wFnQjCxv7beIE3c8gpeBVRY J3Tw== Return-Path: Received: from bubble.grove.modra.org ([2406:3400:51d:8cc0:a961:7819:434:75df]) by smtp.gmail.com with ESMTPSA id m7sm19171078pff.44.2019.06.02.19.26.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 Jun 2019 19:26:29 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 682C6804ED; Mon, 3 Jun 2019 11:56:25 +0930 (ACST) Date: Mon, 03 Jun 2019 02:26:00 -0000 From: Alan Modra To: Jan Beulich Cc: binutils@sourceware.org Subject: Re: [PATCH 1/5] PowerPC add initial -mfuture instruction support Message-ID: <20190603022625.GD6820@bubble.grove.modra.org> References: <20190524013110.GC6820@bubble.grove.modra.org> <20190524013332.GD6820@bubble.grove.modra.org> <5CF36DAB020000780015AC53@prv1-mh.provo.novell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5CF36DAB020000780015AC53@prv1-mh.provo.novell.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00004.txt.bz2 On Sun, Jun 02, 2019 at 12:33:15AM -0600, Jan Beulich wrote: > Alan, > > >>> Alan Modra 05/24/19 3:33 AM >>> > >@@ -376,6 +381,8 @@ powerpc_init_dialect (struct disassemble_info *info) > > > >#define PPC_OPCD_SEGS (1 + PPC_OP (-1)) > >static unsigned short powerpc_opcd_indices[PPC_OPCD_SEGS + 1]; > >+#define PREFIX_OPCD_SEGS (1 + PPC_PREFIX_SEG (-1)) > >+static unsigned short prefix_opcd_indices[PPC_OPCD_SEGS+1]; > > Isn't the array dimension a copy-and-paste mistake, i.e. shouldn't it be > PREFIX_OPCD_SEGS + 1 ? Thanks Jan, yes the array size should be smaller. * ppc-dis.c (prefix_opcd_indices): Correct size. diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c index 9334be2138..2f5756b6cc 100644 --- a/opcodes/ppc-dis.c +++ b/opcodes/ppc-dis.c @@ -382,7 +382,7 @@ powerpc_init_dialect (struct disassemble_info *info) #define PPC_OPCD_SEGS (1 + PPC_OP (-1)) static unsigned short powerpc_opcd_indices[PPC_OPCD_SEGS + 1]; #define PREFIX_OPCD_SEGS (1 + PPC_PREFIX_SEG (-1)) -static unsigned short prefix_opcd_indices[PPC_OPCD_SEGS+1]; +static unsigned short prefix_opcd_indices[PREFIX_OPCD_SEGS + 1]; #define VLE_OPCD_SEGS (1 + VLE_OP_TO_SEG (VLE_OP (-1, 0xffff))) static unsigned short vle_opcd_indices[VLE_OPCD_SEGS + 1]; #define SPE2_OPCD_SEGS (1 + SPE2_XOP_TO_SEG (SPE2_XOP (-1))) -- Alan Modra Australia Development Lab, IBM