diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2007-01-31 13:30:20 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2007-01-31 13:30:20 +0100 |
commit | 9ed4207fce7efe340cbdf1017fa0d1271a710487 (patch) | |
tree | 8644f765075eeb7076137f6a73a27bd54182e229 /gcc/testsuite | |
parent | 010dc0fdd0c5189383207fde6281d8f9c1e06908 (diff) | |
download | gcc-9ed4207fce7efe340cbdf1017fa0d1271a710487.tar.gz |
optabs.h (enum optab_index): Add new OTI_isinf.
* optabs.h (enum optab_index): Add new OTI_isinf.
(isinf_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize isinf_optab.
* genopinit.c (optabs): Implement isinf_optab using isinf?f2
patterns.
* builtins.c (mathfn_built_in): Handle BUILT_IN_ISINF{,F,L}.
(expand_builtin_interclass_mathfn): Expand BUILT_IN_ISINF{,F,L}
using isinf_optab.
(expand_builtin): Expand BUILT_IN_ISINF{,F,L} using
expand_builtin_interclass_mathfn.
* reg_stack.c (subst_stack_regs_pat): Handle UNSPEC_FXAM.
* config/i386/i386.md (UNSPEC_FXAM): New constant.
(fxam<mode>2_i387): New insn pattern.
(isinf<mode>2) New expander to implement isinf, isinff and isinfl
built-in functions as x87 inline asm.
testsuite/ChangeLog:
* gcc.dg/builtins-63.c: New test.
From-SVN: r121419
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-63.c | 28 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d28f8e6d5d7..97bf5f17fca 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2007-01-31 Uros Bizjak <ubizjak@gmail.com> + + * gcc.dg/builtins-63.c: New test. + 2007-01-31 Tobias Burnus <burnus@net-b.de> PR fortran/27588 diff --git a/gcc/testsuite/gcc.dg/builtins-63.c b/gcc/testsuite/gcc.dg/builtins-63.c new file mode 100644 index 00000000000..8fcbc68e6f1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/builtins-63.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2007 Free Software Foundation. + + Check that isinf, isinff and isinfl built-in functions compile. + + Written by Uros Bizjak, 31st January 2007. */ + +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +extern int isinf(double); +extern int isinff(float); +extern int isinfl(long double); + +int test1(double x) +{ + return isinf(x); +} + +int test1f(float x) +{ + return isinff(x); +} + +int test1l(long double x) +{ + return isinfl(x); +} + |