X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;ds=sidebyside;f=gcc%2Foptabs.h;h=4d0ce5245ea3a4c0fe118419e98bebdda910f9cf;hb=abfd653784390498e51dd5b323f66f78a83be734;hp=91625debb737bc5bbe88cd24bf07ff4a452d05f7;hpb=be5cecfdc1ad76fa8b4ef703bcdc5dc5499e2934;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/optabs.h b/gcc/optabs.h index 91625debb73..4d0ce5245ea 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -1,5 +1,5 @@ /* Definitions for code generation pass of GNU compiler. - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of GCC. @@ -115,7 +115,7 @@ enum optab_index wider than the multiplicand and multiplier. All involved operations are saturating. */ OTI_ssmadd_widen, - /* Unigned multiply and add with the result and addend one machine mode + /* Unsigned multiply and add with the result and addend one machine mode wider than the multiplicand and multiplier. All involved operations are saturating. */ OTI_usmadd_widen, @@ -129,7 +129,7 @@ enum optab_index wider than the multiplicand and multiplier. All involved operations are saturating. */ OTI_ssmsub_widen, - /* Unigned multiply and subtract the result and minuend one machine mode + /* Unsigned multiply and subtract the result and minuend one machine mode wider than the multiplicand and multiplier. All involved operations are saturating. */ OTI_usmsub_widen, @@ -167,6 +167,18 @@ enum optab_index OTI_rotl, /* Rotate right */ OTI_rotr, + + /* Arithmetic shift left of vector by vector */ + OTI_vashl, + /* Logical shift right of vector by vector */ + OTI_vlshr, + /* Arithmetic shift right of vector by vector */ + OTI_vashr, + /* Rotate left of vector by vector */ + OTI_vrotl, + /* Rotate right of vector by vector */ + OTI_vrotr, + /* Signed and floating-point minimum value */ OTI_smin, /* Signed and floating-point maximum value */ @@ -412,6 +424,11 @@ extern struct optab optab_table[OTI_MAX]; #define ashr_optab (&optab_table[OTI_ashr]) #define rotl_optab (&optab_table[OTI_rotl]) #define rotr_optab (&optab_table[OTI_rotr]) +#define vashl_optab (&optab_table[OTI_vashl]) +#define vlshr_optab (&optab_table[OTI_vlshr]) +#define vashr_optab (&optab_table[OTI_vashr]) +#define vrotl_optab (&optab_table[OTI_vrotl]) +#define vrotr_optab (&optab_table[OTI_vrotr]) #define smin_optab (&optab_table[OTI_smin]) #define smax_optab (&optab_table[OTI_smax]) #define umin_optab (&optab_table[OTI_umin]) @@ -705,19 +722,27 @@ 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); - -/* Excapsulate the block in REG_LIBCALL, and REG_RETVAL reg notes and add - REG_LIBCALL_ID notes to all insns in block. */ -extern void maybe_encapsulate_block (rtx, rtx, rtx); - -/* Emit code to perform a series of operations on a multi-word quantity, one - word at a time. */ -extern rtx emit_no_conflict_block (rtx, rtx, rtx, rtx, rtx); +extern bool maybe_emit_unop_insn (int, rtx, rtx, enum rtx_code); /* Emit one rtl insn to compare two rtx's. */ extern void emit_cmp_insn (rtx, rtx, enum rtx_code, rtx, enum machine_mode, int); +/* An extra flag to control optab_for_tree_code's behavior. This is needed to + distinguish between machines with a vector shift that takes a scalar for the + shift amount vs. machines that take a vector for the shift amount. */ +enum optab_subtype +{ + optab_default, + optab_scalar, + optab_vector +}; + +/* Return the optab used for computing the given operation on the type given by + the second argument. The third argument distinguishes between the types of + vector shifts and rotates */ +extern optab optab_for_tree_code (enum tree_code, const_tree, enum optab_subtype); + /* The various uses that a comparison can have; used by can_compare_p: jumps, conditional moves, store flag operations. */ enum can_compare_purpose @@ -727,10 +752,6 @@ enum can_compare_purpose ccp_store_flag }; -/* Return the optab used for computing the given operation on the type - given by the second argument. */ -extern optab optab_for_tree_code (enum tree_code, const_tree); - /* Nonzero if a compare of mode MODE can be done straightforwardly (without splitting it into pieces). */ extern int can_compare_p (enum rtx_code, enum machine_mode,