This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Handle extrdi and large register rotate values
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Peter Bergner <bergner at vnet dot ibm dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 8 Sep 2009 18:32:56 +0930
- Subject: Re: Handle extrdi and large register rotate values
- References: <1251412176.5257.51.camel@otta> <20090828001501.GA19523@bubble.grove.modra.org> <20090828003952.GB19523@bubble.grove.modra.org> <1251494962.5257.77.camel@otta> <20090829020655.GL19523@bubble.grove.modra.org>
Applied to current mainline and the 2.20 branch.
* ppc-opc.c (powerpc_macros <extrdi>): Allow n+b of 64.
Index: opcodes/ppc-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
retrieving revision 1.121
diff -u -p -r1.121 ppc-opc.c
--- opcodes/ppc-opc.c 7 Apr 2009 18:28:02 -0000 1.121
+++ opcodes/ppc-opc.c 8 Sep 2009 08:26:52 -0000
@@ -5301,8 +5301,8 @@ const int powerpc_num_opcodes =
const struct powerpc_macro powerpc_macros[] = {
{"extldi", 4, PPC64, "rldicr %0,%1,%3,(%2)-1"},
{"extldi.", 4, PPC64, "rldicr. %0,%1,%3,(%2)-1"},
-{"extrdi", 4, PPC64, "rldicl %0,%1,(%2)+(%3),64-(%2)"},
-{"extrdi.", 4, PPC64, "rldicl. %0,%1,(%2)+(%3),64-(%2)"},
+{"extrdi", 4, PPC64, "rldicl %0,%1,((%2)+(%3))&((%2)+(%3)<>64),64-(%2)"},
+{"extrdi.", 4, PPC64, "rldicl. %0,%1,((%2)+(%3))&((%2)+(%3)<>64),64-(%2)"},
{"insrdi", 4, PPC64, "rldimi %0,%1,64-((%2)+(%3)),%3"},
{"insrdi.", 4, PPC64, "rldimi. %0,%1,64-((%2)+(%3)),%3"},
{"rotrdi", 3, PPC64, "rldicl %0,%1,(-(%2)!63)&((%2)|63),0"},
--
Alan Modra
Australia Development Lab, IBM