diff options
author | Konrad Eisele <konrad@gaisler.com> | 2010-12-16 22:28:45 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-12-16 22:28:45 +0000 |
commit | 07981468ebdf268622d1fa47ce529958aefd154b (patch) | |
tree | 0e6fb4a816a6dafb5da76bad485f9568f3a0dbf6 /gcc/config.gcc | |
parent | cb2168c9660ac9d920b4c68a8b31a411fe6abe42 (diff) | |
download | gcc-07981468ebdf268622d1fa47ce529958aefd154b.zip gcc-07981468ebdf268622d1fa47ce529958aefd154b.tar.gz gcc-07981468ebdf268622d1fa47ce529958aefd154b.tar.bz2 |
Support for LEON processor
Support for LEON processor
* config.gcc (sparc-*-elf*): Deal with sparc-leon specifically.
(sparc-*-linux*): Likewise.
(sparc-*-rtems*): Remove Solaris left-overs.
(sparc*-*-*): Remove obsolete sparc86x setting.
(sparc-leon*): Default to --with-cpu=v8 and --with-tune=leon.
* doc/invoke.texi (SPARC Options): Document -mcpu/-mtune=leon.
* config/sparc/sparc.h (TARGET_CPU_leon): Define.
(TARGET_CPU_sparc86x): Delete.
(TARGET_CPU_cypress): Define as alias to TARGET_CPU_v7.
(TARGET_CPU_f930): Define as alias to TARGET_CPU_sparclite.
(TARGET_CPU_f934): Likewise.
(TARGET_CPU_tsc701): Define as alias to TARGET_CPU_sparclet.
(CPP_CPU_SPEC): Add entry for -mcpu=leon.
(enum processor_type): Add PROCESSOR_LEON. Reorganize.
* config/sparc/sparc.c (leon_costs): New cost array.
(sparc_option_override): Add entry for TARGET_CPU_leon and -mcpu=leon.
Initialize cost array to leon_costs if -mtune=leon.
* config/sparc/sparc.md (cpu attribute): Add leon. Reorganize.
Include leon.md scheduling description.
* config/sparc/leon.md: New file.
* config/sparc/t-elf: Do not assemble Solaris startup files.
* config/sparc/t-leon: New file.
* config/sparc/t-leon3: Likewise.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r167957
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index fd0f6e5..ace2b95 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2450,18 +2450,39 @@ sh-wrs-vxworks) ;; sparc-*-elf*) tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h" - tmake_file="sparc/t-elf sparc/t-crtfm" - extra_parts="crti.o crtn.o crtbegin.o crtend.o" + case ${target} in + *-leon-*) + tmake_file="sparc/t-leon" + ;; + *-leon[3-9]*) + tmake_file="sparc/t-leon3" + ;; + *) + tmake_file="sparc/t-elf" + ;; + esac + tmake_file="${tmake_file} sparc/t-crtfm" + extra_parts="crtbegin.o crtend.o" ;; sparc-*-rtems*) tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h" tmake_file="sparc/t-elf sparc/t-crtfm t-rtems" - extra_parts="crti.o crtn.o crtbegin.o crtend.o" + extra_parts="crtbegin.o crtend.o" ;; sparc-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h linux.h glibc-stdint.h" extra_options="${extra_options} sparc/long-double-switch.opt" - tmake_file="${tmake_file} sparc/t-linux" + case ${target} in + *-leon-*) + tmake_file="${tmake_file} sparc/t-leon" + ;; + *-leon[3-9]*) + tmake_file="${tmake_file} sparc/t-leon3" + ;; + *) + tmake_file="${tmake_file} sparc/t-linux" + ;; + esac if test x$enable_targets = xall; then tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h" tmake_file="${tmake_file} sparc/t-linux64" @@ -2922,6 +2943,9 @@ if test x$with_cpu = x ; then mips*-*-vxworks) with_arch=mips2 ;; + sparc-leon*-*) + with_cpu=v8; + ;; sparc*-*-*) with_cpu="`echo ${target} | sed 's/-.*$//'`" ;; @@ -3441,9 +3465,11 @@ case "${target}" in for which in cpu tune; do eval "val=\$with_$which" case ${val} in - "" | sparc | sparcv9 | sparc64 | sparc86x \ - | v7 | cypress | v8 | supersparc | sparclite | f930 \ - | f934 | hypersparc | sparclite86x | sparclet | tsc701 \ + "" | sparc | sparcv9 | sparc64 \ + | v7 | cypress \ + | v8 | supersparc | hypersparc | leon \ + | sparclite | f930 | f934 | sparclite86x \ + | sparclet | tsc701 \ | v9 | ultrasparc | ultrasparc3 | niagara | niagara2) # OK ;; @@ -3587,6 +3613,15 @@ case ${target} in cxx_target_objs="${cxx_target_objs} sh-c.o" ;; + sparc-leon*-*) + if test x$with_tune = x ; then + with_tune=leon; + fi + + # The SPARC port checks this value at compile-time. + target_cpu_default2="TARGET_CPU_$with_cpu" + ;; + sparc*-*-*) # Some standard aliases. case x$with_cpu in @@ -3601,6 +3636,7 @@ case ${target} in # The SPARC port checks this value at compile-time. target_cpu_default2="TARGET_CPU_$with_cpu" ;; + v850*-*-*) # FIXME: The v850 is "special" in that it does not support # runtime CPU selection, only --with-cpu. |