From 046625fab2932bdc6827d9abdd895824dfbc80eb Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 27 Jan 2005 16:55:07 -0800 Subject: builtins.c (expand_builtin_copysign): New. * builtins.c (expand_builtin_copysign): New. (expand_builtin): Call it. * genopinit.c (optabs): Add copysign_optab. * optabs.c (init_optabs): Initialize it. (expand_copysign): New. * optabs.h (OTI_copysign, copysign_optab): New. (expand_copysign): Declare. * config/alpha/alpha.md (UNSPEC_COPYSIGN): New. (copysignsf3, ncopysignsf3, copysigndf3, ncopysigndf3): New. * config/i386/i386.c (ix86_build_signbit_mask): Split from ... (ix86_expand_fp_absneg_operator): ... here. (ix86_split_copysign): New. * config/i386/i386-protos.h: Update. * config/i386/i386.md (UNSPEC_COPYSIGN): New. (copysignsf3, copysigndf3): New. * config/ia64/ia64.md (UNSPEC_COPYSIGN): New. (copysignsf3, ncopysignsf3): New. (copysigndf3, ncopysigndf3): New. (copysignxf3, ncopysignxf3): New. * config/ia64/ia64.c (rtx_needs_barrier): Handle UNSPEC_COPYSIGN. From-SVN: r94357 --- gcc/optabs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/optabs.h') diff --git a/gcc/optabs.h b/gcc/optabs.h index 56f7e4c..a378a96 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -193,6 +193,8 @@ enum optab_index OTI_tan, /* Inverse tangent */ OTI_atan, + /* Copy sign */ + OTI_copysign, /* Compare insn; two operands. */ OTI_cmp, @@ -311,6 +313,7 @@ extern GTY(()) optab optab_table[OTI_MAX]; #define rint_optab (optab_table[OTI_rint]) #define tan_optab (optab_table[OTI_tan]) #define atan_optab (optab_table[OTI_atan]) +#define copysign_optab (optab_table[OTI_copysign]) #define cmp_optab (optab_table[OTI_cmp]) #define ucmp_optab (optab_table[OTI_ucmp]) @@ -450,6 +453,9 @@ extern rtx expand_unop (enum machine_mode, optab, rtx, rtx, int); extern rtx expand_abs_nojump (enum machine_mode, rtx, rtx, int); extern rtx expand_abs (enum machine_mode, rtx, rtx, int, int); +/* Expand the copysign operation. */ +extern rtx expand_copysign (rtx, rtx, rtx); + /* Generate an instruction with a given INSN_CODE with an output and an input. */ extern void emit_unop_insn (int, rtx, rtx, enum rtx_code); -- cgit v1.1