OSDN Git Service

* arm/gentune.sh: New file.
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Aug 2004 13:27:02 +0000 (13:27 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Aug 2004 13:27:02 +0000 (13:27 +0000)
* arm/t-arm: New file.
* arm/arm-tune.md: New file (autogenerated).
* config.gcc (arm*-*-*): Add t-arm to tmake_file for all variants.
* arm.md (attribute tune): Delete.  Include arm-tune.md.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85472 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/arm/arm-tune.md [new file with mode: 0644]
gcc/config/arm/arm.md
gcc/config/arm/gentune.sh [new file with mode: 0755]
gcc/config/arm/t-arm [new file with mode: 0644]

index 67ecf0b..1bf347c 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-03  Richard Earnshaw <rearnsha@arm.com>
+
+       * arm/gentune.sh: New file.
+       * arm/t-arm: New file.
+       * arm/arm-tune.md: New file (autogenerated).
+       * config.gcc (arm*-*-*): Add t-arm to tmake_file for all variants.
+       * arm.md (attribute tune): Delete.  Include arm-tune.md.
+
 2004-08-03  Paolo Bonzini <bonzini@gnu.org>
 
        * gcc.c (add_prefix, add_sysrooted_prefix): Remove
index 1899bd9..3d9a884 100644 (file)
@@ -614,65 +614,65 @@ arc-*-elf*)
        ;;
 arm-*-coff* | armel-*-coff*)
        tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h"
-       tmake_file=arm/t-arm-coff
+       tmake_file=arm/t-arm arm/t-arm-coff
        ;;
 arm-semi-aof | armel-semi-aof)
        tm_file="arm/semiaof.h arm/aof.h arm/arm.h"
-       tmake_file=arm/t-semi
+       tmake_file=arm/t-arm arm/t-semi
        ;;
 arm-wrs-vxworks)
        tm_file="dbxelf.h elfos.h svr4.h vxworks.h arm/elf.h arm/aout.h arm/arm.h arm/vxworks.h"
-       tmake_file="${tmake_file} arm/t-vxworks"
+       tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
        ;;
 arm*-*-freebsd*|strongarm*-*-freebsd*)
        tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
-       tmake_file="${tmake_file} arm/t-strongarm-elf"
+       tmake_file="${tmake_file} arm/t-arm arm/t-strongarm-elf"
        ;;
 arm*-*-netbsdelf*)
        tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
-       tmake_file="${tmake_file} arm/t-netbsd"
+       tmake_file="${tmake_file} arm/t-arm arm/t-netbsd"
        ;;
 arm*-*-netbsd*)
        tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"
-       tmake_file="t-netbsd arm/t-netbsd"
+       tmake_file="t-netbsd arm/t-arm arm/t-netbsd"
        extra_parts=""
        use_collect2=yes
        ;;
 arm*-*-linux*)                 # ARM GNU/Linux with ELF
        tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
-       tmake_file="${tmake_file} arm/t-linux"
+       tmake_file="${tmake_file} arm/t-arm arm/t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        gnu_ld=yes
        ;;
 arm*-*-uclinux*)               # ARM ucLinux
        tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h arm/uclinux-elf.h"
-       tmake_file=arm/t-arm-elf
+       tmake_file="arm/t-arm arm/t-arm-elf"
        ;;
 arm*-*-ecos-elf)
        tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
-       tmake_file=arm/t-arm-elf
+       tmake_file=arm/t-arm arm/t-arm-elf
        ;;
 arm*-*-rtems*)
        tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
-       tmake_file="arm/t-arm-elf t-rtems"
+       tmake_file="arm/t-arm arm/t-arm-elf t-rtems"
        ;;
 arm*-*-elf | ep9312-*-elf)
        tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
-       tmake_file=arm/t-arm-elf
+       tmake_file="arm/t-arm arm/t-arm-elf"
        ;;
 arm*-wince-pe*)
        tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h arm/wince-pe.h"
-       tmake_file=arm/t-wince-pe
+       tmake_file="arm/t-arm arm/t-wince-pe"
        extra_objs="pe.o"
        ;;
 arm-*-pe*)
        tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h"
-       tmake_file=arm/t-pe
+       tmake_file="arm/t-arm arm/t-pe"
        extra_objs="pe.o"
        ;;
 arm*-*-kaos*)
        tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h kaos.h arm/kaos-arm.h"
