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]

[PATCH] Add 464 support to PowerPC.


This patch adds support for the 464 ppc processor which from an ISA perspective
is a 440 with two extra instructions.  Talking with Alan at the GCC Summit,
we agreed adding a cpu_opcode_t bit for this was overkill and we would just
add the opcodes to the 440 opcodes and map the 464 to a 440.
Is this ok for mainline?

Peter

gas/
	* config/tc-ppc.c (parse_cpu): Handle -m464.
	(md_show_usage): Likewise.

opcodes/
	* ppc-dis.c (powerpc_init_dialect): Handle -M464.
	(print_ppc_disassembler_options): Likewise.
	* ppc-opc.c (powerpc_opcodes): Add mfdcrux and mtdcrux.

Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.137
diff -u -p -r1.137 tc-ppc.c
--- gas/config/tc-ppc.c	13 Jun 2008 20:16:00 -0000	1.137
+++ gas/config/tc-ppc.c	24 Jun 2008 22:13:24 -0000
@@ -854,7 +854,8 @@ parse_cpu (const char *arg)
 	   || strcmp (arg, "405") == 0)
     ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC
 	       | PPC_OPCODE_403 | PPC_OPCODE_32);
-  else if (strcmp (arg, "440") == 0)
+  else if (strcmp (arg, "440") == 0
+	   || strcmp (arg, "464") == 0)
     ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_32
 	       | PPC_OPCODE_440 | PPC_OPCODE_ISEL | PPC_OPCODE_RFMCI);
   else if (strcmp (arg, "7400") == 0
@@ -1123,6 +1124,7 @@ PowerPC options:\n\
 			generate code for PowerPC 603/604\n\
 -m403, -m405		generate code for PowerPC 403/405\n\
 -m440			generate code for PowerPC 440\n\
+-m464			generate code for PowerPC 464\n\
 -m7400, -m7410, -m7450, -m7455\n\
 			generate code for PowerPC 7400/7410/7450/7455\n\
 -m750cl			generate code for PowerPC 750cl\n"));
Index: opcodes/ppc-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-dis.c,v
retrieving revision 1.32
diff -u -p -r1.32 ppc-dis.c
--- opcodes/ppc-dis.c	13 Jun 2008 20:16:00 -0000	1.32
+++ opcodes/ppc-dis.c	24 Jun 2008 22:13:24 -0000
@@ -85,7 +85,8 @@ powerpc_init_dialect (struct disassemble
 	   && strstr (info->disassembler_options, "e300") != NULL)
     dialect |= PPC_OPCODE_E300 | PPC_OPCODE_CLASSIC | PPC_OPCODE_COMMON;
   else if (info->disassembler_options
-	   && strstr (info->disassembler_options, "440") != NULL)
+	   && (strstr (info->disassembler_options, "440") != NULL
+	       || strstr (info->disassembler_options, "464") != NULL))
     dialect |= PPC_OPCODE_BOOKE | PPC_OPCODE_32
       | PPC_OPCODE_440 | PPC_OPCODE_ISEL | PPC_OPCODE_RFMCI;
   else
@@ -388,6 +389,7 @@ the -M switch:\n");
   fprintf (stream, "  e500|e500x2              Disassemble the e500 instructions\n");
   fprintf (stream, "  e500mc                   Disassemble the e500mc instructions\n");
   fprintf (stream, "  440                      Disassemble the 440 instructions\n");
+  fprintf (stream, "  464                      Disassemble the 464 instructions\n");
   fprintf (stream, "  efs                      Disassemble the EFS instructions\n");
   fprintf (stream, "  ppcps                    Disassemble the PowerPC paired singles instructions\n");
   fprintf (stream, "  power4                   Disassemble the Power4 instructions\n");
Index: opcodes/ppc-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
retrieving revision 1.106
diff -u -p -r1.106 ppc-opc.c
--- opcodes/ppc-opc.c	13 Jun 2008 20:16:00 -0000	1.106
+++ opcodes/ppc-opc.c	24 Jun 2008 22:13:25 -0000
@@ -3527,6 +3527,8 @@ const struct powerpc_opcode powerpc_opco
 {"lhzxe",	X(31,287),	X_MASK,      BOOKE64,	{RT, RA0, RB}},
 {"lhepx",	X(31,287),	X_MASK,      E500MC,	{RT, RA, RB}},
 
+{"mfdcrux",	X(31,291),	X_MASK,      PPC440,	{RS, RA}},
+
 {"tlbie",	X(31,306),	XRTLRA_MASK, PPC,	{RB, L}},
 {"tlbi",	X(31,306),	XRT_MASK,    POWER,	{RA0, RB}},
 
@@ -3818,6 +3820,8 @@ const struct powerpc_opcode powerpc_opco
 {"sthxe",	X(31,415),	X_MASK,      BOOKE64,	{RS, RA0, RB}},
 {"sthepx",	X(31,415),	X_MASK,      E500MC,	{RS, RA, RB}},
 
+{"mtdcrux",	X(31,419),	X_MASK,      PPC440,	{RA, RS}},
+
 {"slbie",	X(31,434),	XRTRA_MASK,  PPC64,	{RB}},
 
 {"ecowx",	X(31,438),	X_MASK,      PPC,	{RT, RA, RB}},


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