summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authordavem <davem@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-25 21:28:51 +0000
committerdavem <davem@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-25 21:28:51 +0000
commit0468cf8f0f5f3d4b5444fc8c4bc482d0a2fca013 (patch)
treebed5b88ace72ee9f25edf67d046c725807af7b3a /gcc/configure.ac
parentbbfdec17a453cda74de955af006c28126942beb4 (diff)
downloadgcc-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.ac12
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