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]

Fix default cpu target for powerpc64


Fixes the default assembly mode for --target=powerpc64-*, and allows
the altivec test to pass for powerpc64.

gas/ChangeLog
	* config/tc-ppc.c (ppc_set_cpu): Use PPC_OPCODE_64 as the default
	rather than PPC_OPCODE_32 for powerpc64*.

gas/testsuite/ChangeLog
	* gas/ppc/altivec.d: Invoke "as" with "-a32".

Applying mainline and branch.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.51
diff -u -p -r1.51 tc-ppc.c
--- gas/config/tc-ppc.c	11 Jul 2002 01:07:49 -0000	1.51
+++ gas/config/tc-ppc.c	26 Jul 2002 04:06:50 -0000
@@ -1070,8 +1070,13 @@ ppc_set_cpu ()
       else if (strcmp (default_cpu, "rs6000") == 0)
 	ppc_cpu = PPC_OPCODE_POWER | PPC_OPCODE_32;
       else if (strncmp (default_cpu, "powerpc", 7) == 0)
-	ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_32;
+	{
+	  if (default_cpu[7] == '6' && default_cpu[8] == '4')
+	    ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64;
+	  else
+	    ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_32;
+	}
       else
 	as_fatal (_("Unknown default cpu = %s, os = %s"),
 		  default_cpu, default_os);
Index: gas/testsuite/gas/ppc/altivec.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/ppc/altivec.d,v
retrieving revision 1.2
diff -u -p -r1.2 altivec.d
--- gas/testsuite/gas/ppc/altivec.d	17 Apr 2002 14:43:26 -0000	1.2
+++ gas/testsuite/gas/ppc/altivec.d	26 Jul 2002 04:06:55 -0000
@@ -1,4 +1,4 @@
-#as: -m601 -maltivec
+#as: -a32 -m601 -maltivec
 #objdump: -Dr
 #name: AltiVec tests
 


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