From: kazu Date: Sat, 14 Apr 2007 02:15:45 +0000 (+0000) Subject: gcc/ X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=278e2fd1578c9a4b03eb4824357692ccb2dd2c1a gcc/ * config.gcc: Recognize fido. * config/m68k/m68k-devices.def (fidoa): New. * config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Define __mfido__. (FL_FIDOA, TARGET_FIDOA): New. * config/m68k/m68k.opt (mfidoa): New. libgcc/ * config.host: Recognize fido. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123811 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 55def7ed345..2067138b3c9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2007-04-14 Kazu Hirata + + * config.gcc: Recognize fido. + * config/m68k/m68k-devices.def (fidoa): New. + * config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Define + __mfido__. + (FL_FIDOA, TARGET_FIDOA): New. + * config/m68k/m68k.opt (mfidoa): New. + 2007-04-13 John David Anglin PR middle-end/31322 diff --git a/gcc/config.gcc b/gcc/config.gcc index 36e369fd51d..055503f5f7b 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -265,6 +265,10 @@ ep9312*-*-*) ;; frv*) cpu_type=frv ;; +fido-*-*) + cpu_type=m68k + extra_headers=math-68881.h + ;; xscale-*-*) cpu_type=arm extra_headers="mmintrin.h" @@ -1508,12 +1512,36 @@ m68k-*-coff*) tm_file="${tm_file} m68k/m68k-none.h m68k/m68kemb.h dbxcoff.h m68k/coff.h dbx.h" use_fixproto=yes ;; -m68020-*-elf* | m68k-*-elf*) - default_m68k_cpu=68020 - default_cf_cpu=5206 +m68020-*-elf* | m68k-*-elf* | fido-*-elf*) + case ${target} in + fido-*-elf*) + # Check that $with_cpu makes sense. + case $with_cpu in + "" | "fidoa") + ;; + *) + echo "Cannot accept --with-cpu=$with_cpu" + exit 1 + ;; + esac + with_cpu=fidoa + ;; + *) + default_m68k_cpu=68020 + default_cf_cpu=5206 + ;; + esac tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h" tm_defines="${tm_defines} MOTOROLA=1 USE_GAS" - tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf m68k/t-mlibs" + tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf" + # Add multilibs for targets other than fido. + case ${target} in + fido-*-elf*) + ;; + *) + tmake_file="$tmake_file m68k/t-mlibs" + ;; + esac extra_parts="crtbegin.o crtend.o" ;; m68010-*-netbsdelf* | m68k*-*-netbsdelf*) @@ -2838,7 +2866,7 @@ case "${target}" in esac ;; - m680[012]0-*-* | m68k*-*-*) + fido-*-* | m680[012]0-*-* | m68k*-*-*) supported_defaults="arch cpu" case "$with_arch" in "" | "m68k"| "cf") @@ -3132,7 +3160,7 @@ case ${target} in fi ;; - m680[012]0-*-* | m68k*-*-*) + fido*-*-* | m680[012]0-*-* | m68k*-*-*) target_cpu_default2=$m68k_cpu_ident if [ x"$m68k_arch_family" != x ]; then tmake_file="m68k/t-$m68k_arch_family $tmake_file" diff --git a/gcc/config/m68k/m68k-devices.def b/gcc/config/m68k/m68k-devices.def index f77930274c0..1d47bd0b002 100644 --- a/gcc/config/m68k/m68k-devices.def +++ b/gcc/config/m68k/m68k-devices.def @@ -142,3 +142,6 @@ M68K_DEVICE ("5483", mcf5483, "5485", "5475", cfv4e, isa_b, FL_CF_USP M68K_DEVICE ("5484", mcf5484, "5485", "5475", cfv4e, isa_b, FL_CF_USP | FL_CF_EMAC | FL_CF_FPU | FL_MMU) M68K_DEVICE ("5485", mcf5485, "5485", "5475", cfv4e, isa_b, FL_CF_USP | FL_CF_EMAC | FL_CF_FPU | FL_MMU) M68K_DEVICE ("548x", mcf548x, "5485", "5475", cfv4e, isa_b, FL_CF_USP | FL_CF_EMAC | FL_CF_FPU | FL_MMU) + +/* Fido processor. */ +M68K_DEVICE ("fidoa", fidoa, "cpu32", "fidoa", cpu32, isa_cpu32, FL_FIDOA | FL_MMU) diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 5c5d59ebfb7..a6c347d80fc 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -187,6 +187,9 @@ Boston, MA 02110-1301, USA. */ if (TARGET_CF_HWDIV) \ builtin_define ("__mcfhwdiv__"); \ \ + if (TARGET_FIDOA) \ + builtin_define ("__mfido__"); \ + \ builtin_assert ("cpu=m68k"); \ builtin_assert ("machine=m68k"); \ } \ @@ -220,6 +223,7 @@ Boston, MA 02110-1301, USA. */ #define FL_ISA_APLUS (1 << 14) #define FL_ISA_B (1 << 15) #define FL_ISA_C (1 << 16) +#define FL_FIDOA (1 << 17) #define FL_MMU 0 /* Used by multilib machinery. */ #define TARGET_68010 ((m68k_cpu_flags & FL_ISA_68010) != 0) @@ -228,6 +232,7 @@ Boston, MA 02110-1301, USA. */ #define TARGET_COLDFIRE ((m68k_cpu_flags & FL_COLDFIRE) != 0) #define TARGET_COLDFIRE_FPU (m68k_fpu == FPUTYPE_COLDFIRE) #define TARGET_68881 (m68k_fpu == FPUTYPE_68881) +#define TARGET_FIDOA ((m68k_cpu_flags & FL_FIDOA) != 0) /* Size (in bytes) of FPU registers. */ #define TARGET_FP_REG_SIZE (TARGET_COLDFIRE ? 8 : 12) diff --git a/gcc/config/m68k/m68k.opt b/gcc/config/m68k/m68k.opt index 2dc242776e7..844fb6e0864 100644 --- a/gcc/config/m68k/m68k.opt +++ b/gcc/config/m68k/m68k.opt @@ -124,6 +124,10 @@ mdiv Target Report Mask(CF_HWDIV) Use hardware division instructions on ColdFire +mfidoa +Target RejectNegative +Generate code for a Fido A + mhard-float Target RejectNegative Mask(HARD_FLOAT) MaskExists Generate code which uses hardware floating point instructions diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index db53036f497..7e3afaccbfa 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2007-04-14 Kazu Hirata + + * config.host: Recognize fido. + 2007-04-04 Janis Johnson * configure: Check host, not target, for decimal float support. diff --git a/libgcc/config.host b/libgcc/config.host index 3e575ab7cb6..f43de44bbd6 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -83,6 +83,9 @@ bfin*-*) ep9312*-*-*) cpu_type=arm ;; +fido-*-*) + cpu_type=m68k + ;; frv*) cpu_type=frv ;; xscale-*-*) @@ -268,6 +271,8 @@ cris-*-linux*) ;; crx-*-elf) ;; +fido-*-elf) + ;; fr30-*-elf) ;; frv-*-elf)