diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-24 15:20:45 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-24 15:20:45 +0000 |
commit | 3294318ef0624e6a9c00fbd319239ccb6a7cd6fb (patch) | |
tree | c5b5ff70d5b5a1084900f1a4b78ca165721153e5 /gcc/config/rs6000/singlefp.h | |
parent | 828608173811427bad8a09f9d71306de99b886a7 (diff) | |
download | gcc-3294318ef0624e6a9c00fbd319239ccb6a7cd6fb.tar.gz |
2008-09-24 Michael J. Eager <eager@eagercon.com>
* config/rs6000/predicates.md (easy_fp_constant): Single FP consts
are easy.
* config/rs6000/rs6000.c (rs6000_override_options): Move
rs6000_init_hard_regno_mode_ok after all options changed.
Set rs6000_single_float, rs6000_double_float if TARGET_HARD_FLOAT.
(rs6000_handle_option): Process -msingle-float, -mdouble-float,
-msimple-fpu flags. Add warning messages if single FP not configured.
(rs6000_file_start): Output gnu_attribute for single-float.
(legitimate_lo_sum_address_p): Condition on TARGET_DOUBLE_FLOAT.
(rs6000_legitimize_address): Likewise.
(rs6000_legitimize_reload_address): Likewise.
(rs6000_emit_move): Condition on TARGET_DOUBLE_FLOAT,
TARGET_SINGLE_FLOAT.
(function_arg_advance): Likewise.
(function_arg): Likewise.
(setup_incoming_varargs): Condition on TARGET_DOUBLE_FLOAT.
(rs6000_gimplify_va_arg): Condition on TARGET_DOUBLE_FLOAT,
TARGET_SINGLE_FLOAT.
(rs6000_split_multireg_move): Condition on TARGET_DOUBLE_FLOAT.
(rs6000_emit_prologue): Likewise.
(rs6000_function_value): Condition on TARGET_DOUBLE_FLOAT,
TARGET_SINGLE_FLOAT.
(rs6000_libcall_value): Likewise.
* config/rs6000/rs6000.h (TARGET_SINGLE_FLOAT): New default to 1.
(TARGET_DOUBLE_FLOAT): New default to 1
(TARGET_SIMPLE_FPU): New default to 0
(TARGET_SINGLE_FPU): New default to 0
(TARGET_SINGLE_FLOAT_MODE): New.
(TARGET_DOUBLE_FLOAT_MODE): New.
* config/rs6000/singlefp.h: New; redefine TARGET_SINGLE_FLOAT,
TARGET_DOUBLE_FLOAT, TARGET_SIMPLE_FPU, TARGET_SINGLE_FPU,
UNITS_PER_FP_WORD
* config/rs6000/rs6000.md (define_mode_iterator): Condition on
TARGET_DOUBLE_FLOAT, TARGET_SINGLE_FLOAT.
(extendsfdf2, extendsfdf2_fpr, truncdfsf2, truncdfsf2_fpr,
copysigndf3,fseldfsf4, negdf2, negdf2_fpr, absdf2, absdf2_fpr,
nabsdf2_fpr, adddf3, adddf3_fpr, subdf3, subdf3_fpr, muldf3,
muldf3_fpr, divdf3, divdf3_fpr, sqrtdf2, smaxdf3, smindf3,
movdfcc, *fseldfdf4, floatsidf2, *floatsidf2_internal,
floatunssidf2, *floatunssidf2_internal, fix_truncdfsi2,
*fix_truncdfsi2_internal, fix_truncdfsi2_internal_gfxopt,
fix_truncdfsi2_mfpgpr, fctiwz, btruncdf2, ceildf2, floordf2,
rounddf2, floatdidf2, floatsidf_ppc64_mfpgpr, floatsidf_ppc64,
floatunssidf_ppc64, fix_truncdfdi2, movdf_hardfloat32,
movdf_hardfloat64_mfpgpr, movdf_hardfloat64, extenddftf2_fprs,
extenddftf2_internal, trunctfdf2_internal2, fix_trunc_helper,
abstf2_internal, movdf_update1, movdf_update2, cmpdf_internal1,
cmptf_internal1, *cmptf_internal2): Condition on
TARGET_DOUBLE_FLOAT.
(aux_truncdfsf2, negsf2, *negsf2, abssf2, *abssf2, addsf3, subsf3,
mulsf3, divsf3, sqrtsf2, copysignsf3, smaxsf3, sminsf3, movsfcc,
*fselsfsf4, fixuns_truncsfsi2, fix_truncsfsi2, floatunssisf2,
btruncsf2, ceilsf2, floorsf2, roundsf2, floatdisf2_internal1,
floatdisf2_internal2, *movsf_hardfloat, trunctfsf2_fprs,
*movsf_update1, *movsf_update2, *cmpsf_internal1): Condition on
TARGET_SINGLE_FLOAT.
(divsf3, sqrtsf2, divdf3, divdf3_fpr): Condition on TARGET_SIMPLE_FPU.
* config/rs6000/rs6000.opt (-msingle-float): New.
(-mdouble-float): New.
(-msimple-fpu): New.
* doc/invoke.texi (RS/6000 and PowerPC Options): Add
-msingle-float, -mdouble-float, -msimple-fpu options.
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Set
_SOFT_DOUBLE for -msingle-float.
* config.gcc: New config for target=powerpc-xilinx-eabi.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/singlefp.h')
-rw-r--r-- | gcc/config/rs6000/singlefp.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/config/rs6000/singlefp.h b/gcc/config/rs6000/singlefp.h new file mode 100644 index 00000000000..36e093c1a39 --- /dev/null +++ b/gcc/config/rs6000/singlefp.h @@ -0,0 +1,40 @@ +/* Definitions for PowerPC single-precision floating point unit + such as Xilinx PowerPC 405/440 APU. + + Copyright (C) 2008 Free Software Foundation, Inc. + Contributed by Michael Eager (eager@eagercon.com) + + 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/>. */ + + +/* Undefine definitions from rs6000.h. */ +#undef TARGET_SINGLE_FLOAT +#undef TARGET_DOUBLE_FLOAT +#undef TARGET_SINGLE_FPU +#undef TARGET_SIMPLE_FPU +#undef UNITS_PER_FP_WORD + +/* FPU operations supported. + If TARGET_SINGLE_FPU set, processor supports single fp options. */ +#define TARGET_SINGLE_FLOAT (rs6000_single_float) +#define TARGET_DOUBLE_FLOAT (rs6000_double_float) +#define TARGET_SINGLE_FPU 1 +#define TARGET_SIMPLE_FPU (rs6000_simple_fpu) + +/* FP word width depends on single/double fp support. */ +#define UNITS_PER_FP_WORD ((TARGET_SOFT_FLOAT || TARGET_DOUBLE_FLOAT) ? 8 : 4) + |