This is the mail archive of the binutils@sources.redhat.com 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]

ppc: EXTSW and EXTSW. instructions do no exist in BookE 32-bit


Hi Guys,

  The 32-bit version of the BookE instruction set does not support
  the EXTSW and EXTSW. instructions.  The attached patch takes care of
  this problem.

Cheers
       Nick

gas/ChangeLog
2002-09-04  Nick Clifton  <nickc@redhat.com>

	* config/tc-ppc.c (md_begin): Do not insert non-BookE32
	instructions into the hash table if the target cpu is the BookE32.

opcodes/ChangeLog
2002-09-04  Nick Clifton  <nickc@redhat.com>

	* ppc-opc.c (extsw, extsw.): Do not allow for the BookE32.

Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.55
diff -c -3 -p -w -r1.55 tc-ppc.c
*** gas/config/tc-ppc.c	21 Aug 2002 23:37:34 -0000	1.55
--- gas/config/tc-ppc.c	4 Sep 2002 12:33:04 -0000
*************** md_begin ()
*** 1207,1212 ****
--- 1207,1220 ----
  	      || ((op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64))
  		  == (ppc_cpu & (PPC_OPCODE_32 | PPC_OPCODE_64)))
  	      || (ppc_cpu & PPC_OPCODE_64_BRIDGE) != 0)
+ 	  /* Certain instructions (eg: extsw) do not exist in the
+ 	     32-bit BookE instruction set, but they do exist in the
+ 	     64-bit BookE instruction set, and other PPC instruction
+ 	     sets.  Check to see if the opcode has the BOOKE64 flag set.
+ 	     If it does make sure that the target CPU is not the BookE32.  */
+ 	  && ((op->flags & PPC_OPCODE_BOOKE64) == 0
+ 	      || (ppc_cpu & PPC_OPCODE_BOOKE64) == PPC_OPCODE_BOOKE64
+ 	      || (ppc_cpu & PPC_OPCODE_BOOKE) == 0)
  	  && ((op->flags & (PPC_OPCODE_POWER4 | PPC_OPCODE_NOPOWER4)) == 0
  	      || ((op->flags & PPC_OPCODE_POWER4)
  		  == (ppc_cpu & PPC_OPCODE_POWER4))))

Index: opcodes/ppc-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
retrieving revision 1.36
diff -c -3 -p -w -r1.36 ppc-opc.c
*** opcodes/ppc-opc.c	4 Sep 2002 09:59:48 -0000	1.36
--- opcodes/ppc-opc.c	4 Sep 2002 12:33:07 -0000
*************** const struct powerpc_opcode powerpc_opco
*** 4238,4245 ****
  
  { "stfiwx",  X(31,983),	X_MASK,		PPC,		{ FRS, RA, RB } },
  
! { "extsw",   XRC(31,986,0), XRB_MASK,	PPC,		{ RA, RS } },
! { "extsw.",  XRC(31,986,1), XRB_MASK,	PPC,		{ RA, RS } },
  
  { "icread",  X(31,998),	XRT_MASK,	PPC403,		{ RA, RB } },
  
--- 4238,4245 ----
  
  { "stfiwx",  X(31,983),	X_MASK,		PPC,		{ FRS, RA, RB } },
  
! { "extsw",   XRC(31,986,0), XRB_MASK,	PPC | BOOKE64,	{ RA, RS } },
! { "extsw.",  XRC(31,986,1), XRB_MASK,	PPC | BOOKE64,	{ RA, RS } },
  
  { "icread",  X(31,998),	XRT_MASK,	PPC403,		{ RA, RB } },
  



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