aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2007-07-21 23:45:06 +0200
committerUros Bizjak <uros@gcc.gnu.org>2007-07-21 23:45:06 +0200
commitd0c9d431524b7c1cb4991c01e45f527cb7e75932 (patch)
tree2e34198e0e1a0497de165774678adb850f5fdf36 /gcc/builtins.c
parent21a772278801d5143e385999c692da9457db5552 (diff)
downloadgcc-d0c9d431524b7c1cb4991c01e45f527cb7e75932.zip
gcc-d0c9d431524b7c1cb4991c01e45f527cb7e75932.tar.gz
gcc-d0c9d431524b7c1cb4991c01e45f527cb7e75932.tar.bz2
optabs.h (enum optab_index): Add new OTI_signbit.
* optabs.h (enum optab_index): Add new OTI_signbit. (signbit_optab): Define corresponding macro. (enum insn_code signbit_optab[]): Remove array. * optabs.c (init_optabs): Initialize signbit_optab using init_optab. (expand_copysign_absneg): If back end provides signbit insn, use it instead of bit operations on floating point argument. * builtins.c (enum insn_code signbit_optab[]): Remove array. (expand_builtin_signbit): Check signbit_optab->handlers[].insn_code for availability of signbit insn. * config/i386/i386.md (signbit<mode>2): New insn pattern to implement signbitf, signbit and signbitl built-ins as inline x87 intrinsics when SSE mode is not active. (isinf<mode>2): Disable for mfpmath=sse,387. From-SVN: r126813
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index d0e5db9..a2e4be8 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -240,11 +240,6 @@ static tree do_mpfr_remquo (tree, tree, tree);
static tree do_mpfr_lgamma_r (tree, tree, tree);
#endif
-/* This array records the insn_code of insns to imlement the signbit
- function. */
-enum insn_code signbit_optab[NUM_MACHINE_MODES];
-
-
/* Return true if NODE should be considered for inline expansion regardless
of the optimization level. This means whenever a function is invoked with
its "internal" name, which normally contains the prefix "__builtin". */
@@ -5725,7 +5720,7 @@ expand_builtin_signbit (tree exp, rtx target)
HOST_WIDE_INT hi, lo;
tree arg;
int word, bitpos;
- enum insn_code signbit_insn_code;
+ enum insn_code icode;
rtx temp;
if (!validate_arglist (exp, REAL_TYPE, VOID_TYPE))
@@ -5743,11 +5738,11 @@ expand_builtin_signbit (tree exp, rtx target)
/* Check if the back end provides an insn that handles signbit for the
argument's mode. */
- signbit_insn_code = signbit_optab [(int) fmode];
- if (signbit_insn_code != CODE_FOR_nothing)
+ icode = signbit_optab->handlers [(int) fmode].insn_code;
+ if (icode != CODE_FOR_nothing)
{
target = gen_reg_rtx (TYPE_MODE (TREE_TYPE (exp)));
- emit_unop_insn (signbit_insn_code, target, temp, UNKNOWN);
+ emit_unop_insn (icode, target, temp, UNKNOWN);
return target;
}