summaryrefslogtreecommitdiff
path: root/gcc/optabs.h
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-04 14:03:31 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-04 14:03:31 +0000
commitf36b9f698c8252215fb3002964d453d572d12004 (patch)
treebc1e8971e3309ecdbd9ef277a0279ed5b1e1ce55 /gcc/optabs.h
parentaf1a34ee7d1905ad19f66c161f3396dbbf3641af (diff)
downloadgcc-f36b9f698c8252215fb3002964d453d572d12004.tar.gz
* optabs.c (debug_optab_libfunc): Update; make available to gdb.
(libfunc_entry): New structure. (libfunc_hash): New hashtable. (hash_libfunc): New function. (eq_libfunc): New function. (convert_optab_libfunc): New function. (optab_libfunc): New function. (expand_binop, sign_expand_binop, expand_twoval_binop_libfunc, expand_unop, prepare_cmp_insn, prepare_float_insn, gen_add2_insn, expand_float, expand_fix, new_optab, new_convert_optab): Update for new libfunc API. (init_libfunc, init_integral_libfuncs, init_floating_libfuncs, init_interclass_conv_libfuncs init_intraclass_conv_libfuncs): Remove; reorganize all logic to: (gen_libfunc, gen_int_libfunc, gen_fp_libfunc, gen_int_fp_libfunc, gen_intv_fp_libfunc, gen_interclass_conv_libfunc, gen_int_to_fp_conv_libfunc, gen_ufloat_conv_libfunc, gen_int_to_fp_nondecimal_conv_libfunc, gen_fp_to_int_conv_libfunc, gen_intraclass_conv_libfunc, gen_trunc_conv_libfunc, gen_extend_conv_libfunc): New. (init_one_libfunc): Revamp for hashtables. (set_conv_libfunc): Likewise. (init_optabs): Initialize hashtable; use lazy initialization where possible. * optabs.h (optab_handlers): Move out of GGC. (optab, convert_optab): Move out of GGC; add lazy gen info. (code_to_optab, convert_optab_table, optab_table): Move out of GGC. (optab_libfunc, convert_optab_libfunc): New. * builtins.c (expand_builtin_powi): Update for new API. * expr.c (convert_move): Likewise. * expmed.c (expand_divmod): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128083 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r--gcc/optabs.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/gcc/optabs.h b/gcc/optabs.h
index c5b4a3db415..a85b3f365e7 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -39,15 +39,17 @@ along with GCC; see the file COPYING3. If not see
A few optabs, such as move_optab and cmp_optab, are used
by special code. */
-struct optab_handlers GTY(())
+struct optab_handlers
{
enum insn_code insn_code;
- rtx libfunc;
};
-struct optab GTY(())
+struct optab
{
enum rtx_code code;
+ const char *libcall_basename;
+ char libcall_suffix;
+ void (*libcall_gen)(struct optab *, const char *name, char suffix, enum machine_mode);
struct optab_handlers handlers[NUM_MACHINE_MODES];
};
typedef struct optab * optab;
@@ -55,9 +57,13 @@ typedef struct optab * optab;
/* A convert_optab is for some sort of conversion operation between
modes. The first array index is the destination mode, the second
is the source mode. */
-struct convert_optab GTY(())
+struct convert_optab
{
enum rtx_code code;
+ const char *libcall_basename;
+ void (*libcall_gen)(struct convert_optab *, const char *name,
+ enum machine_mode,
+ enum machine_mode);
struct optab_handlers handlers[NUM_MACHINE_MODES][NUM_MACHINE_MODES];
};
typedef struct convert_optab *convert_optab;
@@ -324,7 +330,7 @@ enum optab_index
OTI_MAX
};
-extern GTY(()) optab optab_table[OTI_MAX];
+extern optab optab_table[OTI_MAX];
#define add_optab (optab_table[OTI_add])
#define sub_optab (optab_table[OTI_sub])
@@ -498,7 +504,7 @@ enum convert_optab_index
COI_MAX
};
-extern GTY(()) convert_optab convert_optab_table[COI_MAX];
+extern convert_optab convert_optab_table[COI_MAX];
#define sext_optab (convert_optab_table[COI_sext])
#define zext_optab (convert_optab_table[COI_zext])
@@ -521,7 +527,7 @@ extern enum insn_code reload_in_optab[NUM_MACHINE_MODES];
extern enum insn_code reload_out_optab[NUM_MACHINE_MODES];
/* Contains the optab used for each rtx code. */
-extern GTY(()) optab code_to_optab[NUM_RTX_CODE + 1];
+extern optab code_to_optab[NUM_RTX_CODE + 1];
typedef rtx (*rtxfun) (rtx);
@@ -709,4 +715,8 @@ extern rtx expand_vec_shift_expr (tree, rtx);
#define convert_optab_handler(optab,mode,mode2) \
(&(optab)->handlers[(int) (mode)][(int) (mode2)])
+extern rtx optab_libfunc (optab optab, enum machine_mode mode);
+extern rtx optab_libfunc (optab optab, enum machine_mode mode);
+extern rtx convert_optab_libfunc (convert_optab optab, enum machine_mode mode1,
+ enum machine_mode mode2);
#endif /* GCC_OPTABS_H */