This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/5] PowerPC add initial -mfuture instruction support


On Sun, Jun 02, 2019 at 12:33:15AM -0600, Jan Beulich wrote:
> Alan,
> 
> >>> Alan Modra <amodra@gmail.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]