This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: New Toshiba Media Processor (mep-elf) port and maintainer
- From: DJ Delorie <dj at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Jun 2009 00:16:35 -0400
- Subject: Re: New Toshiba Media Processor (mep-elf) port and maintainer
- References: <alpine.LSU.1.99.0906021619000.27711@acrux.dbai.tuwien.ac.at>
> Congratulations, DJ! Please adjust the MAINTAINERS file accordingly
> when the port goes in, and Happy Hacking,
Here it is. Thanks to all who helped make this happen! Docs patch to
follow.
Committed, with all the cgen files (I can move them later if we decide
to go with a top-level cpu/ directory)
[toplevel]
* MAINTAINERS: Add myself as mep maintainer.
[gcc]
Add MeP port.
* config.gcc: Add mep support.
* recog.c: Resurrect validate_replace_rtx_subexp().
* recog.h: Likewise.
* config/mep/: Add new port:
* config/mep/constraints.md: New file.
* config/mep/default.h: New file.
* config/mep/intrinsics.h: New file.
* config/mep/intrinsics.md: New file.
* config/mep/ivc2-template.h: New file.
* config/mep/mep-c5.cpu: New file.
* config/mep/mep-core.cpu: New file.
* config/mep/mep-default.cpu: New file.
* config/mep/mep-ext-cop.cpu: New file.
* config/mep/mep-intrin.h: New file.
* config/mep/mep-ivc2.cpu: New file.
* config/mep/mep-lib1.asm: New file.
* config/mep/mep-lib2.c: New file.
* config/mep/mep-pragma.c: New file.
* config/mep/mep-protos.h: New file.
* config/mep/mep-tramp.c: New file.
* config/mep/mep.c: New file.
* config/mep/mep.cpu: New file.
* config/mep/mep.h: New file.
* config/mep/mep.md: New file.
* config/mep/mep.opt: New file.
* config/mep/predicates.md: New file.
* config/mep/t-mep: New file.
[gcc/testsuite]
Add MeP port.
* lib/target-supports.exp: Add mep support (no profiling).
[libgcc]
Add MeP port.
* config.host: Add mep support.
[libstdc++-v3]
Add MeP port.
* configure.host: Add mep support.
Index: MAINTAINERS
===================================================================
--- MAINTAINERS (revision 148888)
+++ MAINTAINERS (working copy)
@@ -66,12 +66,13 @@ m32c port DJ Delorie dj@redhat.com
m32r port Nick Clifton nickc@redhat.com
m68hc11 port Stephane Carrez stcarrez@nerim.fr
m68k port (?) Jeff Law law@redhat.com
m68k port Andreas Schwab schwab@linux-m68k.org
m68k-motorola-sysv port Philippe De Muyter phdm@macqel.be
mcore port Nick Clifton nickc@redhat.com
+mep port DJ Delorie dj@redhat.com
mips port Eric Christopher echristo@apple.com
mips port Richard Sandiford rdsandiford@googlemail.com
mmix port Hans-Peter Nilsson hp@bitrange.com
mn10300 port Jeff Law law@redhat.com
mn10300 port Alexandre Oliva aoliva@redhat.com
moxie port Anthony Green green@moxielogic.com
Index: gcc/recog.c
===================================================================
--- gcc/recog.c (revision 148888)
+++ gcc/recog.c (working copy)
@@ -735,12 +735,23 @@ validate_replace_rtx_1 (rtx *loc, rtx fr
/* Do changes needed to keep rtx consistent. Don't do any other
simplifications, as it is not our job. */
if (simplify)
simplify_while_replacing (loc, to, object, op0_mode);
}
+/* Try replacing every occurrence of FROM in subexpression LOC of INSN
+ with TO. After all changes have been made, validate by seeing
+ if INSN is still valid. */
+
+int
+validate_replace_rtx_subexp (rtx from, rtx to, rtx insn, rtx *loc)
+{
+ validate_replace_rtx_1 (loc, from, to, insn, true);
+ return apply_change_group ();
+}
+
/* Try replacing every occurrence of FROM in INSN with TO. After all
changes have been made, validate by seeing if INSN is still valid. */
int
validate_replace_rtx (rtx from, rtx to, rtx insn)
{
Index: gcc/recog.h
===================================================================
--- gcc/recog.h (revision 148888)
+++ gcc/recog.h (working copy)
@@ -83,12 +83,13 @@ extern int apply_change_group (void);
extern int num_validated_changes (void);
extern void cancel_changes (int);
extern int constrain_operands (int);
extern int constrain_operands_cached (int);
extern int memory_address_p (enum machine_mode, rtx);
extern int strict_memory_address_p (enum machine_mode, rtx);
+extern int validate_replace_rtx_subexp (rtx, rtx, rtx, rtx *);
extern int validate_replace_rtx (rtx, rtx, rtx);
extern int validate_replace_rtx_part (rtx, rtx, rtx *, rtx);
extern int validate_replace_rtx_part_nosimplify (rtx, rtx, rtx *, rtx);
extern void validate_replace_rtx_group (rtx, rtx, rtx);
extern void validate_replace_src_group (rtx, rtx, rtx);
extern bool validate_simplify_insn (rtx insn);
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc (revision 148888)
+++ gcc/config.gcc (working copy)
@@ -1559,12 +1559,24 @@ mcore-*-elf)
mcore-*-pe*)
tm_file="svr3.h dbxcoff.h newlib-stdint.h ${tm_file} mcore/mcore-pe.h"
tmake_file=mcore/t-mcore-pe
inhibit_libc=true
use_gcc_stdint=wrap
;;
+mep-*-*)
+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
+ tmake_file=mep/t-mep
+ extra_parts="crtbegin.o crtend.o"
+ c_target_objs="mep-pragma.o"
+ cxx_target_objs="mep-pragma.o"
+ if test -d "${srcdir}/../newlib/libc/include" &&
+ test "x$with_headers" = x; then
+ with_headers=yes
+ fi
+ use_gcc_stdint=wrap
+ ;;
mips-sgi-irix[56]*)
tm_file="elfos.h ${tm_file} mips/iris.h"
tmake_file="mips/t-iris mips/t-slibgcc-irix"
target_cpu_default="MASK_ABICALLS"
case ${target} in
*-*-irix5*)
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp (revision 148888)
+++ gcc/testsuite/lib/target-supports.exp (working copy)
@@ -495,12 +495,13 @@ proc check_profiling_available { test_wh
|| [istarget crisv32-*-*]
|| [istarget fido-*-elf]
|| [istarget h8300-*-*]
|| [istarget m32c-*-elf]
|| [istarget m68k-*-elf]
|| [istarget m68k-*-uclinux*]
+ || [istarget mep-*-elf]
|| [istarget mips*-*-elf*]
|| [istarget moxie-*-elf*]
|| [istarget xstormy16-*]
|| [istarget xtensa*-*-elf]
|| [istarget *-*-rtems*]
|| [istarget *-*-vxworks*] } {
Index: libgcc/config.host
===================================================================
--- libgcc/config.host (revision 148888)
+++ libgcc/config.host (working copy)
@@ -99,12 +99,14 @@ hppa*-*-*)
;;
m32r*-*-*)
cpu_type=m32r
;;
m68k-*-*)
;;
+mep*-*-*)
+ ;;
mips*-*-*)
cpu_type=mips
;;
powerpc*-*-*)
cpu_type=rs6000
;;
@@ -550,12 +552,14 @@ xtensa*-*-linux*)
;;
am33_2.0-*-linux*)
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
;;
m32c-*-elf*|m32c-*-rtems*)
;;
+mep*-*-*)
+ ;;
*)
echo "*** Configuration ${host} not supported" 1>&2
exit 1
;;
esac
Index: libstdc++-v3/configure.host
===================================================================
--- libstdc++-v3/configure.host (revision 148888)
+++ libstdc++-v3/configure.host (working copy)
@@ -100,12 +100,16 @@ case "${host_cpu}" in
i[567]86 | x86_64)
try_cpu=i486
;;
hppa*)
try_cpu=hppa
;;
+ mep*)
+ EXTRA_CXX_FLAGS=-mm
+ try_cpu=generic
+ ;;
mips*)
try_cpu=mips
;;
powerpc* | rs6000)
try_cpu=powerpc
;;