This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: powerpc-*-eabialtivec and powerpc-*-linux-gnualtivec triplets


hullo.

here is a patch to add new altivec triplets for native linux ppc +
altivec and eabi + altivec.

ok?

2001-12-12  Aldy Hernandez  <aldyh@redhat.com>

	* rs6000.c (rs6000_override_options): Add
	SUBSUBTARGET_OVERRIDE_OPTIONS.

	* eabialtivec.h: New file.
	
	* linuxaltivec.h: New file.

	* config.gcc: Add powerpc-*-eabialtivec and
	powerpc-*-linux-gnualtivec.

Index: config.gcc
===================================================================
RCS file: /cvs/uberbaum/gcc/config.gcc,v
retrieving revision 1.126
diff -c -p -r1.126 config.gcc
*** config.gcc	2001/12/10 11:18:31	1.126
--- config.gcc	2001/12/13 19:33:05
*************** powerpc-*-elf*)
*** 2699,2704 ****
--- 2699,2710 ----
  	tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
  	extra_headers=ppc-asm.h
  	;;
+ powerpc-*-eabialtivec*)
+ 	xm_defines=POSIX
+ 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
+ 	tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
+ 	extra_headers=ppc-asm.h
+ 	;;
  powerpc-*-eabi*)
  	xm_defines=POSIX
  	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h"
*************** powerpc-*-linux*libc1)
*** 2718,2723 ****
--- 2724,2738 ----
  	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
  	out_file=rs6000/rs6000.c
  	tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
+ 	extra_headers=ppc-asm.h
+ 	if test x$enable_threads = xyes; then
+ 		thread_file='posix'
+ 	fi
+ 	;;
+ powerpc-*-linux-gnualtivec*)
+ 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h"
+ 	out_file=rs6000/rs6000.c
+ 	tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
  	extra_headers=ppc-asm.h
  	if test x$enable_threads = xyes; then
  		thread_file='posix'
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.258
diff -c -p -r1.258 rs6000.c
*** rs6000.c	2001/12/09 18:49:29	1.258
--- rs6000.c	2001/12/13 19:33:07
*************** rs6000_override_options (default_cpu)
*** 505,510 ****
--- 505,513 ----
  #ifdef SUBTARGET_OVERRIDE_OPTIONS
    SUBTARGET_OVERRIDE_OPTIONS;
  #endif
+ #ifdef SUBSUBTARGET_OVERRIDE_OPTIONS
+   SUBSUBTARGET_OVERRIDE_OPTIONS;
+ #endif
  
    /* Set TARGET_AIX_STRUCT_RET last, after the ABI is determined.
       If -maix-struct-return or -msvr4-struct-return was explicitly
Index: config/rs6000/eabialtivec.h
===================================================================
RCS file: eabialtivec.h
diff -N eabialtivec.h
*** /dev/null	Tue May  5 13:32:27 1998
--- eabialtivec.h	Thu Dec 13 11:33:07 2001
***************
*** 0 ****
--- 1,31 ----
+ /* Core target definitions for GNU compiler
+    for PowerPC targeted systems with AltiVec support.
+    Copyright (C) 2001 Free Software Foundation, Inc.
+    Contributed by Aldy Hernandez (aldyh@redhat.com).
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
+ /* Add -meabi and -maltivec to target flags.  */
+ #undef TARGET_DEFAULT
+ #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_EABI | MASK_ALTIVEC)
+ 
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded with AltiVec)");
+ 
+ #undef SUBSUBTARGET_OVERRIDE_OPTIONS
+ #define SUBSUBTARGET_OVERRIDE_OPTIONS	rs6000_altivec_abi = 1
Index: config/rs6000/linuxaltivec.h
===================================================================
RCS file: linuxaltivec.h
diff -N linuxaltivec.h
*** /dev/null	Tue May  5 13:32:27 1998
--- linuxaltivec.h	Thu Dec 13 11:33:07 2001
***************
*** 0 ****
--- 1,30 ----
+ /* Definitions of target machine for GNU compiler,
+    for AltiVec enhanced PowerPC machines running GNU/Linux.
+    Copyright (C) 2001 Free Software Foundation, Inc.
+    Contributed by Aldy Hernandez (aldyh@redhat.com).
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fprintf (stderr, " (PowerPC AltiVec GNU/Linux)");
+ 
+ /* Override rs6000.h and sysv4.h definition.  */
+ #undef	TARGET_DEFAULT
+ #define	TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_ALTIVEC)
+ 
+ #undef SUBSUBTARGET_OVERRIDE_OPTIONS	rs6000_altivec_abi = 1


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