diff options
author | James Van Artsdalen <jrv@gnu.org> | 1992-08-28 01:22:53 +0000 |
---|---|---|
committer | James Van Artsdalen <jrv@gnu.org> | 1992-08-28 01:22:53 +0000 |
commit | 28cf078dd291012375a886c646b108becd2ad710 (patch) | |
tree | ba0d1d1568eb92c82478ada370f15ab51b6e80b4 /gcc | |
parent | d70326a5e8a944f67760cdc2f4ffc602f4100d05 (diff) | |
download | gcc-28cf078dd291012375a886c646b108becd2ad710.zip gcc-28cf078dd291012375a886c646b108becd2ad710.tar.gz gcc-28cf078dd291012375a886c646b108becd2ad710.tar.bz2 |
(sin_optab,cos_optab): Define optabs for sin and cos.
(init_optabs): Initialize them.
From-SVN: r1978
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/optabs.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index c99bbc7..7b883cb 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -73,6 +73,8 @@ optab abs_optab; optab one_cmpl_optab; optab ffs_optab; optab sqrt_optab; +optab sin_optab; +optab cos_optab; optab cmp_optab; optab ucmp_optab; /* Used only for libcalls for unsigned comparisons. */ @@ -3355,6 +3357,8 @@ init_optabs () one_cmpl_optab = init_optab (NOT); ffs_optab = init_optab (FFS); sqrt_optab = init_optab (SQRT); + sin_optab = init_optab (UNKNOWN); + cos_optab = init_optab (UNKNOWN); strlen_optab = init_optab (UNKNOWN); #ifdef HAVE_addqi3 @@ -4250,6 +4254,36 @@ init_optabs () /* No library calls here! If there is no sqrt instruction expand_builtin should force the library call. */ +#ifdef HAVE_sinsf2 + if (HAVE_sinsf2) + sin_optab->handlers[(int) SFmode].insn_code = CODE_FOR_sinsf2; +#endif +#ifdef HAVE_sindf2 + if (HAVE_sindf2) + sin_optab->handlers[(int) DFmode].insn_code = CODE_FOR_sindf2; +#endif +#ifdef HAVE_sintf2 + if (HAVE_sintf2) + sin_optab->handlers[(int) TFmode].insn_code = CODE_FOR_sintf2; +#endif + /* No library calls here! If there is no sin instruction expand_builtin + should force the library call. */ + +#ifdef HAVE_cossf2 + if (HAVE_cossf2) + cos_optab->handlers[(int) SFmode].insn_code = CODE_FOR_cossf2; +#endif +#ifdef HAVE_cosdf2 + if (HAVE_cosdf2) + cos_optab->handlers[(int) DFmode].insn_code = CODE_FOR_cosdf2; +#endif +#ifdef HAVE_costf2 + if (HAVE_costf2) + cos_optab->handlers[(int) TFmode].insn_code = CODE_FOR_costf2; +#endif + /* No library calls here! If there is no cos instruction expand_builtin + should force the library call. */ + #ifdef HAVE_strlenqi if (HAVE_strlenqi) strlen_optab->handlers[(int) QImode].insn_code = CODE_FOR_strlenqi; |