-       tmake_file=arm/t-arm-elf
+       tmake_file="arm/t-arm arm/t-arm-elf"
        ;;
 avr-*-*)
        tm_file="avr/avr.h dbxelf.h"
diff --git a/gcc/config/arm/arm-tune.md b/gcc/config/arm/arm-tune.md
new file mode 100644 (file)
index 0000000..cd23587
--- /dev/null
@@ -0,0 +1,5 @@
+;; -*- buffer-read-only: t -*-
+;; Generated automatically by gentune.sh from arm-cores.def
+(define_attr "tune"
+       "arm2,arm250,arm3,arm6,arm60,arm600,arm610,arm620,arm7,arm7m,arm7d,arm7dm,arm7di,arm7dmi,arm70,arm700,arm700i,arm710,arm720,arm710c,arm7100,arm7500,arm7500fe,arm7tdmi,arm710t,arm720t,arm740t,arm8,arm810,arm9,arm920,arm920t,arm940t,arm9tdmi,arm9e,ep9312,strongarm,strongarm110,strongarm1100,strongarm1110,arm10tdmi,arm1020t,arm926ejs,arm1026ejs,xscale,iwmmxt,arm1136js,arm1136jfs"
+       (const (symbol_ref "arm_tune")))
index d2d078b..54a3f1e 100644 (file)
 ;;---------------------------------------------------------------------------
 ;; Pipeline descriptions
 
-;; Processor type.  This attribute must exactly match the table in 
-;; arm-cores.def.
-(define_attr "tune" 
-            "arm2,arm250,arm3,arm6,arm60,arm600,arm610,arm620,arm7,arm7m,arm7d,arm7dm,arm7di,arm7dmi,arm70,arm700,arm700i,arm710,arm720,arm710c,arm7100,arm7500,arm7500fe,arm7tdmi,arm710t,arm720t,arm740t,arm8,arm810,arm9,arm920,arm920t,arm940t,arm9tdmi,arm9e,ep9312,strongarm,strongarm110,strongarm1100,strongarm1110,arm10tdmi,arm1020t,arm926ejs,arm1026ejs,xscale,iwmmxt,arm1136js,arm1136jfs"
-            (const (symbol_ref "arm_tune")))
+;; Processor type.  This is created automatically from arm-cores.def.
+(include "arm-tune.md")
 
 ;; True if the generic scheduling description should be used.
 
diff --git a/gcc/config/arm/gentune.sh b/gcc/config/arm/gentune.sh
new file mode 100755 (executable)
index 0000000..74cc853
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Generate arm-tune.md, a file containing the tune attribute from the list of 
+# CPUs in arm-cores.def
+
+echo ";; -*- buffer-read-only: t -*-"
+echo ";; Generated automatically by gentune.sh from arm-cores.def"
+
+allcores=`awk -F'[(,]' '/^ARM_CORE/ { cores = cores$2"," } END { print cores } ' $1`
+
+echo "(define_attr \"tune\""
+echo " \"$allcores\"" | sed -e 's/,"$/"/'
+echo " (const (symbol_ref \"arm_tune\")))"
diff --git a/gcc/config/arm/t-arm b/gcc/config/arm/t-arm
new file mode 100644 (file)
index 0000000..4f801ce
--- /dev/null
@@ -0,0 +1,20 @@
+# Rules common to all arm targets
+
+MD_INCLUDES=   $(srcdir)/config/arm/arm-tune.md \
+               $(srcdir)/config/arm/arm-generic.md \
+               $(srcdir)/config/arm/arm1026ejs.md \
+               $(srcdir)/config/arm/arm1136jfs.md \
+               $(srcdir)/config/arm/arm926ejs.md \
+               $(srcdir)/config/arm/cirrus.md \
+               $(srcdir)/config/arm/fpa.md \
+               $(srcdir)/config/arm/iwmmxt.md \
+               $(srcdir)/config/arm/vfp.md
+
+s-config s-conditions s-flags s-codes s-constants s-emit s-recog \
+       s-opinit s-extract s-peep s-attr s-attrtab s-output: $(MD_INCLUDES)
+
+$(srcdir)/config/arm/arm-tune.md: $(srcdir)/config/arm/gentune.sh \
+       $(srcdir)/config/arm/arm-cores.def
+       $(SHELL) $(srcdir)/config/arm/gentune.sh \
+               $(srcdir)/config/arm/arm-cores.def > \
+               $(srcdir)/config/arm/arm-tune.md