From 28cf078dd291012375a886c646b108becd2ad710 Mon Sep 17 00:00:00 2001 From: James Van Artsdalen Date: Fri, 28 Aug 1992 01:22:53 +0000 Subject: [PATCH] (sin_optab,cos_optab): Define optabs for sin and cos. (init_optabs): Initialize them. From-SVN: r1978 --- gcc/optabs.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gcc/optabs.c b/gcc/optabs.c index c99bbc797fb..7b883cbccb6 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; -- 2.30.2