diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2010-05-20 22:20:34 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2010-05-20 22:20:34 +0000 |
commit | 9f946bc11ce814f013c56503861a679c554363f2 (patch) | |
tree | 62e4fd7aaae919b494f584ff11e5ca1b23bc66d5 /gcc | |
parent | 4ed44cccdd2243a585cd3beb4bb3fbe616e7d156 (diff) | |
download | gcc-9f946bc11ce814f013c56503861a679c554363f2.zip gcc-9f946bc11ce814f013c56503861a679c554363f2.tar.gz gcc-9f946bc11ce814f013c56503861a679c554363f2.tar.bz2 |
config.gcc (mips*-sde-elf*): Don't use sdemtk.opt.
2010-05-08 Richard Sandiford <rdsandiford@googlemail.com>
Jim Wilson <wilson@codesourcery.com>
gcc/
* config.gcc (mips*-sde-elf*): Don't use sdemtk.opt.
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define __mips_no_float
for TARGET_NO_FLOAT.
* config/mips/mips.c (mips_file_start): Expand conditional expression
into "if" statements. Use .gnu_attribute 4,0 for TARGET_NO_FLOAT.
(mips_override_options): Move -mno-float override -msoft-float and
-mhard-float.
* config/mips/mips.opt (mno-float): Move from sdemtk.opt, but add
Condition(TARGET_SUPPORTS_NO_FLOAT).
* config/mips/sdemtk.h (TARGET_OS_CPP_BUILTINS): Don't set
__mips_no_float here.
(SUBTARGET_OVERRIDE_OPTIONS): Delete.
(TARGET_SUPPORTS_NO_FLOAT): Define.
* config/mips/sdemtk.opt: Delete.
From-SVN: r159642
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/config.gcc | 1 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 32 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 4 | ||||
-rw-r--r-- | gcc/config/mips/mips.opt | 4 | ||||
-rw-r--r-- | gcc/config/mips/sdemtk.h | 20 | ||||
-rw-r--r-- | gcc/config/mips/sdemtk.opt | 23 |
7 files changed, 56 insertions, 45 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ab1bca..5687a0c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2010-05-20 Richard Sandiford <rdsandiford@googlemail.com> + + * config.gcc (mips*-sde-elf*): Don't use sdemtk.opt. + * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define __mips_no_float + for TARGET_NO_FLOAT. + * config/mips/mips.c (mips_file_start): Expand conditional expression + into "if" statements. Use .gnu_attribute 4,0 for TARGET_NO_FLOAT. + (mips_override_options): Move -mno-float override -msoft-float and + -mhard-float. + * config/mips/mips.opt (mno-float): Move from sdemtk.opt, but add + Condition(TARGET_SUPPORTS_NO_FLOAT). + * config/mips/sdemtk.h (TARGET_OS_CPP_BUILTINS): Don't set + __mips_no_float here. + (SUBTARGET_OVERRIDE_OPTIONS): Delete. + (TARGET_SUPPORTS_NO_FLOAT): Define. + * config/mips/sdemtk.opt: Delete. + 2010-05-20 Segher Boessenkool <segher@kernel.crashing.org> * ipa-prop.c (compute_complex_ancestor_jump_func): Bail diff --git a/gcc/config.gcc b/gcc/config.gcc index 30c15ad..06e694b 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1760,7 +1760,6 @@ mips*-sde-elf*) # MIPS toolkit libraries. tm_file="$tm_file mips/sdemtk.h" tmake_file="$tmake_file mips/t-sdemtk" - extra_options="$extra_options mips/sdemtk.opt" case ${enable_threads} in "" | yes | mipssde) thread_file='mipssde' diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 38664b5..9c897c2 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -8172,10 +8172,27 @@ mips_file_start (void) "\t.previous\n", TARGET_LONG64 ? 64 : 32); #ifdef HAVE_AS_GNU_ATTRIBUTE - fprintf (asm_out_file, "\t.gnu_attribute 4, %d\n", - (TARGET_HARD_FLOAT_ABI - ? (TARGET_DOUBLE_FLOAT - ? ((!TARGET_64BIT && TARGET_FLOAT64) ? 4 : 1) : 2) : 3)); + { + int attr; + + /* No floating-point operations, -mno-float. */ + if (TARGET_NO_FLOAT) + attr = 0; + /* Soft-float code, -msoft-float. */ + else if (!TARGET_HARD_FLOAT_ABI) + attr = 3; + /* Single-float code, -msingle-float. */ + else if (!TARGET_DOUBLE_FLOAT) + attr = 2; + /* 64-bit FP registers on a 32-bit target, -mips32r2 -mfp64. */ + else if (!TARGET_64BIT && TARGET_FLOAT64) + attr = 4; + /* Regular FP code, FP regs same size as GP regs, -mdouble-float. */ + else + attr = 1; + + fprintf (asm_out_file, "\t.gnu_attribute 4, %d\n", attr); + } #endif } @@ -15405,6 +15422,13 @@ mips_override_options (void) SUBTARGET_OVERRIDE_OPTIONS; #endif + /* -mno-float overrides -mhard-float and -msoft-float. */ + if (TARGET_NO_FLOAT) + { + target_flags |= MASK_SOFT_FLOAT_ABI; + target_flags_explicit |= MASK_SOFT_FLOAT_ABI; + } + /* Set the small data limit. */ mips_small_data_threshold = (g_switch_set ? g_switch_value diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 891ea1f..dcac46b 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -536,7 +536,9 @@ enum mips_code_readable_setting { \ /* These defines reflect the ABI in use, not whether the \ FPU is directly accessible. */ \ - if (TARGET_HARD_FLOAT_ABI) \ + if (TARGET_NO_FLOAT) \ + builtin_define ("__mips_no_float"); \ + else if (TARGET_HARD_FLOAT_ABI) \ builtin_define ("__mips_hard_float"); \ else \ builtin_define ("__mips_soft_float"); \ diff --git a/gcc/config/mips/mips.opt b/gcc/config/mips/mips.opt index 188d5e1..9471487 100644 --- a/gcc/config/mips/mips.opt +++ b/gcc/config/mips/mips.opt @@ -224,6 +224,10 @@ mmt Target Report Var(TARGET_MT) Allow the use of MT instructions +mno-float +Target Report RejectNegative Var(TARGET_NO_FLOAT) Condition(TARGET_SUPPORTS_NO_FLOAT) +Prevent the use of all floating-point operations + mno-flush-func Target RejectNegative Do not use a cache-flushing function before calling stack trampolines diff --git a/gcc/config/mips/sdemtk.h b/gcc/config/mips/sdemtk.h index a9bb85e..e927a60 100644 --- a/gcc/config/mips/sdemtk.h +++ b/gcc/config/mips/sdemtk.h @@ -35,10 +35,7 @@ along with GCC; see the file COPYING3. If not see builtin_define ("__mipsfp64"); \ \ if (TARGET_NO_FLOAT) \ - { \ - builtin_define ("__NO_FLOAT"); \ - builtin_define ("__mips_no_float"); \ - } \ + builtin_define ("__NO_FLOAT"); \ else if (TARGET_SOFT_FLOAT_ABI) \ builtin_define ("__SOFT_FLOAT"); \ else if (TARGET_SINGLE_FLOAT) \ @@ -57,18 +54,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#undef SUBTARGET_OVERRIDE_OPTIONS -#define SUBTARGET_OVERRIDE_OPTIONS \ - do \ - { \ - if (TARGET_NO_FLOAT) \ - { \ - target_flags |= MASK_SOFT_FLOAT_ABI; \ - target_flags_explicit |= MASK_SOFT_FLOAT_ABI; \ - } \ - } \ - while (0) - /* For __clear_cache in libgcc2.c. */ #ifdef IN_LIBGCC2 extern void mips_sync_icache (void *beg, unsigned long len); @@ -113,3 +98,6 @@ extern void mips_sync_icache (void *beg, unsigned long len); /* ...nor does the call sequence preserve $31. */ #undef MIPS_SAVE_REG_FOR_PROFILING_P #define MIPS_SAVE_REG_FOR_PROFILING_P(REGNO) ((REGNO) == RETURN_ADDR_REGNUM) + +/* Compile in support for the -mno-float option. */ +#define TARGET_SUPPORTS_NO_FLOAT 1 diff --git a/gcc/config/mips/sdemtk.opt b/gcc/config/mips/sdemtk.opt deleted file mode 100644 index c1d2949..0000000 --- a/gcc/config/mips/sdemtk.opt +++ /dev/null @@ -1,23 +0,0 @@ -; Options for the MIPS SDE configuration. -; -; Copyright (C) 2007 Free Software Foundation, Inc. -; -; This file is part of GCC. -; -; GCC 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 3, or (at your option) any later -; version. -; -; GCC 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 GCC; see the file COPYING3. If not see -; <http://www.gnu.org/licenses/>. - -mno-float -Target Report RejectNegative Var(TARGET_NO_FLOAT) -Prevent the use of all floating-point operations |