diff options
author | davem <davem@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-25 21:28:51 +0000 |
---|---|---|
committer | davem <davem@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-25 21:28:51 +0000 |
commit | 0468cf8f0f5f3d4b5444fc8c4bc482d0a2fca013 (patch) | |
tree | bed5b88ace72ee9f25edf67d046c725807af7b3a /gcc/configure.ac | |
parent | bbfdec17a453cda74de955af006c28126942beb4 (diff) | |
download | gcc-0468cf8f0f5f3d4b5444fc8c4bc482d0a2fca013.tar.gz |
Add support for floating-point fused multiply-add on Sparc.
* configure.ac: Add feature check to make sure the assembler
supports the FMAF, HPC, and VIS 3.0 instructions found on
Niagara-3 and later cpus.
* configure: Rebuild.
* config.in: Likewise.
* config/sparc/sparc.opt: New option '-mfmaf'.
* config/sparc/sparc.md: Add float fused multiply-add patterns.
* config/sparc/sparc.h (AS_NIAGARA3_FLAG): New macro.
(ASM_CPU64_DEFAULT_SPEC, ASM_CPU_SPEC): Use it, as needed.
* config/sparc/sol2.h (ASM_CPU32_DEFAULT_SPEC,
ASM_CPU64_DEFAULT_SPEC, ASM_CPU_SPEC): Likewise.
* config/sparc/sparc.c (sparc_option_override): Turn MASK_FMAF on
by default for Niagara-3 and later. Turn it off if TARGET_FPU is
disabled.
(sparc_rtx_costs): Handle 'FMA'.
* doc/invoke.texi: Document -mfmaf.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 126cb196450..8069e6ac559 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3478,6 +3478,18 @@ foo: fi], [AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1, [Define if your assembler supports offsetable %lo().])]) + + gcc_GAS_CHECK_FEATURE([FMAF, HPC, and VIS 3.0 instructions], + gcc_cv_as_sparc_fmaf,, + [-xarch=v9d], + [.text + .align 4 + fmaddd %f0, %f2, %f4, %f6 + addxccc %g1, %g2, %g3 + fsrl32 %f2, %f4, %f8 + fnaddd %f10, %f12, %f14],, + [AC_DEFINE(HAVE_AS_FMAF_HPC_VIS3, 1, + [Define if your assembler supports FMAF, HPC, and VIS 3.0 instructions.])]) ;; changequote(,)dnl |