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, PPC] Cleanup Altivec instruction definitions


On Tue, 28 Aug 2012 22:04:42 -0500 Peter Bergner wrote:

> On Sat, 25 Aug 2012 01:30:17 -0500 Peter Bergner wrote:
> > opcodes/
> > 	* ppc-opc.c (UIMM4, UIMM3, UIMM2, VXVA_MASK, VXVB_MASK, VXVAVB_MASK,
> > 	VXVDVA_MASK, VXUIMM4_MASK, VXUIMM3_MASK, VXUIMM2_MASK): New defines.
> > 	(powerpc_opcodes) <vexptefp, vlogefp, vrefp, vrfim, vrfin, vrfip,
> > 	vrfiz, vrsqrtefp, vupkhpx, vupkhsb, vupkhsh, vupklpx, vupklsb,
> > 	vupklsh>: Use VXVA_MASK.
> > 	<vspltisb, vspltish, vspltisw>: Use VXVB_MASK.
> > 	<mfvscr>: Use VXVAVB_MASK.
> > 	<mtvscr>: Use VXVDVA_MASK.
> > 	<vspltb>: Use VXUIMM4_MASK.
> > 	<vsplth>: Use VXUIMM3_MASK.
> > 	<vspltw>: Use VXUIMM2_MASK.
> 
> I have committed this to both the trunk and the branch.

Here's another place that needs tightening that I have committed
to both trunk and the branch.

Peter


	* ppc-opc.c (VXASHB_MASK): New define.
	(powerpc_opcodes) <vsldoi>: Use VXASHB_MASK.

Index: opcodes/ppc-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
retrieving revision 1.152
diff -u -p -r1.152 ppc-opc.c
--- opcodes/ppc-opc.c	28 Aug 2012 16:41:07 -0000	1.152
+++ opcodes/ppc-opc.c	29 Aug 2012 22:29:32 -0000
@@ -2348,6 +2348,9 @@ extract_vleil (unsigned long insn,
 /* The mask for an VA form instruction.  */
 #define VXA_MASK VXA(0x3f, 0x3f)
 
+/* A VXA_MASK with a SHB field.  */
+#define VXASHB_MASK (VXA_MASK | (1 << 10))
+
 /* A VXR form instruction.  */
 #define VXR(op, xop, rc) (OP (op) | (((rc) & 1) << 10) | (((unsigned long)(xop)) & 0x3ff))
 
@@ -2837,7 +2840,7 @@ const struct powerpc_opcode powerpc_opco
 {"vsel",	VXA(4,	42),	VXA_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB, VC}},
 {"ps_add.",	A  (4,	21,1),	AFRC_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
 {"vperm",	VXA(4,	43),	VXA_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB, VC}},
-{"vsldoi",	VXA(4,	44),	VXA_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB, SHB}},
+{"vsldoi",	VXA(4,	44),	VXASHB_MASK, PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB, SHB}},
 {"ps_sel",	A  (4,	23,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
 {"vmaddfp",	VXA(4,	46),	VXA_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VC, VB}},
 {"ps_sel.",	A  (4,	23,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},


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