Index: gcc/optabs.h
===================================================================
--- gcc/optabs.h	2010-07-03 18:20:10.000000000 +0100
+++ gcc/optabs.h	2010-07-03 18:32:20.000000000 +0100
@@ -782,9 +782,15 @@ extern rtx expand_vec_cond_expr (tree, t
 /* Generate code for VEC_LSHIFT_EXPR and VEC_RSHIFT_EXPR.  */
 extern rtx expand_vec_shift_expr (sepops, rtx);
 
-#define optab_handler(optab,mode) (&(optab)->handlers[(int) (mode)])
-#define convert_optab_handler(optab,mode,mode2) \
-	(&(optab)->handlers[(int) (mode)][(int) (mode2)])
+#define OPTAB_HANDLER(OPTAB, MODE) \
+  ((OPTAB)->handlers[(int) (MODE)].insn_code)
+#define SET_OPTAB_HANDLER(OPTAB, MODE, CODE) \
+  ((void) ((OPTAB)->handlers[(int) (MODE)].insn_code = (CODE)))
+
+#define CONVERT_OPTAB_HANDLER(OPTAB, MODE, MODE2) \
+  ((OPTAB)->handlers[(int) (MODE)][(int) (MODE2)].insn_code)
+#define SET_CONVERT_OPTAB_HANDLER(OPTAB, MODE, MODE2, CODE) \
+  ((void) ((OPTAB)->handlers[(int) (MODE)][(int) (MODE2)].insn_code = (CODE)))
 
 extern rtx optab_libfunc (optab optab, enum machine_mode mode);
 extern rtx convert_optab_libfunc (convert_optab optab, enum machine_mode mode1,
Index: gcc/builtins.c
===================================================================
--- gcc/builtins.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/builtins.c	2010-07-03 18:32:20.000000000 +0100
@@ -1994,7 +1994,7 @@ expand_builtin_mathfn (tree exp, rtx tar
     errno_set = false;
 
   /* Before working hard, check whether the instruction is available.  */
-  if (optab_handler (builtin_optab, mode)->insn_code != CODE_FOR_nothing)
+  if (OPTAB_HANDLER (builtin_optab, mode) != CODE_FOR_nothing)
     {
       target = gen_reg_rtx (mode);
 
@@ -2096,7 +2096,7 @@ expand_builtin_mathfn_2 (tree exp, rtx t
   mode = TYPE_MODE (TREE_TYPE (exp));
 
   /* Before working hard, check whether the instruction is available.  */
-  if (optab_handler (builtin_optab, mode)->insn_code == CODE_FOR_nothing)
+  if (OPTAB_HANDLER (builtin_optab, mode) == CODE_FOR_nothing)
     return NULL_RTX;
 
   target = gen_reg_rtx (mode);
@@ -2173,7 +2173,7 @@ expand_builtin_mathfn_3 (tree exp, rtx t
 
   /* Check if sincos insn is available, otherwise fallback
      to sin or cos insn.  */
-  if (optab_handler (builtin_optab, mode)->insn_code == CODE_FOR_nothing)
+  if (OPTAB_HANDLER (builtin_optab, mode) == CODE_FOR_nothing)
     switch (DECL_FUNCTION_CODE (fndecl))
       {
       CASE_FLT_FN (BUILT_IN_SIN):
@@ -2185,7 +2185,7 @@ expand_builtin_mathfn_3 (tree exp, rtx t
       }
 
   /* Before working hard, check whether the instruction is available.  */
-  if (optab_handler (builtin_optab, mode)->insn_code != CODE_FOR_nothing)
+  if (OPTAB_HANDLER (builtin_optab, mode) != CODE_FOR_nothing)
     {
       target = gen_reg_rtx (mode);
 
@@ -2282,7 +2282,7 @@ interclass_mathfn_icode (tree arg, tree
   mode = TYPE_MODE (TREE_TYPE (arg));
 
   if (builtin_optab)
-    return optab_handler (builtin_optab, mode)->insn_code;
+    return OPTAB_HANDLER (builtin_optab, mode);
   return CODE_FOR_nothing;
 }
 
@@ -2370,7 +2370,7 @@ expand_builtin_sincos (tree exp)
   mode = TYPE_MODE (TREE_TYPE (arg));
 
   /* Check if sincos insn is available, otherwise emit the call.  */
-  if (optab_handler (sincos_optab, mode)->insn_code == CODE_FOR_nothing)
+  if (OPTAB_HANDLER (sincos_optab, mode) == CODE_FOR_nothing)
     return NULL_RTX;
 
   target1 = gen_reg_rtx (mode);
@@ -2417,7 +2417,7 @@ expand_builtin_cexpi (tree exp, rtx targ
   /* Try expanding via a sincos optab, fall back to emitting a libcall
      to sincos or cexp.  We are sure we have sincos or cexp because cexpi
      is only generated from sincos, cexp or if we have either of them.  */
-  if (optab_handler (sincos_optab, mode)->insn_code != CODE_FOR_nothing)
+  if (OPTAB_HANDLER (sincos_optab, mode) != CODE_FOR_nothing)
     {
       op1 = gen_reg_rtx (mode);
       op2 = gen_reg_rtx (mode);
@@ -3080,8 +3080,7 @@ expand_builtin_pow (tree exp, rtx target
 	         smaller than pow (x, 1.5) if sqrt will not be expanded
 		 as a call.  */
 	      || (n == 3
-		  && (optab_handler (sqrt_optab, mode)->insn_code
-		      != CODE_FOR_nothing))))
+		  && OPTAB_HANDLER (sqrt_optab, mode) != CODE_FOR_nothing)))
 	{
 	  tree call_expr = build_call_nofold_loc (EXPR_LOCATION (exp), fn, 1,
 						  narg0);
@@ -3272,7 +3271,7 @@ expand_builtin_strlen (tree exp, rtx tar
       /* Bail out if we can't compute strlen in the right mode.  */
       while (insn_mode != VOIDmode)
 	{
-	  icode = optab_handler (strlen_optab, insn_mode)->insn_code;
+	  icode = OPTAB_HANDLER (strlen_optab, insn_mode);
 	  if (icode != CODE_FOR_nothing)
 	    break;
 
@@ -5308,7 +5307,7 @@ expand_builtin_signbit (tree exp, rtx ta
 
   /* Check if the back end provides an insn that handles signbit for the
      argument's mode. */
-  icode = signbit_optab->handlers [(int) fmode].insn_code;
+  icode = OPTAB_HANDLER (signbit_optab, fmode);
   if (icode != CODE_FOR_nothing)
     {
       rtx last = get_last_insn ();
Index: gcc/expmed.c
===================================================================
--- gcc/expmed.c	2010-07-03 18:20:10.000000000 +0100
+++ gcc/expmed.c	2010-07-03 18:32:20.000000000 +0100
@@ -419,15 +419,14 @@ store_bit_field_1 (rtx str_rtx, unsigned
      available.  */
   if (VECTOR_MODE_P (GET_MODE (op0))
       && !MEM_P (op0)
-      && (optab_handler (vec_set_optab, GET_MODE (op0))->insn_code
-	  != CODE_FOR_nothing)
+      && OPTAB_HANDLER (vec_set_optab, GET_MODE (op0)) != CODE_FOR_nothing
       && fieldmode == GET_MODE_INNER (GET_MODE (op0))
       && bitsize == GET_MODE_BITSIZE (GET_MODE_INNER (GET_MODE (op0)))
       && !(bitnum % GET_MODE_BITSIZE (GET_MODE_INNER (GET_MODE (op0)))))
     {
       enum machine_mode outermode = GET_MODE (op0);
       enum machine_mode innermode = GET_MODE_INNER (outermode);
-      int icode = (int) optab_handler (vec_set_optab, outermode)->insn_code;
+      int icode = (int) OPTAB_HANDLER (vec_set_optab, outermode);
       int pos = bitnum / GET_MODE_BITSIZE (innermode);
       rtx rtxpos = GEN_INT (pos);
       rtx src = value;
@@ -533,10 +532,9 @@ store_bit_field_1 (rtx str_rtx, unsigned
   if (!MEM_P (op0)
       && (BYTES_BIG_ENDIAN ? bitpos + bitsize == unit : bitpos == 0)
       && bitsize == GET_MODE_BITSIZE (fieldmode)
-      && (optab_handler (movstrict_optab, fieldmode)->insn_code
-	  != CODE_FOR_nothing))
+      && OPTAB_HANDLER (movstrict_optab, fieldmode) != CODE_FOR_nothing)
     {
-      int icode = optab_handler (movstrict_optab, fieldmode)->insn_code;
+      int icode = OPTAB_HANDLER (movstrict_optab, fieldmode);
       rtx insn;
       rtx start = get_last_insn ();
       rtx arg0 = op0;
@@ -1253,14 +1251,13 @@ extract_bit_field_1 (rtx str_rtx, unsign
      available.  */
   if (VECTOR_MODE_P (GET_MODE (op0))
       && !MEM_P (op0)
-      && (optab_handler (vec_extract_optab, GET_MODE (op0))->insn_code
-	  != CODE_FOR_nothing)
+      && OPTAB_HANDLER (vec_extract_optab, GET_MODE (op0)) != CODE_FOR_nothing
       && ((bitnum + bitsize - 1) / GET_MODE_BITSIZE (GET_MODE_INNER (GET_MODE (op0)))
 	  == bitnum / GET_MODE_BITSIZE (GET_MODE_INNER (GET_MODE (op0)))))
     {
       enum machine_mode outermode = GET_MODE (op0);
       enum machine_mode innermode = GET_MODE_INNER (outermode);
-      int icode = (int) optab_handler (vec_extract_optab, outermode)->insn_code;
+      int icode = (int) OPTAB_HANDLER (vec_extract_optab, outermode);
       unsigned HOST_WIDE_INT pos = bitnum / GET_MODE_BITSIZE (innermode);
       rtx rtxpos = GEN_INT (pos);
       rtx src = op0;
@@ -3567,7 +3564,7 @@ expand_mult_highpart_optab (enum machine
 
   /* Try widening multiplication.  */
   moptab = unsignedp ? umul_widen_optab : smul_widen_optab;
-  if (optab_handler (moptab, wider_mode)->insn_code != CODE_FOR_nothing
+  if (OPTAB_HANDLER (moptab, wider_mode) != CODE_FOR_nothing
       && mul_widen_cost[speed][wider_mode] < max_cost)
     {
       tem = expand_binop (wider_mode, moptab, op0, narrow_op1, 0,
@@ -3577,7 +3574,7 @@ expand_mult_highpart_optab (enum machine
     }
 
   /* Try widening the mode and perform a non-widening multiplication.  */
-  if (optab_handler (smul_optab, wider_mode)->insn_code != CODE_FOR_nothing
+  if (OPTAB_HANDLER (smul_optab, wider_mode) != CODE_FOR_nothing
       && size - 1 < BITS_PER_WORD
       && mul_cost[speed][wider_mode] + shift_cost[speed][mode][size-1] < max_cost)
     {
@@ -3604,7 +3601,7 @@ expand_mult_highpart_optab (enum machine
 
   /* Try widening multiplication of opposite signedness, and adjust.  */
   moptab = unsignedp ? smul_widen_optab : umul_widen_optab;
-  if (optab_handler (moptab, wider_mode)->insn_code != CODE_FOR_nothing
+  if (OPTAB_HANDLER (moptab, wider_mode) != CODE_FOR_nothing
       && size - 1 < BITS_PER_WORD
       && (mul_widen_cost[speed][wider_mode] + 2 * shift_cost[speed][mode][size-1]
 	  + 4 * add_cost[speed][mode] < max_cost))
@@ -3726,7 +3723,7 @@ expand_smod_pow2 (enum machine_mode mode
 	     use a LSHIFTRT, 1 ADD, 1 SUB and an AND.  */
 
 	  temp = gen_rtx_LSHIFTRT (mode, result, shift);
-	  if (optab_handler (lshr_optab, mode)->insn_code == CODE_FOR_nothing
+	  if (OPTAB_HANDLER (lshr_optab, mode) == CODE_FOR_nothing
 	      || rtx_cost (temp, SET, optimize_insn_for_speed_p ()) > COSTS_N_INSNS (2))
 	    {
 	      temp = expand_binop (mode, xor_optab, op0, signmask,
@@ -4030,8 +4027,8 @@ expand_divmod (int rem_flag, enum tree_c
 
   for (compute_mode = mode; compute_mode != VOIDmode;
        compute_mode = GET_MODE_WIDER_MODE (compute_mode))
-    if (optab_handler (optab1, compute_mode)->insn_code != CODE_FOR_nothing
-	|| optab_handler (optab2, compute_mode)->insn_code != CODE_FOR_nothing)
+    if (OPTAB_HANDLER (optab1, compute_mode) != CODE_FOR_nothing
+	|| OPTAB_HANDLER (optab2, compute_mode) != CODE_FOR_nothing)
       break;
 
   if (compute_mode == VOIDmode)
@@ -4284,13 +4281,13 @@ expand_divmod (int rem_flag, enum tree_c
 				      : sdiv_pow2_cheap[speed][compute_mode])
 			 /* We assume that cheap metric is true if the
 			    optab has an expander for this mode.  */
-			 && ((optab_handler ((rem_flag ? smod_optab
+			 && ((OPTAB_HANDLER ((rem_flag ? smod_optab
 					      : sdiv_optab),
-					      compute_mode)->insn_code
+					     compute_mode)
 			      != CODE_FOR_nothing)
-			     || (optab_handler(sdivmod_optab,
-					       compute_mode)
-				 ->insn_code != CODE_FOR_nothing)))
+			     || (OPTAB_HANDLER (sdivmod_optab,
+						compute_mode)
+				 != CODE_FOR_nothing)))
 		  ;
 		else if (EXACT_POWER_OF_2_OR_ZERO_P (abs_d))
 		  {
@@ -4302,9 +4299,9 @@ expand_divmod (int rem_flag, enum tree_c
 		      }
 
 		    if (sdiv_pow2_cheap[speed][compute_mode]
-			&& ((optab_handler (sdiv_optab, compute_mode)->insn_code
+			&& ((OPTAB_HANDLER (sdiv_optab, compute_mode)
 			     != CODE_FOR_nothing)
-			    || (optab_handler (sdivmod_optab, compute_mode)->insn_code
+			    || (OPTAB_HANDLER (sdivmod_optab, compute_mode)
 				!= CODE_FOR_nothing)))
 		      quotient = expand_divmod (0, TRUNC_DIV_EXPR,
 						compute_mode, op0,
@@ -4952,7 +4949,7 @@ expand_divmod (int rem_flag, enum tree_c
 	    = sign_expand_binop (compute_mode, umod_optab, smod_optab,
 				 op0, op1, target,
 				 unsignedp,
-				 ((optab_handler (optab2, compute_mode)->insn_code
+				 ((OPTAB_HANDLER (optab2, compute_mode)
 				   != CODE_FOR_nothing)
 				  ? OPTAB_DIRECT : OPTAB_WIDEN));
 	  if (remainder == 0)
@@ -4980,7 +4977,7 @@ expand_divmod (int rem_flag, enum tree_c
 	= sign_expand_binop (compute_mode, udiv_optab, sdiv_optab,
 			     op0, op1, rem_flag ? NULL_RTX : target,
 			     unsignedp,
-			     ((optab_handler (optab2, compute_mode)->insn_code
+			     ((OPTAB_HANDLER (optab2, compute_mode)
 			       != CODE_FOR_nothing)
 			      ? OPTAB_DIRECT : OPTAB_WIDEN));
 
@@ -5479,7 +5476,7 @@ emit_store_flag_1 (rtx target, enum rtx_
        compare_mode = GET_MODE_WIDER_MODE (compare_mode))
     {
      enum machine_mode optab_mode = mclass == MODE_CC ? CCmode : compare_mode;
-     icode = optab_handler (cstore_optab, optab_mode)->insn_code;
+     icode = OPTAB_HANDLER (cstore_optab, optab_mode);
      if (icode != CODE_FOR_nothing)
 	{
 	  do_pending_stack_adjust ();
@@ -5674,7 +5671,7 @@ emit_store_flag (rtx target, enum rtx_co
      as "-(int)X >> 31" is still cheaper than inverting "(int)X == 0".  */
   rcode = reverse_condition (code);
   if (can_compare_p (rcode, mode, ccp_store_flag)
-      && ! (optab_handler (cstore_optab, mode)->insn_code == CODE_FOR_nothing
+      && ! (OPTAB_HANDLER (cstore_optab, mode) == CODE_FOR_nothing
 	    && code == NE
 	    && GET_MODE_SIZE (mode) < UNITS_PER_WORD
 	    && op1 == const0_rtx))
@@ -5773,9 +5770,9 @@ emit_store_flag (rtx target, enum rtx_co
 	 that is compensated by the subsequent overflow when subtracting
 	 one / negating.  */
 
-      if (optab_handler (abs_optab, mode)->insn_code != CODE_FOR_nothing)
+      if (OPTAB_HANDLER (abs_optab, mode) != CODE_FOR_nothing)
 	tem = expand_unop (mode, abs_optab, op0, subtarget, 1);
-      else if (optab_handler (ffs_optab, mode)->insn_code != CODE_FOR_nothing)
+      else if (OPTAB_HANDLER (ffs_optab, mode) != CODE_FOR_nothing)
 	tem = expand_unop (mode, ffs_optab, op0, subtarget, 1);
       else if (GET_MODE_SIZE (mode) < UNITS_PER_WORD)
 	{
Index: gcc/expr.c
===================================================================
--- gcc/expr.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/expr.c	2010-07-03 18:32:20.000000000 +0100
@@ -434,7 +434,7 @@ convert_move (rtx to, rtx from, int unsi
 
       /* Try converting directly if the insn is supported.  */
 
-      code = convert_optab_handler (tab, to_mode, from_mode)->insn_code;
+      code = CONVERT_OPTAB_HANDLER (tab, to_mode, from_mode);
       if (code != CODE_FOR_nothing)
 	{
 	  emit_unop_insn (code, to, from,
@@ -468,12 +468,12 @@ convert_move (rtx to, rtx from, int unsi
       enum machine_mode full_mode
 	= smallest_mode_for_size (GET_MODE_BITSIZE (to_mode), MODE_INT);
 
-      gcc_assert (convert_optab_handler (trunc_optab, to_mode, full_mode)->insn_code
+      gcc_assert (CONVERT_OPTAB_HANDLER (trunc_optab, to_mode, full_mode)
 		  != CODE_FOR_nothing);
 
       if (full_mode != from_mode)
 	from = convert_to_mode (full_mode, from, unsignedp);
-      emit_unop_insn (convert_optab_handler (trunc_optab, to_mode, full_mode)->insn_code,
+      emit_unop_insn (CONVERT_OPTAB_HANDLER (trunc_optab, to_mode, full_mode),
 		      to, from, UNKNOWN);
       return;
     }
@@ -483,18 +483,19 @@ convert_move (rtx to, rtx from, int unsi
       enum machine_mode full_mode
 	= smallest_mode_for_size (GET_MODE_BITSIZE (from_mode), MODE_INT);
 
-      gcc_assert (convert_optab_handler (sext_optab, full_mode, from_mode)->insn_code
+      gcc_assert (CONVERT_OPTAB_HANDLER (sext_optab, full_mode, from_mode)
 		  != CODE_FOR_nothing);
 
       if (to_mode == full_mode)
 	{
-	  emit_unop_insn (convert_optab_handler (sext_optab, full_mode, from_mode)->insn_code,
+	  emit_unop_insn (CONVERT_OPTAB_HANDLER (sext_optab, full_mode,
+						 from_mode),
 			  to, from, UNKNOWN);
 	  return;
 	}
 
       new_from = gen_reg_rtx (full_mode);
-      emit_unop_insn (convert_optab_handler (sext_optab, full_mode, from_mode)->insn_code,
+      emit_unop_insn (CONVERT_OPTAB_HANDLER (sext_optab, full_mode, from_mode),
 		      new_from, from, UNKNOWN);
 
       /* else proceed to integer conversions below.  */
@@ -695,9 +696,10 @@ convert_move (rtx to, rtx from, int unsi
     }
 
   /* Support special truncate insns for certain modes.  */
-  if (convert_optab_handler (trunc_optab, to_mode, from_mode)->insn_code != CODE_FOR_nothing)
+  if (CONVERT_OPTAB_HANDLER (trunc_optab, to_mode,
+			     from_mode) != CODE_FOR_nothing)
     {
-      emit_unop_insn (convert_optab_handler (trunc_optab, to_mode, from_mode)->insn_code,
+      emit_unop_insn (CONVERT_OPTAB_HANDLER (trunc_optab, to_mode, from_mode),
 		      to, from, UNKNOWN);
       return;
     }
@@ -990,7 +992,7 @@ move_by_pieces (rtx to, rtx from, unsign
       if (mode == VOIDmode)
 	break;
 
-      icode = optab_handler (mov_optab, mode)->insn_code;
+      icode = OPTAB_HANDLER (mov_optab, mode);
       if (icode != CODE_FOR_nothing && align >= GET_MODE_ALIGNMENT (mode))
 	move_by_pieces_1 (GEN_FCN (icode), mode, &data);
 
@@ -1071,7 +1073,7 @@ move_by_pieces_ninsns (unsigned HOST_WID
       if (mode == VOIDmode)
 	break;
 
-      icode = optab_handler (mov_optab, mode)->insn_code;
+      icode = OPTAB_HANDLER (mov_optab, mode);
       if (icode != CODE_FOR_nothing && align >= GET_MODE_ALIGNMENT (mode))
 	n_insns += l / GET_MODE_SIZE (mode), l %= GET_MODE_SIZE (mode);
 
@@ -2352,7 +2354,7 @@ can_store_by_pieces (unsigned HOST_WIDE_
 	  if (mode == VOIDmode)
 	    break;
 
-	  icode = optab_handler (mov_optab, mode)->insn_code;
+	  icode = OPTAB_HANDLER (mov_optab, mode);
 	  if (icode != CODE_FOR_nothing
 	      && align >= GET_MODE_ALIGNMENT (mode))
 	    {
@@ -2565,7 +2567,7 @@ store_by_pieces_1 (struct store_by_piece
       if (mode == VOIDmode)
 	break;
 
-      icode = optab_handler (mov_optab, mode)->insn_code;
+      icode = OPTAB_HANDLER (mov_optab, mode);
       if (icode != CODE_FOR_nothing && align >= GET_MODE_ALIGNMENT (mode))
 	store_by_pieces_2 (GEN_FCN (icode), mode, data);
 
@@ -3034,7 +3036,7 @@ emit_move_via_integer (enum machine_mode
     return NULL_RTX;
 
   /* The target must support moves in this mode.  */
-  code = optab_handler (mov_optab, imode)->insn_code;
+  code = OPTAB_HANDLER (mov_optab, imode);
   if (code == CODE_FOR_nothing)
     return NULL_RTX;
 
@@ -3184,7 +3186,7 @@ emit_move_complex (enum machine_mode mod
 
   /* Move floating point as parts.  */
   if (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT
-      && optab_handler (mov_optab, GET_MODE_INNER (mode))->insn_code != CODE_FOR_nothing)
+      && OPTAB_HANDLER (mov_optab, GET_MODE_INNER (mode)) != CODE_FOR_nothing)
     try_int = false;
   /* Not possible if the values are inherently not adjacent.  */
   else if (GET_CODE (x) == CONCAT || GET_CODE (y) == CONCAT)
@@ -3235,7 +3237,7 @@ emit_move_ccmode (enum machine_mode mode
   /* Assume all MODE_CC modes are equivalent; if we have movcc, use it.  */
   if (mode != CCmode)
     {
-      enum insn_code code = optab_handler (mov_optab, CCmode)->insn_code;
+      enum insn_code code = OPTAB_HANDLER (mov_optab, CCmode);
       if (code != CODE_FOR_nothing)
 	{
 	  x = emit_move_change_mode (CCmode, mode, x, true);
@@ -3375,7 +3377,7 @@ emit_move_insn_1 (rtx x, rtx y)
 
   gcc_assert ((unsigned int) mode < (unsigned int) MAX_MACHINE_MODE);
 
-  code = optab_handler (mov_optab, mode)->insn_code;
+  code = OPTAB_HANDLER (mov_optab, mode);
   if (code != CODE_FOR_nothing)
     return emit_insn (GEN_FCN (code) (x, y));
 
@@ -3627,7 +3629,7 @@ emit_single_push_insn (enum machine_mode
   stack_pointer_delta += PUSH_ROUNDING (GET_MODE_SIZE (mode));
   /* If there is push pattern, use it.  Otherwise try old way of throwing
      MEM representing push operation to move expander.  */
-  icode = optab_handler (push_optab, mode)->insn_code;
+  icode = OPTAB_HANDLER (push_optab, mode);
   if (icode != CODE_FOR_nothing)
     {
       if (((pred = insn_data[(int) icode].operand[0].predicate)
@@ -4363,7 +4365,7 @@ expand_assignment (tree to, tree from, b
        set_mem_attributes (mem, to, 0);
        set_mem_addr_space (mem, as);
 
-       icode = movmisalign_optab->handlers[mode].insn_code;
+       icode = OPTAB_HANDLER (movmisalign_optab, mode);
        gcc_assert (icode != CODE_FOR_nothing);
 
        op_mode1 = insn_data[icode].operand[1].mode;
@@ -4496,7 +4498,7 @@ expand_assignment (tree to, tree from, b
 emit_storent_insn (rtx to, rtx from)
 {
   enum machine_mode mode = GET_MODE (to), imode;
-  enum insn_code code = optab_handler (storent_optab, mode)->insn_code;
+  enum insn_code code = OPTAB_HANDLER (storent_optab, mode);
   rtx pattern;
 
   if (code == CODE_FOR_nothing)
@@ -5703,7 +5705,7 @@ store_constructor (tree exp, rtx target,
 	  {
 	    enum machine_mode mode = GET_MODE (target);
 
-	    icode = (int) optab_handler (vec_init_optab, mode)->insn_code;
+	    icode = (int) OPTAB_HANDLER (vec_init_optab, mode);
 	    if (icode != CODE_FOR_nothing)
 	      {
 		unsigned int i;
@@ -7704,7 +7706,7 @@ #define REDUCE_BIT_FIELD(expr)	(reduce_b
 	  this_optab = usmul_widen_optab;
 	  if (mode == GET_MODE_2XWIDER_MODE (innermode))
 	    {
-	      if (optab_handler (this_optab, mode)->insn_code != CODE_FOR_nothing)
+	      if (OPTAB_HANDLER (this_optab, mode) != CODE_FOR_nothing)
 		{
 		  if (TYPE_UNSIGNED (TREE_TYPE (treeop0)))
 		    expand_operands (treeop0, treeop1, subtarget, &op0, &op1,
@@ -7730,7 +7732,7 @@ #define REDUCE_BIT_FIELD(expr)	(reduce_b
 
 	  if (mode == GET_MODE_2XWIDER_MODE (innermode))
 	    {
-	      if (optab_handler (this_optab, mode)->insn_code != CODE_FOR_nothing)
+	      if (OPTAB_HANDLER (this_optab, mode) != CODE_FOR_nothing)
 		{
 		  expand_operands (treeop0, treeop1, NULL_RTX, &op0, &op1,
 				   EXPAND_NORMAL);
@@ -7738,7 +7740,7 @@ #define REDUCE_BIT_FIELD(expr)	(reduce_b
 					       unsignedp, this_optab);
 		  return REDUCE_BIT_FIELD (temp);
 		}
-	      if (optab_handler (other_optab, mode)->insn_code != CODE_FOR_nothing
+	      if (OPTAB_HANDLER (other_optab, mode) != CODE_FOR_nothing
 		  && innermode == word_mode)
 		{
 		  rtx htem, hipart;
@@ -8727,7 +8729,7 @@ expand_expr_real_1 (tree exp, rtx target
 			|| modifier == EXPAND_STACK_PARM);
 
 	    /* The vectorizer should have already checked the mode.  */
-	    icode = optab_handler (movmisalign_optab, mode)->insn_code;
+	    icode = OPTAB_HANDLER (movmisalign_optab, mode);
 	    gcc_assert (icode != CODE_FOR_nothing);
 
 	    /* We've already validated the memory, and we're creating a
Index: gcc/genopinit.c
===================================================================
--- gcc/genopinit.c	2010-07-03 18:20:10.000000000 +0100
+++ gcc/genopinit.c	2010-07-03 18:32:20.000000000 +0100
@@ -60,152 +60,152 @@ Software Foundation; either version 3, o
    upper-case forms of the comparison, respectively.  */
 
 static const char * const optabs[] =
-{ "convert_optab_handler (sext_optab, $B, $A)->insn_code = CODE_FOR_$(extend$a$b2$)",
-  "convert_optab_handler (zext_optab, $B, $A)->insn_code = CODE_FOR_$(zero_extend$a$b2$)",
-  "convert_optab_handler (sfix_optab, $B, $A)->insn_code = CODE_FOR_$(fix$F$a$I$b2$)",
-  "convert_optab_handler (ufix_optab, $B, $A)->insn_code = CODE_FOR_$(fixuns$F$a$b2$)",
-  "convert_optab_handler (sfixtrunc_optab, $B, $A)->insn_code = CODE_FOR_$(fix_trunc$F$a$I$b2$)",
-  "convert_optab_handler (ufixtrunc_optab, $B, $A)->insn_code = CODE_FOR_$(fixuns_trunc$F$a$I$b2$)",
-  "convert_optab_handler (sfloat_optab, $B, $A)->insn_code = CODE_FOR_$(float$I$a$F$b2$)",
-  "convert_optab_handler (ufloat_optab, $B, $A)->insn_code = CODE_FOR_$(floatuns$I$a$F$b2$)",
-  "convert_optab_handler (trunc_optab, $B, $A)->insn_code = CODE_FOR_$(trunc$a$b2$)",
-  "convert_optab_handler (fract_optab, $B, $A)->insn_code = CODE_FOR_$(fract$a$b2$)",
-  "convert_optab_handler (fractuns_optab, $B, $A)->insn_code = CODE_FOR_$(fractuns$I$a$Q$b2$)",
-  "convert_optab_handler (fractuns_optab, $B, $A)->insn_code = CODE_FOR_$(fractuns$Q$a$I$b2$)",
-  "convert_optab_handler (satfract_optab, $B, $A)->insn_code = CODE_FOR_$(satfract$a$Q$b2$)",
-  "convert_optab_handler (satfractuns_optab, $B, $A)->insn_code = CODE_FOR_$(satfractuns$I$a$Q$b2$)",
-  "optab_handler (add_optab, $A)->insn_code = CODE_FOR_$(add$P$a3$)",
-  "optab_handler (addv_optab, $A)->insn_code =\n\
-    optab_handler (add_optab, $A)->insn_code = CODE_FOR_$(add$F$a3$)",
-  "optab_handler (addv_optab, $A)->insn_code = CODE_FOR_$(addv$I$a3$)",
-  "optab_handler (add_optab, $A)->insn_code = CODE_FOR_$(add$Q$a3$)",
-  "optab_handler (ssadd_optab, $A)->insn_code = CODE_FOR_$(ssadd$Q$a3$)",
-  "optab_handler (usadd_optab, $A)->insn_code = CODE_FOR_$(usadd$Q$a3$)",
-  "optab_handler (sub_optab, $A)->insn_code = CODE_FOR_$(sub$P$a3$)",
-  "optab_handler (subv_optab, $A)->insn_code =\n\
-    optab_handler (sub_optab, $A)->insn_code = CODE_FOR_$(sub$F$a3$)",
-  "optab_handler (subv_optab, $A)->insn_code = CODE_FOR_$(subv$I$a3$)",
-  "optab_handler (sub_optab, $A)->insn_code = CODE_FOR_$(sub$Q$a3$)",
-  "optab_handler (sssub_optab, $A)->insn_code = CODE_FOR_$(sssub$Q$a3$)",
-  "optab_handler (ussub_optab, $A)->insn_code = CODE_FOR_$(ussub$Q$a3$)",
-  "optab_handler (smul_optab, $A)->insn_code = CODE_FOR_$(mul$Q$a3$)",
-  "optab_handler (ssmul_optab, $A)->insn_code = CODE_FOR_$(ssmul$Q$a3$)",
-  "optab_handler (usmul_optab, $A)->insn_code = CODE_FOR_$(usmul$Q$a3$)",
-  "optab_handler (smul_optab, $A)->insn_code = CODE_FOR_$(mul$P$a3$)",
-  "optab_handler (smulv_optab, $A)->insn_code =\n\
-    optab_handler (smul_optab, $A)->insn_code = CODE_FOR_$(mul$F$a3$)",
-  "optab_handler (smulv_optab, $A)->insn_code = CODE_FOR_$(mulv$I$a3$)",
-  "optab_handler (umul_highpart_optab, $A)->insn_code = CODE_FOR_$(umul$a3_highpart$)",
-  "optab_handler (smul_highpart_optab, $A)->insn_code = CODE_FOR_$(smul$a3_highpart$)",
-  "optab_handler (smul_widen_optab, $B)->insn_code = CODE_FOR_$(mul$a$b3$)$N",
-  "optab_handler (umul_widen_optab, $B)->insn_code = CODE_FOR_$(umul$a$b3$)$N",
-  "optab_handler (usmul_widen_optab, $B)->insn_code = CODE_FOR_$(usmul$a$b3$)$N",
-  "optab_handler (smadd_widen_optab, $B)->insn_code = CODE_FOR_$(madd$a$b4$)$N",
-  "optab_handler (umadd_widen_optab, $B)->insn_code = CODE_FOR_$(umadd$a$b4$)$N",
-  "optab_handler (ssmadd_widen_optab, $B)->insn_code = CODE_FOR_$(ssmadd$a$b4$)$N",
-  "optab_handler (usmadd_widen_optab, $B)->insn_code = CODE_FOR_$(usmadd$a$b4$)$N",
-  "optab_handler (smsub_widen_optab, $B)->insn_code = CODE_FOR_$(msub$a$b4$)$N",
-  "optab_handler (umsub_widen_optab, $B)->insn_code = CODE_FOR_$(umsub$a$b4$)$N",
-  "optab_handler (ssmsub_widen_optab, $B)->insn_code = CODE_FOR_$(ssmsub$a$b4$)$N",
-  "optab_handler (usmsub_widen_optab, $B)->insn_code = CODE_FOR_$(usmsub$a$b4$)$N",
-  "optab_handler (sdiv_optab, $A)->insn_code = CODE_FOR_$(div$a3$)",
-  "optab_handler (ssdiv_optab, $A)->insn_code = CODE_FOR_$(ssdiv$Q$a3$)",
-  "optab_handler (sdivv_optab, $A)->insn_code = CODE_FOR_$(div$V$I$a3$)",
-  "optab_handler (udiv_optab, $A)->insn_code = CODE_FOR_$(udiv$I$a3$)",
-  "optab_handler (udiv_optab, $A)->insn_code = CODE_FOR_$(udiv$Q$a3$)",
-  "optab_handler (usdiv_optab, $A)->insn_code = CODE_FOR_$(usdiv$Q$a3$)",
-  "optab_handler (sdivmod_optab, $A)->insn_code = CODE_FOR_$(divmod$a4$)",
-  "optab_handler (udivmod_optab, $A)->insn_code = CODE_FOR_$(udivmod$a4$)",
-  "optab_handler (smod_optab, $A)->insn_code = CODE_FOR_$(mod$a3$)",
-  "optab_handler (umod_optab, $A)->insn_code = CODE_FOR_$(umod$a3$)",
-  "optab_handler (fmod_optab, $A)->insn_code = CODE_FOR_$(fmod$a3$)",
-  "optab_handler (remainder_optab, $A)->insn_code = CODE_FOR_$(remainder$a3$)",
-  "optab_handler (ftrunc_optab, $A)->insn_code = CODE_FOR_$(ftrunc$F$a2$)",
-  "optab_handler (and_optab, $A)->insn_code = CODE_FOR_$(and$a3$)",
-  "optab_handler (ior_optab, $A)->insn_code = CODE_FOR_$(ior$a3$)",
-  "optab_handler (xor_optab, $A)->insn_code = CODE_FOR_$(xor$a3$)",
-  "optab_handler (ashl_optab, $A)->insn_code = CODE_FOR_$(ashl$a3$)",
-  "optab_handler (ssashl_optab, $A)->insn_code = CODE_FOR_$(ssashl$Q$a3$)",
-  "optab_handler (usashl_optab, $A)->insn_code = CODE_FOR_$(usashl$Q$a3$)",
-  "optab_handler (ashr_optab, $A)->insn_code = CODE_FOR_$(ashr$a3$)",
-  "optab_handler (lshr_optab, $A)->insn_code = CODE_FOR_$(lshr$a3$)",
-  "optab_handler (rotl_optab, $A)->insn_code = CODE_FOR_$(rotl$a3$)",
-  "optab_handler (rotr_optab, $A)->insn_code = CODE_FOR_$(rotr$a3$)",
-  "optab_handler (vashr_optab, $A)->insn_code = CODE_FOR_$(vashr$a3$)",
-  "optab_handler (vlshr_optab, $A)->insn_code = CODE_FOR_$(vlshr$a3$)",
-  "optab_handler (vashl_optab, $A)->insn_code = CODE_FOR_$(vashl$a3$)",
-  "optab_handler (vrotl_optab, $A)->insn_code = CODE_FOR_$(vrotl$a3$)",
-  "optab_handler (vrotr_optab, $A)->insn_code = CODE_FOR_$(vrotr$a3$)",
-  "optab_handler (smin_optab, $A)->insn_code = CODE_FOR_$(smin$a3$)",
-  "optab_handler (smax_optab, $A)->insn_code = CODE_FOR_$(smax$a3$)",
-  "optab_handler (umin_optab, $A)->insn_code = CODE_FOR_$(umin$I$a3$)",
-  "optab_handler (umax_optab, $A)->insn_code = CODE_FOR_$(umax$I$a3$)",
-  "optab_handler (pow_optab, $A)->insn_code = CODE_FOR_$(pow$a3$)",
-  "optab_handler (atan2_optab, $A)->insn_code = CODE_FOR_$(atan2$a3$)",
-  "optab_handler (neg_optab, $A)->insn_code = CODE_FOR_$(neg$P$a2$)",
-  "optab_handler (negv_optab, $A)->insn_code =\n\
-    optab_handler (neg_optab, $A)->insn_code = CODE_FOR_$(neg$F$a2$)",
-  "optab_handler (negv_optab, $A)->insn_code = CODE_FOR_$(negv$I$a2$)",
-  "optab_handler (neg_optab, $A)->insn_code = CODE_FOR_$(neg$Q$a2$)",
-  "optab_handler (ssneg_optab, $A)->insn_code = CODE_FOR_$(ssneg$Q$a2$)",
-  "optab_handler (usneg_optab, $A)->insn_code = CODE_FOR_$(usneg$Q$a2$)",
-  "optab_handler (abs_optab, $A)->insn_code = CODE_FOR_$(abs$P$a2$)",
-  "optab_handler (absv_optab, $A)->insn_code =\n\
-    optab_handler (abs_optab, $A)->insn_code = CODE_FOR_$(abs$F$a2$)",
-  "optab_handler (absv_optab, $A)->insn_code = CODE_FOR_$(absv$I$a2$)",
-  "optab_handler (copysign_optab, $A)->insn_code = CODE_FOR_$(copysign$F$a3$)",
-  "optab_handler (signbit_optab, $A)->insn_code = CODE_FOR_$(signbit$F$a2$)",
-  "optab_handler (isinf_optab, $A)->insn_code = CODE_FOR_$(isinf$a2$)",
-  "optab_handler (sqrt_optab, $A)->insn_code = CODE_FOR_$(sqrt$a2$)",
-  "optab_handler (floor_optab, $A)->insn_code = CODE_FOR_$(floor$a2$)",
-  "convert_optab_handler (lfloor_optab, $B, $A)->insn_code = CODE_FOR_$(lfloor$F$a$I$b2$)",
-  "optab_handler (ceil_optab, $A)->insn_code = CODE_FOR_$(ceil$a2$)",
-  "convert_optab_handler (lceil_optab, $B, $A)->insn_code = CODE_FOR_$(lceil$F$a$I$b2$)",
-  "optab_handler (round_optab, $A)->insn_code = CODE_FOR_$(round$a2$)",
-  "optab_handler (btrunc_optab, $A)->insn_code = CODE_FOR_$(btrunc$a2$)",
-  "optab_handler (nearbyint_optab, $A)->insn_code = CODE_FOR_$(nearbyint$a2$)",
-  "optab_handler (rint_optab, $A)->insn_code = CODE_FOR_$(rint$a2$)",
-  "convert_optab_handler (lrint_optab, $B, $A)->insn_code = CODE_FOR_$(lrint$F$a$I$b2$)",
-  "convert_optab_handler (lround_optab, $B, $A)->insn_code = CODE_FOR_$(lround$F$a$I$b2$)",
-  "optab_handler (sincos_optab, $A)->insn_code = CODE_FOR_$(sincos$a3$)",
-  "optab_handler (sin_optab, $A)->insn_code = CODE_FOR_$(sin$a2$)",
-  "optab_handler (asin_optab, $A)->insn_code = CODE_FOR_$(asin$a2$)",
-  "optab_handler (cos_optab, $A)->insn_code = CODE_FOR_$(cos$a2$)",
-  "optab_handler (acos_optab, $A)->insn_code = CODE_FOR_$(acos$a2$)",
-  "optab_handler (exp_optab, $A)->insn_code = CODE_FOR_$(exp$a2$)",
-  "optab_handler (exp10_optab, $A)->insn_code = CODE_FOR_$(exp10$a2$)",
-  "optab_handler (exp2_optab, $A)->insn_code = CODE_FOR_$(exp2$a2$)",
-  "optab_handler (expm1_optab, $A)->insn_code = CODE_FOR_$(expm1$a2$)",
-  "optab_handler (ldexp_optab, $A)->insn_code = CODE_FOR_$(ldexp$a3$)",
-  "optab_handler (scalb_optab, $A)->insn_code = CODE_FOR_$(scalb$a3$)",
-  "optab_handler (significand_optab, $A)->insn_code = CODE_FOR_$(significand$a2$)",
-  "optab_handler (logb_optab, $A)->insn_code = CODE_FOR_$(logb$a2$)",
-  "optab_handler (ilogb_optab, $A)->insn_code = CODE_FOR_$(ilogb$a2$)",
-  "optab_handler (log_optab, $A)->insn_code = CODE_FOR_$(log$a2$)",
-  "optab_handler (log10_optab, $A)->insn_code = CODE_FOR_$(log10$a2$)",
-  "optab_handler (log2_optab, $A)->insn_code = CODE_FOR_$(log2$a2$)",
-  "optab_handler (log1p_optab, $A)->insn_code = CODE_FOR_$(log1p$a2$)",
-  "optab_handler (tan_optab, $A)->insn_code = CODE_FOR_$(tan$a2$)",
-  "optab_handler (atan_optab, $A)->insn_code = CODE_FOR_$(atan$a2$)",
-  "optab_handler (strlen_optab, $A)->insn_code = CODE_FOR_$(strlen$a$)",
-  "optab_handler (one_cmpl_optab, $A)->insn_code = CODE_FOR_$(one_cmpl$a2$)",
-  "optab_handler (bswap_optab, $A)->insn_code = CODE_FOR_$(bswap$a2$)",
-  "optab_handler (ffs_optab, $A)->insn_code = CODE_FOR_$(ffs$a2$)",
-  "optab_handler (clz_optab, $A)->insn_code = CODE_FOR_$(clz$a2$)",
-  "optab_handler (ctz_optab, $A)->insn_code = CODE_FOR_$(ctz$a2$)",
-  "optab_handler (popcount_optab, $A)->insn_code = CODE_FOR_$(popcount$a2$)",
-  "optab_handler (parity_optab, $A)->insn_code = CODE_FOR_$(parity$a2$)",
-  "optab_handler (mov_optab, $A)->insn_code = CODE_FOR_$(mov$a$)",
-  "optab_handler (movstrict_optab, $A)->insn_code = CODE_FOR_$(movstrict$a$)",
-  "optab_handler (movmisalign_optab, $A)->insn_code = CODE_FOR_$(movmisalign$a$)",
-  "optab_handler (storent_optab, $A)->insn_code = CODE_FOR_$(storent$a$)",
-  "optab_handler (addcc_optab, $A)->insn_code = CODE_FOR_$(add$acc$)",
+{ "SET_CONVERT_OPTAB_HANDLER (sext_optab, $B, $A, CODE_FOR_$(extend$a$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (zext_optab, $B, $A, CODE_FOR_$(zero_extend$a$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (sfix_optab, $B, $A, CODE_FOR_$(fix$F$a$I$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (ufix_optab, $B, $A, CODE_FOR_$(fixuns$F$a$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (sfixtrunc_optab, $B, $A, CODE_FOR_$(fix_trunc$F$a$I$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (ufixtrunc_optab, $B, $A, CODE_FOR_$(fixuns_trunc$F$a$I$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (sfloat_optab, $B, $A, CODE_FOR_$(float$I$a$F$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (ufloat_optab, $B, $A, CODE_FOR_$(floatuns$I$a$F$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (trunc_optab, $B, $A, CODE_FOR_$(trunc$a$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (fract_optab, $B, $A, CODE_FOR_$(fract$a$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (fractuns_optab, $B, $A, CODE_FOR_$(fractuns$I$a$Q$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (fractuns_optab, $B, $A, CODE_FOR_$(fractuns$Q$a$I$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (satfract_optab, $B, $A, CODE_FOR_$(satfract$a$Q$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (satfractuns_optab, $B, $A, CODE_FOR_$(satfractuns$I$a$Q$b2$))",
+  "SET_OPTAB_HANDLER (add_optab, $A, CODE_FOR_$(add$P$a3$))",
+  "SET_OPTAB_HANDLER (addv_optab, $A, CODE_FOR_$(add$F$a3$)),\n\
+    SET_OPTAB_HANDLER (add_optab, $A, CODE_FOR_$(add$F$a3$))",
+  "SET_OPTAB_HANDLER (addv_optab, $A, CODE_FOR_$(addv$I$a3$))",
+  "SET_OPTAB_HANDLER (add_optab, $A, CODE_FOR_$(add$Q$a3$))",
+  "SET_OPTAB_HANDLER (ssadd_optab, $A, CODE_FOR_$(ssadd$Q$a3$))",
+  "SET_OPTAB_HANDLER (usadd_optab, $A, CODE_FOR_$(usadd$Q$a3$))",
+  "SET_OPTAB_HANDLER (sub_optab, $A, CODE_FOR_$(sub$P$a3$))",
+  "SET_OPTAB_HANDLER (subv_optab, $A, CODE_FOR_$(sub$F$a3$)),\n\
+    SET_OPTAB_HANDLER (sub_optab, $A, CODE_FOR_$(sub$F$a3$))",
+  "SET_OPTAB_HANDLER (subv_optab, $A, CODE_FOR_$(subv$I$a3$))",
+  "SET_OPTAB_HANDLER (sub_optab, $A, CODE_FOR_$(sub$Q$a3$))",
+  "SET_OPTAB_HANDLER (sssub_optab, $A, CODE_FOR_$(sssub$Q$a3$))",
+  "SET_OPTAB_HANDLER (ussub_optab, $A, CODE_FOR_$(ussub$Q$a3$))",
+  "SET_OPTAB_HANDLER (smul_optab, $A, CODE_FOR_$(mul$Q$a3$))",
+  "SET_OPTAB_HANDLER (ssmul_optab, $A, CODE_FOR_$(ssmul$Q$a3$))",
+  "SET_OPTAB_HANDLER (usmul_optab, $A, CODE_FOR_$(usmul$Q$a3$))",
+  "SET_OPTAB_HANDLER (smul_optab, $A, CODE_FOR_$(mul$P$a3$))",
+  "SET_OPTAB_HANDLER (smulv_optab, $A, CODE_FOR_$(mul$F$a3$)),\n\
+    SET_OPTAB_HANDLER (smul_optab, $A, CODE_FOR_$(mul$F$a3$))",
+  "SET_OPTAB_HANDLER (smulv_optab, $A, CODE_FOR_$(mulv$I$a3$))",
+  "SET_OPTAB_HANDLER (umul_highpart_optab, $A, CODE_FOR_$(umul$a3_highpart$))",
+  "SET_OPTAB_HANDLER (smul_highpart_optab, $A, CODE_FOR_$(smul$a3_highpart$))",
+  "SET_OPTAB_HANDLER (smul_widen_optab, $B, CODE_FOR_$(mul$a$b3$)$N)",
+  "SET_OPTAB_HANDLER (umul_widen_optab, $B, CODE_FOR_$(umul$a$b3$)$N)",
+  "SET_OPTAB_HANDLER (usmul_widen_optab, $B, CODE_FOR_$(usmul$a$b3$)$N)",
+  "SET_OPTAB_HANDLER (smadd_widen_optab, $B, CODE_FOR_$(madd$a$b4$)$N)",
+  "SET_OPTAB_HANDLER (umadd_widen_optab, $B, CODE_FOR_$(umadd$a$b4$)$N)",
+  "SET_OPTAB_HANDLER (ssmadd_widen_optab, $B, CODE_FOR_$(ssmadd$a$b4$)$N)",
+  "SET_OPTAB_HANDLER (usmadd_widen_optab, $B, CODE_FOR_$(usmadd$a$b4$)$N)",
+  "SET_OPTAB_HANDLER (smsub_widen_optab, $B, CODE_FOR_$(msub$a$b4$)$N)",
+  "SET_OPTAB_HANDLER (umsub_widen_optab, $B, CODE_FOR_$(umsub$a$b4$)$N)",
+  "SET_OPTAB_HANDLER (ssmsub_widen_optab, $B, CODE_FOR_$(ssmsub$a$b4$)$N)",
+  "SET_OPTAB_HANDLER (usmsub_widen_optab, $B, CODE_FOR_$(usmsub$a$b4$)$N)",
+  "SET_OPTAB_HANDLER (sdiv_optab, $A, CODE_FOR_$(div$a3$))",
+  "SET_OPTAB_HANDLER (ssdiv_optab, $A, CODE_FOR_$(ssdiv$Q$a3$))",
+  "SET_OPTAB_HANDLER (sdivv_optab, $A, CODE_FOR_$(div$V$I$a3$))",
+  "SET_OPTAB_HANDLER (udiv_optab, $A, CODE_FOR_$(udiv$I$a3$))",
+  "SET_OPTAB_HANDLER (udiv_optab, $A, CODE_FOR_$(udiv$Q$a3$))",
+  "SET_OPTAB_HANDLER (usdiv_optab, $A, CODE_FOR_$(usdiv$Q$a3$))",
+  "SET_OPTAB_HANDLER (sdivmod_optab, $A, CODE_FOR_$(divmod$a4$))",
+  "SET_OPTAB_HANDLER (udivmod_optab, $A, CODE_FOR_$(udivmod$a4$))",
+  "SET_OPTAB_HANDLER (smod_optab, $A, CODE_FOR_$(mod$a3$))",
+  "SET_OPTAB_HANDLER (umod_optab, $A, CODE_FOR_$(umod$a3$))",
+  "SET_OPTAB_HANDLER (fmod_optab, $A, CODE_FOR_$(fmod$a3$))",
+  "SET_OPTAB_HANDLER (remainder_optab, $A, CODE_FOR_$(remainder$a3$))",
+  "SET_OPTAB_HANDLER (ftrunc_optab, $A, CODE_FOR_$(ftrunc$F$a2$))",
+  "SET_OPTAB_HANDLER (and_optab, $A, CODE_FOR_$(and$a3$))",
+  "SET_OPTAB_HANDLER (ior_optab, $A, CODE_FOR_$(ior$a3$))",
+  "SET_OPTAB_HANDLER (xor_optab, $A, CODE_FOR_$(xor$a3$))",
+  "SET_OPTAB_HANDLER (ashl_optab, $A, CODE_FOR_$(ashl$a3$))",
+  "SET_OPTAB_HANDLER (ssashl_optab, $A, CODE_FOR_$(ssashl$Q$a3$))",
+  "SET_OPTAB_HANDLER (usashl_optab, $A, CODE_FOR_$(usashl$Q$a3$))",
+  "SET_OPTAB_HANDLER (ashr_optab, $A, CODE_FOR_$(ashr$a3$))",
+  "SET_OPTAB_HANDLER (lshr_optab, $A, CODE_FOR_$(lshr$a3$))",
+  "SET_OPTAB_HANDLER (rotl_optab, $A, CODE_FOR_$(rotl$a3$))",
+  "SET_OPTAB_HANDLER (rotr_optab, $A, CODE_FOR_$(rotr$a3$))",
+  "SET_OPTAB_HANDLER (vashr_optab, $A, CODE_FOR_$(vashr$a3$))",
+  "SET_OPTAB_HANDLER (vlshr_optab, $A, CODE_FOR_$(vlshr$a3$))",
+  "SET_OPTAB_HANDLER (vashl_optab, $A, CODE_FOR_$(vashl$a3$))",
+  "SET_OPTAB_HANDLER (vrotl_optab, $A, CODE_FOR_$(vrotl$a3$))",
+  "SET_OPTAB_HANDLER (vrotr_optab, $A, CODE_FOR_$(vrotr$a3$))",
+  "SET_OPTAB_HANDLER (smin_optab, $A, CODE_FOR_$(smin$a3$))",
+  "SET_OPTAB_HANDLER (smax_optab, $A, CODE_FOR_$(smax$a3$))",
+  "SET_OPTAB_HANDLER (umin_optab, $A, CODE_FOR_$(umin$I$a3$))",
+  "SET_OPTAB_HANDLER (umax_optab, $A, CODE_FOR_$(umax$I$a3$))",
+  "SET_OPTAB_HANDLER (pow_optab, $A, CODE_FOR_$(pow$a3$))",
+  "SET_OPTAB_HANDLER (atan2_optab, $A, CODE_FOR_$(atan2$a3$))",
+  "SET_OPTAB_HANDLER (neg_optab, $A, CODE_FOR_$(neg$P$a2$))",
+  "SET_OPTAB_HANDLER (negv_optab, $A, CODE_FOR_$(neg$F$a2$)),\n\
+    SET_OPTAB_HANDLER (neg_optab, $A, CODE_FOR_$(neg$F$a2$))",
+  "SET_OPTAB_HANDLER (negv_optab, $A, CODE_FOR_$(negv$I$a2$))",
+  "SET_OPTAB_HANDLER (neg_optab, $A, CODE_FOR_$(neg$Q$a2$))",
+  "SET_OPTAB_HANDLER (ssneg_optab, $A, CODE_FOR_$(ssneg$Q$a2$))",
+  "SET_OPTAB_HANDLER (usneg_optab, $A, CODE_FOR_$(usneg$Q$a2$))",
+  "SET_OPTAB_HANDLER (abs_optab, $A, CODE_FOR_$(abs$P$a2$))",
+  "SET_OPTAB_HANDLER (absv_optab, $A, CODE_FOR_$(abs$F$a2$)),\n\
+    SET_OPTAB_HANDLER (abs_optab, $A, CODE_FOR_$(abs$F$a2$))",
+  "SET_OPTAB_HANDLER (absv_optab, $A, CODE_FOR_$(absv$I$a2$))",
+  "SET_OPTAB_HANDLER (copysign_optab, $A, CODE_FOR_$(copysign$F$a3$))",
+  "SET_OPTAB_HANDLER (signbit_optab, $A, CODE_FOR_$(signbit$F$a2$))",
+  "SET_OPTAB_HANDLER (isinf_optab, $A, CODE_FOR_$(isinf$a2$))",
+  "SET_OPTAB_HANDLER (sqrt_optab, $A, CODE_FOR_$(sqrt$a2$))",
+  "SET_OPTAB_HANDLER (floor_optab, $A, CODE_FOR_$(floor$a2$))",
+  "SET_CONVERT_OPTAB_HANDLER (lfloor_optab, $B, $A, CODE_FOR_$(lfloor$F$a$I$b2$))",
+  "SET_OPTAB_HANDLER (ceil_optab, $A, CODE_FOR_$(ceil$a2$))",
+  "SET_CONVERT_OPTAB_HANDLER (lceil_optab, $B, $A, CODE_FOR_$(lceil$F$a$I$b2$))",
+  "SET_OPTAB_HANDLER (round_optab, $A, CODE_FOR_$(round$a2$))",
+  "SET_OPTAB_HANDLER (btrunc_optab, $A, CODE_FOR_$(btrunc$a2$))",
+  "SET_OPTAB_HANDLER (nearbyint_optab, $A, CODE_FOR_$(nearbyint$a2$))",
+  "SET_OPTAB_HANDLER (rint_optab, $A, CODE_FOR_$(rint$a2$))",
+  "SET_CONVERT_OPTAB_HANDLER (lrint_optab, $B, $A, CODE_FOR_$(lrint$F$a$I$b2$))",
+  "SET_CONVERT_OPTAB_HANDLER (lround_optab, $B, $A, CODE_FOR_$(lround$F$a$I$b2$))",
+  "SET_OPTAB_HANDLER (sincos_optab, $A, CODE_FOR_$(sincos$a3$))",
+  "SET_OPTAB_HANDLER (sin_optab, $A, CODE_FOR_$(sin$a2$))",
+  "SET_OPTAB_HANDLER (asin_optab, $A, CODE_FOR_$(asin$a2$))",
+  "SET_OPTAB_HANDLER (cos_optab, $A, CODE_FOR_$(cos$a2$))",
+  "SET_OPTAB_HANDLER (acos_optab, $A, CODE_FOR_$(acos$a2$))",
+  "SET_OPTAB_HANDLER (exp_optab, $A, CODE_FOR_$(exp$a2$))",
+  "SET_OPTAB_HANDLER (exp10_optab, $A, CODE_FOR_$(exp10$a2$))",
+  "SET_OPTAB_HANDLER (exp2_optab, $A, CODE_FOR_$(exp2$a2$))",
+  "SET_OPTAB_HANDLER (expm1_optab, $A, CODE_FOR_$(expm1$a2$))",
+  "SET_OPTAB_HANDLER (ldexp_optab, $A, CODE_FOR_$(ldexp$a3$))",
+  "SET_OPTAB_HANDLER (scalb_optab, $A, CODE_FOR_$(scalb$a3$))",
+  "SET_OPTAB_HANDLER (significand_optab, $A, CODE_FOR_$(significand$a2$))",
+  "SET_OPTAB_HANDLER (logb_optab, $A, CODE_FOR_$(logb$a2$))",
+  "SET_OPTAB_HANDLER (ilogb_optab, $A, CODE_FOR_$(ilogb$a2$))",
+  "SET_OPTAB_HANDLER (log_optab, $A, CODE_FOR_$(log$a2$))",
+  "SET_OPTAB_HANDLER (log10_optab, $A, CODE_FOR_$(log10$a2$))",
+  "SET_OPTAB_HANDLER (log2_optab, $A, CODE_FOR_$(log2$a2$))",
+  "SET_OPTAB_HANDLER (log1p_optab, $A, CODE_FOR_$(log1p$a2$))",
+  "SET_OPTAB_HANDLER (tan_optab, $A, CODE_FOR_$(tan$a2$))",
+  "SET_OPTAB_HANDLER (atan_optab, $A, CODE_FOR_$(atan$a2$))",
+  "SET_OPTAB_HANDLER (strlen_optab, $A, CODE_FOR_$(strlen$a$))",
+  "SET_OPTAB_HANDLER (one_cmpl_optab, $A, CODE_FOR_$(one_cmpl$a2$))",
+  "SET_OPTAB_HANDLER (bswap_optab, $A, CODE_FOR_$(bswap$a2$))",
+  "SET_OPTAB_HANDLER (ffs_optab, $A, CODE_FOR_$(ffs$a2$))",
+  "SET_OPTAB_HANDLER (clz_optab, $A, CODE_FOR_$(clz$a2$))",
+  "SET_OPTAB_HANDLER (ctz_optab, $A, CODE_FOR_$(ctz$a2$))",
+  "SET_OPTAB_HANDLER (popcount_optab, $A, CODE_FOR_$(popcount$a2$))",
+  "SET_OPTAB_HANDLER (parity_optab, $A, CODE_FOR_$(parity$a2$))",
+  "SET_OPTAB_HANDLER (mov_optab, $A, CODE_FOR_$(mov$a$))",
+  "SET_OPTAB_HANDLER (movstrict_optab, $A, CODE_FOR_$(movstrict$a$))",
+  "SET_OPTAB_HANDLER (movmisalign_optab, $A, CODE_FOR_$(movmisalign$a$))",
+  "SET_OPTAB_HANDLER (storent_optab, $A, CODE_FOR_$(storent$a$))",
+  "SET_OPTAB_HANDLER (addcc_optab, $A, CODE_FOR_$(add$acc$))",
   "movcc_gen_code[$A] = CODE_FOR_$(mov$acc$)",
-  "optab_handler (cbranch_optab, $A)->insn_code = CODE_FOR_$(cbranch$a4$)",
-  "optab_handler (cmov_optab, $A)->insn_code = CODE_FOR_$(cmov$a6$)",
-  "optab_handler (cstore_optab, $A)->insn_code = CODE_FOR_$(cstore$a4$)",
-  "optab_handler (ctrap_optab, $A)->insn_code = CODE_FOR_$(ctrap$a4$)",
-  "optab_handler (push_optab, $A)->insn_code = CODE_FOR_$(push$a1$)",
+  "SET_OPTAB_HANDLER (cbranch_optab, $A, CODE_FOR_$(cbranch$a4$))",
+  "SET_OPTAB_HANDLER (cmov_optab, $A, CODE_FOR_$(cmov$a6$))",
+  "SET_OPTAB_HANDLER (cstore_optab, $A, CODE_FOR_$(cstore$a4$))",
+  "SET_OPTAB_HANDLER (ctrap_optab, $A, CODE_FOR_$(ctrap$a4$))",
+  "SET_OPTAB_HANDLER (push_optab, $A, CODE_FOR_$(push$a1$))",
   "reload_in_optab[$A] = CODE_FOR_$(reload_in$a$)",
   "reload_out_optab[$A] = CODE_FOR_$(reload_out$a$)",
   "movmem_optab[$A] = CODE_FOR_$(movmem$a$)",
@@ -234,45 +234,45 @@ static const char * const optabs[] =
   "sync_compare_and_swap[$A] = CODE_FOR_$(sync_compare_and_swap$I$a$)",
   "sync_lock_test_and_set[$A] = CODE_FOR_$(sync_lock_test_and_set$I$a$)",
   "sync_lock_release[$A] = CODE_FOR_$(sync_lock_release$I$a$)",
-  "optab_handler (vec_set_optab, $A)->insn_code = CODE_FOR_$(vec_set$a$)",
-  "optab_handler (vec_extract_optab, $A)->insn_code = CODE_FOR_$(vec_extract$a$)",
-  "optab_handler (vec_extract_even_optab, $A)->insn_code = CODE_FOR_$(vec_extract_even$a$)",
-  "optab_handler (vec_extract_odd_optab, $A)->insn_code = CODE_FOR_$(vec_extract_odd$a$)",
-  "optab_handler (vec_interleave_high_optab, $A)->insn_code = CODE_FOR_$(vec_interleave_high$a$)",
-  "optab_handler (vec_interleave_low_optab, $A)->insn_code = CODE_FOR_$(vec_interleave_low$a$)",
-  "optab_handler (vec_init_optab, $A)->insn_code = CODE_FOR_$(vec_init$a$)",
-  "optab_handler (vec_shl_optab, $A)->insn_code = CODE_FOR_$(vec_shl_$a$)",
-  "optab_handler (vec_shr_optab, $A)->insn_code = CODE_FOR_$(vec_shr_$a$)",
-  "optab_handler (vec_realign_load_optab, $A)->insn_code = CODE_FOR_$(vec_realign_load_$a$)",
+  "SET_OPTAB_HANDLER (vec_set_optab, $A, CODE_FOR_$(vec_set$a$))",
+  "SET_OPTAB_HANDLER (vec_extract_optab, $A, CODE_FOR_$(vec_extract$a$))",
+  "SET_OPTAB_HANDLER (vec_extract_even_optab, $A, CODE_FOR_$(vec_extract_even$a$))",
+  "SET_OPTAB_HANDLER (vec_extract_odd_optab, $A, CODE_FOR_$(vec_extract_odd$a$))",
+  "SET_OPTAB_HANDLER (vec_interleave_high_optab, $A, CODE_FOR_$(vec_interleave_high$a$))",
+  "SET_OPTAB_HANDLER (vec_interleave_low_optab, $A, CODE_FOR_$(vec_interleave_low$a$))",
+  "SET_OPTAB_HANDLER (vec_init_optab, $A, CODE_FOR_$(vec_init$a$))",
+  "SET_OPTAB_HANDLER (vec_shl_optab, $A, CODE_FOR_$(vec_shl_$a$))",
+  "SET_OPTAB_HANDLER (vec_shr_optab, $A, CODE_FOR_$(vec_shr_$a$))",
+  "SET_OPTAB_HANDLER (vec_realign_load_optab, $A, CODE_FOR_$(vec_realign_load_$a$))",
   "vcond_gen_code[$A] = CODE_FOR_$(vcond$a$)",
   "vcondu_gen_code[$A] = CODE_FOR_$(vcondu$a$)",
-  "optab_handler (ssum_widen_optab, $A)->insn_code = CODE_FOR_$(widen_ssum$I$a3$)",
-  "optab_handler (usum_widen_optab, $A)->insn_code = CODE_FOR_$(widen_usum$I$a3$)",
-  "optab_handler (udot_prod_optab, $A)->insn_code = CODE_FOR_$(udot_prod$I$a$)",
-  "optab_handler (sdot_prod_optab, $A)->insn_code = CODE_FOR_$(sdot_prod$I$a$)",
-  "optab_handler (reduc_smax_optab, $A)->insn_code = CODE_FOR_$(reduc_smax_$a$)",
-  "optab_handler (reduc_umax_optab, $A)->insn_code = CODE_FOR_$(reduc_umax_$a$)",
-  "optab_handler (reduc_smin_optab, $A)->insn_code = CODE_FOR_$(reduc_smin_$a$)",
-  "optab_handler (reduc_umin_optab, $A)->insn_code = CODE_FOR_$(reduc_umin_$a$)",
-  "optab_handler (reduc_splus_optab, $A)->insn_code = CODE_FOR_$(reduc_splus_$a$)" ,
-  "optab_handler (reduc_uplus_optab, $A)->insn_code = CODE_FOR_$(reduc_uplus_$a$)",
-  "optab_handler (vec_widen_umult_hi_optab, $A)->insn_code = CODE_FOR_$(vec_widen_umult_hi_$a$)",
-  "optab_handler (vec_widen_umult_lo_optab, $A)->insn_code = CODE_FOR_$(vec_widen_umult_lo_$a$)",
-  "optab_handler (vec_widen_smult_hi_optab, $A)->insn_code = CODE_FOR_$(vec_widen_smult_hi_$a$)",
-  "optab_handler (vec_widen_smult_lo_optab, $A)->insn_code = CODE_FOR_$(vec_widen_smult_lo_$a$)",
-  "optab_handler (vec_unpacks_hi_optab, $A)->insn_code = CODE_FOR_$(vec_unpacks_hi_$a$)",
-  "optab_handler (vec_unpacks_lo_optab, $A)->insn_code = CODE_FOR_$(vec_unpacks_lo_$a$)",
-  "optab_handler (vec_unpacku_hi_optab, $A)->insn_code = CODE_FOR_$(vec_unpacku_hi_$a$)",
-  "optab_handler (vec_unpacku_lo_optab, $A)->insn_code = CODE_FOR_$(vec_unpacku_lo_$a$)",
-  "optab_handler (vec_unpacks_float_hi_optab, $A)->insn_code = CODE_FOR_$(vec_unpacks_float_hi_$a$)",
-  "optab_handler (vec_unpacks_float_lo_optab, $A)->insn_code = CODE_FOR_$(vec_unpacks_float_lo_$a$)",
-  "optab_handler (vec_unpacku_float_hi_optab, $A)->insn_code = CODE_FOR_$(vec_unpacku_float_hi_$a$)",
-  "optab_handler (vec_unpacku_float_lo_optab, $A)->insn_code = CODE_FOR_$(vec_unpacku_float_lo_$a$)",
-  "optab_handler (vec_pack_trunc_optab, $A)->insn_code = CODE_FOR_$(vec_pack_trunc_$a$)",
-  "optab_handler (vec_pack_ssat_optab, $A)->insn_code = CODE_FOR_$(vec_pack_ssat_$a$)",
-  "optab_handler (vec_pack_usat_optab, $A)->insn_code = CODE_FOR_$(vec_pack_usat_$a$)",
-  "optab_handler (vec_pack_sfix_trunc_optab, $A)->insn_code = CODE_FOR_$(vec_pack_sfix_trunc_$a$)",
-  "optab_handler (vec_pack_ufix_trunc_optab, $A)->insn_code = CODE_FOR_$(vec_pack_ufix_trunc_$a$)"
+  "SET_OPTAB_HANDLER (ssum_widen_optab, $A, CODE_FOR_$(widen_ssum$I$a3$))",
+  "SET_OPTAB_HANDLER (usum_widen_optab, $A, CODE_FOR_$(widen_usum$I$a3$))",
+  "SET_OPTAB_HANDLER (udot_prod_optab, $A, CODE_FOR_$(udot_prod$I$a$))",
+  "SET_OPTAB_HANDLER (sdot_prod_optab, $A, CODE_FOR_$(sdot_prod$I$a$))",
+  "SET_OPTAB_HANDLER (reduc_smax_optab, $A, CODE_FOR_$(reduc_smax_$a$))",
+  "SET_OPTAB_HANDLER (reduc_umax_optab, $A, CODE_FOR_$(reduc_umax_$a$))",
+  "SET_OPTAB_HANDLER (reduc_smin_optab, $A, CODE_FOR_$(reduc_smin_$a$))",
+  "SET_OPTAB_HANDLER (reduc_umin_optab, $A, CODE_FOR_$(reduc_umin_$a$))",
+  "SET_OPTAB_HANDLER (reduc_splus_optab, $A, CODE_FOR_$(reduc_splus_$a$))" ,
+  "SET_OPTAB_HANDLER (reduc_uplus_optab, $A, CODE_FOR_$(reduc_uplus_$a$))",
+  "SET_OPTAB_HANDLER (vec_widen_umult_hi_optab, $A, CODE_FOR_$(vec_widen_umult_hi_$a$))",
+  "SET_OPTAB_HANDLER (vec_widen_umult_lo_optab, $A, CODE_FOR_$(vec_widen_umult_lo_$a$))",
+  "SET_OPTAB_HANDLER (vec_widen_smult_hi_optab, $A, CODE_FOR_$(vec_widen_smult_hi_$a$))",
+  "SET_OPTAB_HANDLER (vec_widen_smult_lo_optab, $A, CODE_FOR_$(vec_widen_smult_lo_$a$))",
+  "SET_OPTAB_HANDLER (vec_unpacks_hi_optab, $A, CODE_FOR_$(vec_unpacks_hi_$a$))",
+  "SET_OPTAB_HANDLER (vec_unpacks_lo_optab, $A, CODE_FOR_$(vec_unpacks_lo_$a$))",
+  "SET_OPTAB_HANDLER (vec_unpacku_hi_optab, $A, CODE_FOR_$(vec_unpacku_hi_$a$))",
+  "SET_OPTAB_HANDLER (vec_unpacku_lo_optab, $A, CODE_FOR_$(vec_unpacku_lo_$a$))",
+  "SET_OPTAB_HANDLER (vec_unpacks_float_hi_optab, $A, CODE_FOR_$(vec_unpacks_float_hi_$a$))",
+  "SET_OPTAB_HANDLER (vec_unpacks_float_lo_optab, $A, CODE_FOR_$(vec_unpacks_float_lo_$a$))",
+  "SET_OPTAB_HANDLER (vec_unpacku_float_hi_optab, $A, CODE_FOR_$(vec_unpacku_float_hi_$a$))",
+  "SET_OPTAB_HANDLER (vec_unpacku_float_lo_optab, $A, CODE_FOR_$(vec_unpacku_float_lo_$a$))",
+  "SET_OPTAB_HANDLER (vec_pack_trunc_optab, $A, CODE_FOR_$(vec_pack_trunc_$a$))",
+  "SET_OPTAB_HANDLER (vec_pack_ssat_optab, $A, CODE_FOR_$(vec_pack_ssat_$a$))",
+  "SET_OPTAB_HANDLER (vec_pack_usat_optab, $A, CODE_FOR_$(vec_pack_usat_$a$))",
+  "SET_OPTAB_HANDLER (vec_pack_sfix_trunc_optab, $A, CODE_FOR_$(vec_pack_sfix_trunc_$a$))",
+  "SET_OPTAB_HANDLER (vec_pack_ufix_trunc_optab, $A, CODE_FOR_$(vec_pack_ufix_trunc_$a$))"
 };
 
 static void gen_insn (rtx);
@@ -519,8 +519,9 @@ main (int argc, char **argv)
      also convert validly to an unsigned one.  */\n\
   for (i = 0; i < NUM_MACHINE_MODES; i++)\n\
     for (j = 0; j < NUM_MACHINE_MODES; j++)\n\
-      convert_optab_handler (ufixtrunc_optab, i, j)->insn_code\n\
-      = convert_optab_handler (sfixtrunc_optab, i, j)->insn_code;\n\
+      SET_CONVERT_OPTAB_HANDLER\n\
+ 	(ufixtrunc_optab, i, j,\n\
+	 CONVERT_OPTAB_HANDLER (sfixtrunc_optab, i, j));\n\
 #endif\n\
 }");
 
Index: gcc/ifcvt.c
===================================================================
--- gcc/ifcvt.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/ifcvt.c	2010-07-03 18:32:20.000000000 +0100
@@ -3156,7 +3156,7 @@ find_if_header (basic_block test_bb, int
     goto success;
 
   if (HAVE_trap
-      && optab_handler (ctrap_optab, word_mode)->insn_code != CODE_FOR_nothing
+      && OPTAB_HANDLER (ctrap_optab, word_mode) != CODE_FOR_nothing
       && find_cond_trap (test_bb, then_edge, else_edge))
     goto success;
 
Index: gcc/optabs.c
===================================================================
--- gcc/optabs.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/optabs.c	2010-07-03 18:32:20.000000000 +0100
@@ -562,10 +562,10 @@ expand_widen_pattern_expr (sepops ops, r
     optab_for_tree_code (ops->code, TREE_TYPE (oprnd0), optab_default);
   if (ops->code == WIDEN_MULT_PLUS_EXPR
       || ops->code == WIDEN_MULT_MINUS_EXPR)
-    icode = (int) optab_handler (widen_pattern_optab,
-				 TYPE_MODE (TREE_TYPE (ops->op2)))->insn_code;
+    icode = (int) OPTAB_HANDLER (widen_pattern_optab,
+				 TYPE_MODE (TREE_TYPE (ops->op2)));
   else
-    icode = (int) optab_handler (widen_pattern_optab, tmode0)->insn_code;
+    icode = (int) OPTAB_HANDLER (widen_pattern_optab, tmode0);
   gcc_assert (icode != CODE_FOR_nothing);
   xmode0 = insn_data[icode].operand[1].mode;
 
@@ -690,7 +690,7 @@ expand_widen_pattern_expr (sepops ops, r
 expand_ternary_op (enum machine_mode mode, optab ternary_optab, rtx op0,
 		   rtx op1, rtx op2, rtx target, int unsignedp)
 {
-  int icode = (int) optab_handler (ternary_optab, mode)->insn_code;
+  int icode = (int) OPTAB_HANDLER (ternary_optab, mode);
   enum machine_mode mode0 = insn_data[icode].operand[1].mode;
   enum machine_mode mode1 = insn_data[icode].operand[2].mode;
   enum machine_mode mode2 = insn_data[icode].operand[3].mode;
@@ -698,8 +698,7 @@ expand_ternary_op (enum machine_mode mod
   rtx pat;
   rtx xop0 = op0, xop1 = op1, xop2 = op2;
 
-  gcc_assert (optab_handler (ternary_optab, mode)->insn_code
-	      != CODE_FOR_nothing);
+  gcc_assert (OPTAB_HANDLER (ternary_optab, mode) != CODE_FOR_nothing);
 
   if (!target || !insn_data[icode].operand[0].predicate (target, mode))
     temp = gen_reg_rtx (mode);
@@ -819,7 +818,7 @@ expand_vec_shift_expr (sepops ops, rtx t
 	gcc_unreachable ();
     }
 
-  icode = optab_handler (shift_optab, mode)->insn_code;
+  icode = OPTAB_HANDLER (shift_optab, mode);
   gcc_assert (icode != CODE_FOR_nothing);
 
   mode1 = insn_data[icode].operand[1].mode;
@@ -1436,7 +1435,7 @@ expand_binop_directly (enum machine_mode
 		       rtx target, int unsignedp, enum optab_methods methods,
 		       rtx last)
 {
-  int icode = (int) optab_handler (binoptab, mode)->insn_code;
+  int icode = (int) OPTAB_HANDLER (binoptab, mode);
   enum machine_mode mode0 = insn_data[icode].operand[1].mode;
   enum machine_mode mode1 = insn_data[icode].operand[2].mode;
   enum machine_mode tmp_mode;
@@ -1593,7 +1592,7 @@ expand_binop (enum machine_mode mode, op
   /* If we can do it with a three-operand insn, do so.  */
 
   if (methods != OPTAB_MUST_WIDEN
-      && optab_handler (binoptab, mode)->insn_code != CODE_FOR_nothing)
+      && OPTAB_HANDLER (binoptab, mode) != CODE_FOR_nothing)
     {
       temp = expand_binop_directly (mode, binoptab, op0, op1, target,
 				    unsignedp, methods, last);
@@ -1604,9 +1603,9 @@ expand_binop (enum machine_mode mode, op
   /* If we were trying to rotate, and that didn't work, try rotating
      the other direction before falling back to shifts and bitwise-or.  */
   if (((binoptab == rotl_optab
-	&& optab_handler (rotr_optab, mode)->insn_code != CODE_FOR_nothing)
+	&& OPTAB_HANDLER (rotr_optab, mode) != CODE_FOR_nothing)
        || (binoptab == rotr_optab
-	   && optab_handler (rotl_optab, mode)->insn_code != CODE_FOR_nothing))
+	   && OPTAB_HANDLER (rotl_optab, mode) != CODE_FOR_nothing))
       && mclass == MODE_INT)
     {
       optab otheroptab = (binoptab == rotl_optab ? rotr_optab : rotl_optab);
@@ -1633,8 +1632,8 @@ expand_binop (enum machine_mode mode, op
 
   if (binoptab == smul_optab
       && GET_MODE_WIDER_MODE (mode) != VOIDmode
-      && ((optab_handler ((unsignedp ? umul_widen_optab : smul_widen_optab),
-			  GET_MODE_WIDER_MODE (mode))->insn_code)
+      && (OPTAB_HANDLER ((unsignedp ? umul_widen_optab : smul_widen_optab),
+			 GET_MODE_WIDER_MODE (mode))
 	  != CODE_FOR_nothing))
     {
       temp = expand_binop (GET_MODE_WIDER_MODE (mode),
@@ -1662,12 +1661,12 @@ expand_binop (enum machine_mode mode, op
 	 wider_mode != VOIDmode;
 	 wider_mode = GET_MODE_WIDER_MODE (wider_mode))
       {
-	if (optab_handler (binoptab, wider_mode)->insn_code != CODE_FOR_nothing
+	if (OPTAB_HANDLER (binoptab, wider_mode) != CODE_FOR_nothing
 	    || (binoptab == smul_optab
 		&& GET_MODE_WIDER_MODE (wider_mode) != VOIDmode
-		&& ((optab_handler ((unsignedp ? umul_widen_optab
-				     : smul_widen_optab),
-				     GET_MODE_WIDER_MODE (wider_mode))->insn_code)
+		&& (OPTAB_HANDLER ((unsignedp ? umul_widen_optab
+				    : smul_widen_optab),
+				   GET_MODE_WIDER_MODE (wider_mode))
 		    != CODE_FOR_nothing)))
 	  {
 	    rtx xop0 = op0, xop1 = op1;
@@ -1734,7 +1733,7 @@ expand_binop (enum machine_mode mode, op
   if ((binoptab == and_optab || binoptab == ior_optab || binoptab == xor_optab)
       && mclass == MODE_INT
       && GET_MODE_SIZE (mode) > UNITS_PER_WORD
-      && optab_handler (binoptab, word_mode)->insn_code != CODE_FOR_nothing)
+      && OPTAB_HANDLER (binoptab, word_mode) != CODE_FOR_nothing)
     {
       int i;
       rtx insns;
@@ -1778,9 +1777,9 @@ expand_binop (enum machine_mode mode, op
       && mclass == MODE_INT
       && (CONST_INT_P (op1) || optimize_insn_for_speed_p ())
       && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
-      && optab_handler (binoptab, word_mode)->insn_code != CODE_FOR_nothing
-      && optab_handler (ashl_optab, word_mode)->insn_code != CODE_FOR_nothing
-      && optab_handler (lshr_optab, word_mode)->insn_code != CODE_FOR_nothing)
+      && OPTAB_HANDLER (binoptab, word_mode) != CODE_FOR_nothing
+      && OPTAB_HANDLER (ashl_optab, word_mode) != CODE_FOR_nothing
+      && OPTAB_HANDLER (lshr_optab, word_mode) != CODE_FOR_nothing)
     {
       unsigned HOST_WIDE_INT shift_mask, double_shift_mask;
       enum machine_mode op1_mode;
@@ -1848,8 +1847,8 @@ expand_binop (enum machine_mode mode, op
       && mclass == MODE_INT
       && CONST_INT_P (op1)
       && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
-      && optab_handler (ashl_optab, word_mode)->insn_code != CODE_FOR_nothing
-      && optab_handler (lshr_optab, word_mode)->insn_code != CODE_FOR_nothing)
+      && OPTAB_HANDLER (ashl_optab, word_mode) != CODE_FOR_nothing
+      && OPTAB_HANDLER (lshr_optab, word_mode) != CODE_FOR_nothing)
     {
       rtx insns;
       rtx into_target, outof_target;
@@ -1960,7 +1959,7 @@ expand_binop (enum machine_mode mode, op
   if ((binoptab == add_optab || binoptab == sub_optab)
       && mclass == MODE_INT
       && GET_MODE_SIZE (mode) >= 2 * UNITS_PER_WORD
-      && optab_handler (binoptab, word_mode)->insn_code != CODE_FOR_nothing)
+      && OPTAB_HANDLER (binoptab, word_mode) != CODE_FOR_nothing)
     {
       unsigned int i;
       optab otheroptab = binoptab == add_optab ? sub_optab : add_optab;
@@ -2057,7 +2056,7 @@ expand_binop (enum machine_mode mode, op
 
       if (i == GET_MODE_BITSIZE (mode) / (unsigned) BITS_PER_WORD)
 	{
-	  if (optab_handler (mov_optab, mode)->insn_code != CODE_FOR_nothing
+	  if (OPTAB_HANDLER (mov_optab, mode) != CODE_FOR_nothing
 	      || ! rtx_equal_p (target, xtarget))
 	    {
 	      rtx temp = emit_move_insn (target, xtarget);
@@ -2086,13 +2085,12 @@ expand_binop (enum machine_mode mode, op
   if (binoptab == smul_optab
       && mclass == MODE_INT
       && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
-      && optab_handler (smul_optab, word_mode)->insn_code != CODE_FOR_nothing
-      && optab_handler (add_optab, word_mode)->insn_code != CODE_FOR_nothing)
+      && OPTAB_HANDLER (smul_optab, word_mode) != CODE_FOR_nothing
+      && OPTAB_HANDLER (add_optab, word_mode) != CODE_FOR_nothing)
     {
       rtx product = NULL_RTX;
 
-      if (optab_handler (umul_widen_optab, mode)->insn_code
-	  != CODE_FOR_nothing)
+      if (OPTAB_HANDLER (umul_widen_optab, mode) != CODE_FOR_nothing)
 	{
 	  product = expand_doubleword_mult (mode, op0, op1, target,
 					    true, methods);
@@ -2101,8 +2099,7 @@ expand_binop (enum machine_mode mode, op
 	}
 
       if (product == NULL_RTX
-	  && optab_handler (smul_widen_optab, mode)->insn_code
-	     != CODE_FOR_nothing)
+	  && OPTAB_HANDLER (smul_widen_optab, mode) != CODE_FOR_nothing)
 	{
 	  product = expand_doubleword_mult (mode, op0, op1, target,
 					    false, methods);
@@ -2112,7 +2109,7 @@ expand_binop (enum machine_mode mode, op
 
       if (product != NULL_RTX)
 	{
-	  if (optab_handler (mov_optab, mode)->insn_code != CODE_FOR_nothing)
+	  if (OPTAB_HANDLER (mov_optab, mode) != CODE_FOR_nothing)
 	    {
 	      temp = emit_move_insn (target ? target : product, product);
 	      set_unique_reg_note (temp,
@@ -2193,8 +2190,7 @@ expand_binop (enum machine_mode mode, op
 	   wider_mode != VOIDmode;
 	   wider_mode = GET_MODE_WIDER_MODE (wider_mode))
 	{
-	  if ((optab_handler (binoptab, wider_mode)->insn_code
-	       != CODE_FOR_nothing)
+	  if (OPTAB_HANDLER (binoptab, wider_mode) != CODE_FOR_nothing
 	      || (methods == OPTAB_LIB
 		  && optab_libfunc (binoptab, wider_mode)))
 	    {
@@ -2270,7 +2266,7 @@ sign_expand_binop (enum machine_mode mod
   /* Try widening to a signed int.  Make a fake signed optab that
      hides any signed insn for direct use.  */
   wide_soptab = *soptab;
-  optab_handler (&wide_soptab, mode)->insn_code = CODE_FOR_nothing;
+  SET_OPTAB_HANDLER (&wide_soptab, mode, CODE_FOR_nothing);
   /* We don't want to generate new hash table entries from this fake
      optab.  */
   wide_soptab.libcall_gen = NULL;
@@ -2332,9 +2328,9 @@ expand_twoval_unop (optab unoptab, rtx o
   /* Record where to go back to if we fail.  */
   last = get_last_insn ();
 
-  if (optab_handler (unoptab, mode)->insn_code != CODE_FOR_nothing)
+  if (OPTAB_HANDLER (unoptab, mode) != CODE_FOR_nothing)
     {
-      int icode = (int) optab_handler (unoptab, mode)->insn_code;
+      int icode = (int) OPTAB_HANDLER (unoptab, mode);
       enum machine_mode mode0 = insn_data[icode].operand[2].mode;
       rtx pat;
       rtx xop0 = op0;
@@ -2370,8 +2366,7 @@ expand_twoval_unop (optab unoptab, rtx o
 	   wider_mode != VOIDmode;
 	   wider_mode = GET_MODE_WIDER_MODE (wider_mode))
 	{
-	  if (optab_handler (unoptab, wider_mode)->insn_code
-	      != CODE_FOR_nothing)
+	  if (OPTAB_HANDLER (unoptab, wider_mode) != CODE_FOR_nothing)
 	    {
 	      rtx t0 = gen_reg_rtx (wider_mode);
 	      rtx t1 = gen_reg_rtx (wider_mode);
@@ -2425,9 +2420,9 @@ expand_twoval_binop (optab binoptab, rtx
   /* Record where to go back to if we fail.  */
   last = get_last_insn ();
 
-  if (optab_handler (binoptab, mode)->insn_code != CODE_FOR_nothing)
+  if (OPTAB_HANDLER (binoptab, mode) != CODE_FOR_nothing)
     {
-      int icode = (int) optab_handler (binoptab, mode)->insn_code;
+      int icode = (int) OPTAB_HANDLER (binoptab, mode);
       enum machine_mode mode0 = insn_data[icode].operand[1].mode;
       enum machine_mode mode1 = insn_data[icode].operand[2].mode;
       rtx pat;
@@ -2487,8 +2482,7 @@ expand_twoval_binop (optab binoptab, rtx
 	   wider_mode != VOIDmode;
 	   wider_mode = GET_MODE_WIDER_MODE (wider_mode))
 	{
-	  if (optab_handler (binoptab, wider_mode)->insn_code
-	      != CODE_FOR_nothing)
+	  if (OPTAB_HANDLER (binoptab, wider_mode) != CODE_FOR_nothing)
 	    {
 	      rtx t0 = gen_reg_rtx (wider_mode);
 	      rtx t1 = gen_reg_rtx (wider_mode);
@@ -2589,8 +2583,7 @@ widen_clz (enum machine_mode mode, rtx o
 	   wider_mode != VOIDmode;
 	   wider_mode = GET_MODE_WIDER_MODE (wider_mode))
 	{
-	  if (optab_handler (clz_optab, wider_mode)->insn_code
-	      != CODE_FOR_nothing)
+	  if (OPTAB_HANDLER (clz_optab, wider_mode) != CODE_FOR_nothing)
 	    {
 	      rtx xop0, temp, last;
 
@@ -2702,7 +2695,7 @@ widen_bswap (enum machine_mode mode, rtx
   for (wider_mode = GET_MODE_WIDER_MODE (mode);
        wider_mode != VOIDmode;
        wider_mode = GET_MODE_WIDER_MODE (wider_mode))
-    if (optab_handler (bswap_optab, wider_mode)->insn_code != CODE_FOR_nothing)
+    if (OPTAB_HANDLER (bswap_optab, wider_mode) != CODE_FOR_nothing)
       goto found;
   return NULL_RTX;
 
@@ -2764,8 +2757,7 @@ expand_parity (enum machine_mode mode, r
       for (wider_mode = mode; wider_mode != VOIDmode;
 	   wider_mode = GET_MODE_WIDER_MODE (wider_mode))
 	{
-	  if (optab_handler (popcount_optab, wider_mode)->insn_code
-	      != CODE_FOR_nothing)
+	  if (OPTAB_HANDLER (popcount_optab, wider_mode) != CODE_FOR_nothing)
 	    {
 	      rtx xop0, temp, last;
 
@@ -2806,7 +2798,7 @@ expand_ctz (enum machine_mode mode, rtx
 {
   rtx seq, temp;
 
-  if (optab_handler (clz_optab, mode)->insn_code == CODE_FOR_nothing)
+  if (OPTAB_HANDLER (clz_optab, mode) == CODE_FOR_nothing)
     return 0;
 
   start_sequence ();
@@ -2849,7 +2841,7 @@ expand_ffs (enum machine_mode mode, rtx
   bool defined_at_zero = false;
   rtx temp, seq;
 
-  if (optab_handler (ctz_optab, mode)->insn_code != CODE_FOR_nothing)
+  if (OPTAB_HANDLER (ctz_optab, mode) != CODE_FOR_nothing)
     {
       start_sequence ();
 
@@ -2859,7 +2851,7 @@ expand_ffs (enum machine_mode mode, rtx
 
       defined_at_zero = (CTZ_DEFINED_VALUE_AT_ZERO (mode, val) == 2);
     }
-  else if (optab_handler (clz_optab, mode)->insn_code != CODE_FOR_nothing)
+  else if (OPTAB_HANDLER (clz_optab, mode) != CODE_FOR_nothing)
     {
       start_sequence ();
       temp = expand_ctz (mode, op0, 0);
@@ -3037,9 +3029,9 @@ expand_absneg_bit (enum rtx_code code, e
 expand_unop_direct (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
 	     int unsignedp)
 {
-  if (optab_handler (unoptab, mode)->insn_code != CODE_FOR_nothing)
+  if (OPTAB_HANDLER (unoptab, mode) != CODE_FOR_nothing)
     {
-      int icode = (int) optab_handler (unoptab, mode)->insn_code;
+      int icode = (int) OPTAB_HANDLER (unoptab, mode);
       enum machine_mode mode0 = insn_data[icode].operand[1].mode;
       rtx xop0 = op0;
       rtx last = get_last_insn ();
@@ -3116,7 +3108,7 @@ expand_unop (enum machine_mode mode, opt
 	return temp;
 
       if (GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
-	  && optab_handler (unoptab, word_mode)->insn_code != CODE_FOR_nothing)
+	  && OPTAB_HANDLER (unoptab, word_mode) != CODE_FOR_nothing)
 	{
 	  temp = expand_doubleword_clz (mode, op0, target);
 	  if (temp)
@@ -3134,7 +3126,7 @@ expand_unop (enum machine_mode mode, opt
 	return temp;
 
       if (GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
-	  && optab_handler (unoptab, word_mode)->insn_code != CODE_FOR_nothing)
+	  && OPTAB_HANDLER (unoptab, word_mode) != CODE_FOR_nothing)
 	{
 	  temp = expand_doubleword_bswap (mode, op0, target);
 	  if (temp)
@@ -3149,7 +3141,7 @@ expand_unop (enum machine_mode mode, opt
 	 wider_mode != VOIDmode;
 	 wider_mode = GET_MODE_WIDER_MODE (wider_mode))
       {
-	if (optab_handler (unoptab, wider_mode)->insn_code != CODE_FOR_nothing)
+	if (OPTAB_HANDLER (unoptab, wider_mode) != CODE_FOR_nothing)
 	  {
 	    rtx xop0 = op0;
 	    rtx last = get_last_insn ();
@@ -3189,7 +3181,7 @@ expand_unop (enum machine_mode mode, opt
   if (unoptab == one_cmpl_optab
       && mclass == MODE_INT
       && GET_MODE_SIZE (mode) > UNITS_PER_WORD
-      && optab_handler (unoptab, word_mode)->insn_code != CODE_FOR_nothing)
+      && OPTAB_HANDLER (unoptab, word_mode) != CODE_FOR_nothing)
     {
       int i;
       rtx insns;
@@ -3311,8 +3303,7 @@ expand_unop (enum machine_mode mode, opt
 	   wider_mode != VOIDmode;
 	   wider_mode = GET_MODE_WIDER_MODE (wider_mode))
 	{
-	  if ((optab_handler (unoptab, wider_mode)->insn_code
-	       != CODE_FOR_nothing)
+	  if (OPTAB_HANDLER (unoptab, wider_mode) != CODE_FOR_nothing
 	      || optab_libfunc (unoptab, wider_mode))
 	    {
 	      rtx xop0 = op0;
@@ -3405,7 +3396,7 @@ expand_abs_nojump (enum machine_mode mod
     }
 
   /* If we have a MAX insn, we can do this as MAX (x, -x).  */
-  if (optab_handler (smax_optab, mode)->insn_code != CODE_FOR_nothing
+  if (OPTAB_HANDLER (smax_optab, mode) != CODE_FOR_nothing
       && !HONOR_SIGNED_ZEROS (mode))
     {
       rtx last = get_last_insn ();
@@ -3508,7 +3499,7 @@ expand_one_cmpl_abs_nojump (enum machine
     return NULL_RTX;
 
   /* If we have a MAX insn, we can do this as MAX (x, ~x).  */
-  if (optab_handler (smax_optab, mode)->insn_code != CODE_FOR_nothing)
+  if (OPTAB_HANDLER (smax_optab, mode) != CODE_FOR_nothing)
     {
       rtx last = get_last_insn ();
 
@@ -3562,7 +3553,7 @@ expand_copysign_absneg (enum machine_mod
 
   /* Check if the back end provides an insn that handles signbit for the
      argument's mode. */
-  icode = (int) signbit_optab->handlers [(int) mode].insn_code;
+  icode = (int) OPTAB_HANDLER (signbit_optab, mode);
   if (icode != CODE_FOR_nothing)
     {
       imode = insn_data[icode].operand[0].mode;
@@ -3762,8 +3753,8 @@ expand_copysign (rtx op0, rtx op1, rtx t
 
   if (fmt->signbit_ro >= 0
       && (GET_CODE (op0) == CONST_DOUBLE
-	  || (optab_handler (neg_optab, mode)->insn_code != CODE_FOR_nothing
-	      && optab_handler (abs_optab, mode)->insn_code != CODE_FOR_nothing)))
+	  || (OPTAB_HANDLER (neg_optab, mode) != CODE_FOR_nothing
+	      && OPTAB_HANDLER (abs_optab, mode) != CODE_FOR_nothing)))
     {
       temp = expand_copysign_absneg (mode, op0, op1, target,
 				     fmt->signbit_ro, op0_is_abs);
@@ -3975,8 +3966,7 @@ emit_libcall_block (rtx insns, rtx targe
     }
 
   last = emit_move_insn (target, result);
-  if (optab_handler (mov_optab, GET_MODE (target))->insn_code
-      != CODE_FOR_nothing)
+  if (OPTAB_HANDLER (mov_optab, GET_MODE (target)) != CODE_FOR_nothing)
     set_unique_reg_note (last, REG_EQUAL, copy_rtx (equiv));
 
   if (final_dest != target)
@@ -4002,15 +3992,15 @@ can_compare_p (enum rtx_code code, enum
       int icode;
 
       if (purpose == ccp_jump
-          && (icode = optab_handler (cbranch_optab, mode)->insn_code) != CODE_FOR_nothing
+          && (icode = OPTAB_HANDLER (cbranch_optab, mode)) != CODE_FOR_nothing
           && insn_data[icode].operand[0].predicate (test, mode))
         return 1;
       if (purpose == ccp_store_flag
-          && (icode = optab_handler (cstore_optab, mode)->insn_code) != CODE_FOR_nothing
+          && (icode = OPTAB_HANDLER (cstore_optab, mode)) != CODE_FOR_nothing
           && insn_data[icode].operand[1].predicate (test, mode))
         return 1;
       if (purpose == ccp_cmov
-	  && optab_handler (cmov_optab, mode)->insn_code != CODE_FOR_nothing)
+	  && OPTAB_HANDLER (cmov_optab, mode) != CODE_FOR_nothing)
 	return 1;
 
       mode = GET_MODE_WIDER_MODE (mode);
@@ -4166,7 +4156,7 @@ prepare_cmp_insn (rtx x, rtx y, enum rtx
   do
    {
       enum insn_code icode;
-      icode = optab_handler (cbranch_optab, cmp_mode)->insn_code;
+      icode = OPTAB_HANDLER (cbranch_optab, cmp_mode);
       if (icode != CODE_FOR_nothing
 	  && insn_data[icode].operand[0].predicate (test, VOIDmode))
 	{
@@ -4285,7 +4275,7 @@ emit_cmp_and_jump_insn_1 (rtx test, enum
 
   mclass = GET_MODE_CLASS (mode);
   optab_mode = (mclass == MODE_CC) ? CCmode : mode;
-  icode = optab_handler (cbranch_optab, optab_mode)->insn_code;
+  icode = OPTAB_HANDLER (cbranch_optab, optab_mode);
 
   gcc_assert (icode != CODE_FOR_nothing);
   gcc_assert (insn_data[icode].operand[0].predicate (test, VOIDmode));
@@ -4684,7 +4674,7 @@ emit_conditional_add (rtx target, enum r
   if (mode == VOIDmode)
     mode = GET_MODE (op2);
 
-  icode = optab_handler (addcc_optab, mode)->insn_code;
+  icode = OPTAB_HANDLER (addcc_optab, mode);
 
   if (icode == CODE_FOR_nothing)
     return 0;
@@ -4755,7 +4745,7 @@ emit_conditional_add (rtx target, enum r
 rtx
 gen_add2_insn (rtx x, rtx y)
 {
-  int icode = (int) optab_handler (add_optab, GET_MODE (x))->insn_code;
+  int icode = (int) OPTAB_HANDLER (add_optab, GET_MODE (x));
 
   gcc_assert (insn_data[icode].operand[0].predicate
 	      (x, insn_data[icode].operand[0].mode));
@@ -4773,7 +4763,7 @@ gen_add2_insn (rtx x, rtx y)
 rtx
 gen_add3_insn (rtx r0, rtx r1, rtx c)
 {
-  int icode = (int) optab_handler (add_optab, GET_MODE (r0))->insn_code;
+  int icode = (int) OPTAB_HANDLER (add_optab, GET_MODE (r0));
 
   if (icode == CODE_FOR_nothing
       || !(insn_data[icode].operand[0].predicate
@@ -4794,7 +4784,7 @@ have_add2_insn (rtx x, rtx y)
 
   gcc_assert (GET_MODE (x) != VOIDmode);
 
-  icode = (int) optab_handler (add_optab, GET_MODE (x))->insn_code;
+  icode = (int) OPTAB_HANDLER (add_optab, GET_MODE (x));
 
   if (icode == CODE_FOR_nothing)
     return 0;
@@ -4815,7 +4805,7 @@ have_add2_insn (rtx x, rtx y)
 rtx
 gen_sub2_insn (rtx x, rtx y)
 {
-  int icode = (int) optab_handler (sub_optab, GET_MODE (x))->insn_code;
+  int icode = (int) OPTAB_HANDLER (sub_optab, GET_MODE (x));
 
   gcc_assert (insn_data[icode].operand[0].predicate
 	      (x, insn_data[icode].operand[0].mode));
@@ -4833,7 +4823,7 @@ gen_sub2_insn (rtx x, rtx y)
 rtx
 gen_sub3_insn (rtx r0, rtx r1, rtx c)
 {
-  int icode = (int) optab_handler (sub_optab, GET_MODE (r0))->insn_code;
+  int icode = (int) OPTAB_HANDLER (sub_optab, GET_MODE (r0));
 
   if (icode == CODE_FOR_nothing
       || !(insn_data[icode].operand[0].predicate
@@ -4854,7 +4844,7 @@ have_sub2_insn (rtx x, rtx y)
 
   gcc_assert (GET_MODE (x) != VOIDmode);
 
-  icode = (int) optab_handler (sub_optab, GET_MODE (x))->insn_code;
+  icode = (int) OPTAB_HANDLER (sub_optab, GET_MODE (x));
 
   if (icode == CODE_FOR_nothing)
     return 0;
@@ -4900,7 +4890,7 @@ can_extend_p (enum machine_mode to_mode,
 #endif
 
   tab = unsignedp ? zext_optab : sext_optab;
-  return convert_optab_handler (tab, to_mode, from_mode)->insn_code;
+  return CONVERT_OPTAB_HANDLER (tab, to_mode, from_mode);
 }
 
 /* Generate the body of an insn to extend Y (with mode MFROM)
@@ -4931,7 +4921,7 @@ can_fix_p (enum machine_mode fixmode, en
   enum insn_code icode;
 
   tab = unsignedp ? ufixtrunc_optab : sfixtrunc_optab;
-  icode = convert_optab_handler (tab, fixmode, fltmode)->insn_code;
+  icode = CONVERT_OPTAB_HANDLER (tab, fixmode, fltmode);
   if (icode != CODE_FOR_nothing)
     {
       *truncp_ptr = 0;
@@ -4942,9 +4932,9 @@ can_fix_p (enum machine_mode fixmode, en
      for this to work. We need to rework the fix* and ftrunc* patterns
      and documentation.  */
   tab = unsignedp ? ufix_optab : sfix_optab;
-  icode = convert_optab_handler (tab, fixmode, fltmode)->insn_code;
+  icode = CONVERT_OPTAB_HANDLER (tab, fixmode, fltmode);
   if (icode != CODE_FOR_nothing
-      && optab_handler (ftrunc_optab, fltmode)->insn_code != CODE_FOR_nothing)
+      && OPTAB_HANDLER (ftrunc_optab, fltmode) != CODE_FOR_nothing)
     {
       *truncp_ptr = 1;
       return icode;
@@ -4961,7 +4951,7 @@ can_float_p (enum machine_mode fltmode,
   convert_optab tab;
 
   tab = unsignedp ? ufloat_optab : sfloat_optab;
-  return convert_optab_handler (tab, fltmode, fixmode)->insn_code;
+  return CONVERT_OPTAB_HANDLER (tab, fltmode, fixmode);
 }
 
 /* Generate code to convert FROM to floating point
@@ -5295,8 +5285,7 @@ expand_fix (rtx to, rtx from, int unsign
 
 	  emit_label (lab2);
 
-	  if (optab_handler (mov_optab, GET_MODE (to))->insn_code
-	      != CODE_FOR_nothing)
+	  if (OPTAB_HANDLER (mov_optab, GET_MODE (to)) != CODE_FOR_nothing)
 	    {
 	      /* Make a place for a REG_NOTE and add it.  */
 	      insn = emit_move_insn (to, to);
@@ -5383,7 +5372,7 @@ expand_fixed_convert (rtx to, rtx from,
       tab = satp ? satfract_optab : fract_optab;
       this_code = satp ? SAT_FRACT : FRACT_CONVERT;
     }
-  code = tab->handlers[to_mode][from_mode].insn_code;
+  code = CONVERT_OPTAB_HANDLER (tab, to_mode, from_mode);
   if (code != CODE_FOR_nothing)
     {
       emit_unop_insn (code, to, from, this_code);
@@ -5424,7 +5413,7 @@ expand_sfix_optab (rtx to, rtx from, con
     for (imode = GET_MODE (to); imode != VOIDmode;
 	 imode = GET_MODE_WIDER_MODE (imode))
       {
-	icode = convert_optab_handler (tab, imode, fmode)->insn_code;
+	icode = CONVERT_OPTAB_HANDLER (tab, imode, fmode);
 	if (icode != CODE_FOR_nothing)
 	  {
 	    rtx last = get_last_insn ();
@@ -5454,7 +5443,7 @@ expand_sfix_optab (rtx to, rtx from, con
 have_insn_for (enum rtx_code code, enum machine_mode mode)
 {
   return (code_to_optab[(int) code] != 0
-	  && (optab_handler (code_to_optab[(int) code], mode)->insn_code
+	  && (OPTAB_HANDLER (code_to_optab[(int) code], mode)
 	      != CODE_FOR_nothing));
 }
 
@@ -5472,7 +5461,7 @@ init_insn_codes (void)
 
       op = &optab_table[i];
       for (j = 0; j < NUM_MACHINE_MODES; j++)
-	optab_handler (op, j)->insn_code = CODE_FOR_nothing;
+	SET_OPTAB_HANDLER (op, j, CODE_FOR_nothing);
     }
   for (i = 0; i < (unsigned int) COI_MAX; i++)
     {
@@ -5482,7 +5471,7 @@ init_insn_codes (void)
       op = &convert_optab_table[i];
       for (j = 0; j < NUM_MACHINE_MODES; j++)
 	for (k = 0; k < NUM_MACHINE_MODES; k++)
-	  convert_optab_handler (op, j, k)->insn_code = CODE_FOR_nothing;
+	  SET_CONVERT_OPTAB_HANDLER (op, j, k, CODE_FOR_nothing);
     }
 }
 
@@ -6211,7 +6200,8 @@ init_optabs (void)
     }
 
 #if GCC_VERSION >= 4000 && HAVE_DESIGNATED_INITIALIZERS
-  /* We statically initialize the insn_codes with CODE_FOR_nothing.  */
+  /* We statically initialize the insn_codes with the equivalent of
+     CODE_FOR_nothing.  */
   if (reinit)
     init_insn_codes ();
 #else
@@ -6763,7 +6753,7 @@ gen_cond_trap (enum rtx_code code, rtx o
   if (mode == VOIDmode)
     return 0;
 
-  icode = optab_handler (ctrap_optab, mode)->insn_code;
+  icode = OPTAB_HANDLER (ctrap_optab, mode);
   if (icode == CODE_FOR_nothing)
     return 0;
 
Index: gcc/reload.c
===================================================================
--- gcc/reload.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/reload.c	2010-07-03 18:32:20.000000000 +0100
@@ -5834,8 +5834,7 @@ #define REG_OK_FOR_CONTEXT(CONTEXT, REGN
 	      rtx equiv = (MEM_P (XEXP (x, 0))
 			   ? XEXP (x, 0)
 			   : reg_equiv_mem[regno]);
-	      int icode
-		= (int) optab_handler (add_optab, GET_MODE (x))->insn_code;
+	      int icode = (int) OPTAB_HANDLER (add_optab, GET_MODE (x));
 	      if (insn && NONJUMP_INSN_P (insn) && equiv
 		  && memory_operand (equiv, GET_MODE (equiv))
 #ifdef HAVE_cc0
Index: gcc/reload1.c
===================================================================
--- gcc/reload1.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/reload1.c	2010-07-03 18:32:20.000000000 +0100
@@ -8680,7 +8680,7 @@ gen_reload (rtx out, rtx in, int opnum,
 	 DEFINE_PEEPHOLE should be specified that recognizes the sequence
 	 we emit below.  */
 
-      code = (int) optab_handler (add_optab, GET_MODE (out))->insn_code;
+      code = (int) OPTAB_HANDLER (add_optab, GET_MODE (out));
 
       if (CONSTANT_P (op1) || MEM_P (op1) || GET_CODE (op1) == SUBREG
 	  || (REG_P (op1)
Index: gcc/stmt.c
===================================================================
--- gcc/stmt.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/stmt.c	2010-07-03 18:32:20.000000000 +0100
@@ -2071,7 +2071,7 @@ #define MAX_CASE_BIT_TESTS  3
 
 /* By default, enable case bit tests on targets with ashlsi3.  */
 #ifndef CASE_USE_BIT_TESTS
-#define CASE_USE_BIT_TESTS  (optab_handler (ashl_optab, word_mode)->insn_code \
+#define CASE_USE_BIT_TESTS  (OPTAB_HANDLER (ashl_optab, word_mode) \
 			     != CODE_FOR_nothing)
 #endif
 
Index: gcc/targhooks.c
===================================================================
--- gcc/targhooks.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/targhooks.c	2010-07-03 18:32:20.000000000 +0100
@@ -971,7 +971,7 @@ default_builtin_support_vector_misalignm
 					     bool is_packed
 					     ATTRIBUTE_UNUSED)
 {
-  if (optab_handler (movmisalign_optab, mode)->insn_code != CODE_FOR_nothing)
+  if (OPTAB_HANDLER (movmisalign_optab, mode) != CODE_FOR_nothing)
     return true;
   return false;
 }
Index: gcc/tree-ssa-loop-prefetch.c
===================================================================
--- gcc/tree-ssa-loop-prefetch.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/tree-ssa-loop-prefetch.c	2010-07-03 18:32:20.000000000 +0100
@@ -1136,7 +1136,7 @@ nontemporal_store_p (struct mem_ref *ref
   if (mode == BLKmode)
     return false;
 
-  code = optab_handler (storent_optab, mode)->insn_code;
+  code = OPTAB_HANDLER (storent_optab, mode);
   return code != CODE_FOR_nothing;
 }
 
Index: gcc/tree-ssa-math-opts.c
===================================================================
--- gcc/tree-ssa-math-opts.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/tree-ssa-math-opts.c	2010-07-03 18:32:20.000000000 +0100
@@ -1113,11 +1113,9 @@ execute_optimize_bswap (void)
     return 0;
 
   bswap32_p = (built_in_decls[BUILT_IN_BSWAP32]
-	       && optab_handler (bswap_optab, SImode)->insn_code !=
-	       CODE_FOR_nothing);
+	       && OPTAB_HANDLER (bswap_optab, SImode) != CODE_FOR_nothing);
   bswap64_p = (built_in_decls[BUILT_IN_BSWAP64]
-	       && (optab_handler (bswap_optab, DImode)->insn_code !=
-		   CODE_FOR_nothing
+	       && (OPTAB_HANDLER (bswap_optab, DImode) != CODE_FOR_nothing
 		   || (bswap32_p && word_mode == SImode)));
 
   if (!bswap32_p && !bswap64_p)
@@ -1323,18 +1321,18 @@ convert_mult_to_widen (gimple stmt)
      likely to pessimize code.  */
   if ((rhs1_stmt == NULL || TYPE_UNSIGNED (type1))
       && (rhs2_stmt == NULL || TYPE_UNSIGNED (type2))
-      && (optab_handler (umul_widen_optab, TYPE_MODE (type))
-	  ->insn_code == CODE_FOR_nothing))
+      && (OPTAB_HANDLER (umul_widen_optab, TYPE_MODE (type))
+	  == CODE_FOR_nothing))
     return false;
   else if ((rhs1_stmt == NULL || !TYPE_UNSIGNED (type1))
 	   && (rhs2_stmt == NULL || !TYPE_UNSIGNED (type2))
-	   && (optab_handler (smul_widen_optab, TYPE_MODE (type))
-	       ->insn_code == CODE_FOR_nothing))
+	   && (OPTAB_HANDLER (smul_widen_optab, TYPE_MODE (type))
+	       == CODE_FOR_nothing))
     return false;
   else if (rhs1_stmt != NULL && rhs2_stmt != NULL
 	   && (TYPE_UNSIGNED (type1) != TYPE_UNSIGNED (type2))
-	   && (optab_handler (usmul_widen_optab, TYPE_MODE (type))
-	       ->insn_code == CODE_FOR_nothing))
+	   && (OPTAB_HANDLER (usmul_widen_optab, TYPE_MODE (type))
+	       == CODE_FOR_nothing))
     return false;
 
   if ((rhs1_stmt == NULL && !int_fits_type_p (rhs1, type2))
@@ -1385,8 +1383,7 @@ convert_plusminus_to_widen (gimple_stmt_
      accumulate in this mode/signedness combination, otherwise
      this transformation is likely to pessimize code.  */
   this_optab = optab_for_tree_code (wmult_code, type, optab_default);
-  if (optab_handler (this_optab, TYPE_MODE (type))->insn_code
-      == CODE_FOR_nothing)
+  if (OPTAB_HANDLER (this_optab, TYPE_MODE (type)) == CODE_FOR_nothing)
     return false;
 
   rhs1 = gimple_assign_rhs1 (stmt);
Index: gcc/tree-vect-data-refs.c
===================================================================
--- gcc/tree-vect-data-refs.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/tree-vect-data-refs.c	2010-07-03 18:32:20.000000000 +0100
@@ -2870,10 +2870,8 @@ vect_strided_store_supported (tree vecty
       return false;
     }
 
-  if (optab_handler (interleave_high_optab, mode)->insn_code
-      == CODE_FOR_nothing
-      || optab_handler (interleave_low_optab, mode)->insn_code
-      == CODE_FOR_nothing)
+  if (OPTAB_HANDLER (interleave_high_optab, mode) == CODE_FOR_nothing
+      || OPTAB_HANDLER (interleave_low_optab, mode) == CODE_FOR_nothing)
     {
       if (vect_print_dump_info (REPORT_DETAILS))
 	fprintf (vect_dump, "interleave op not supported by target.");
@@ -3279,7 +3277,7 @@ vect_strided_load_supported (tree vectyp
       return false;
     }
 
-  if (optab_handler (perm_even_optab, mode)->insn_code == CODE_FOR_nothing)
+  if (OPTAB_HANDLER (perm_even_optab, mode) == CODE_FOR_nothing)
     {
       if (vect_print_dump_info (REPORT_DETAILS))
 	fprintf (vect_dump, "perm_even op not supported by target.");
@@ -3295,7 +3293,7 @@ vect_strided_load_supported (tree vectyp
       return false;
     }
 
-  if (optab_handler (perm_odd_optab, mode)->insn_code == CODE_FOR_nothing)
+  if (OPTAB_HANDLER (perm_odd_optab, mode) == CODE_FOR_nothing)
     {
       if (vect_print_dump_info (REPORT_DETAILS))
 	fprintf (vect_dump, "perm_odd op not supported by target.");
@@ -3652,8 +3650,7 @@ vect_supportable_dr_alignment (struct da
       bool is_packed = false;
       tree type = (TREE_TYPE (DR_REF (dr)));
 
-      if (optab_handler (vec_realign_load_optab, mode)->insn_code !=
-						   	     CODE_FOR_nothing
+      if (OPTAB_HANDLER (vec_realign_load_optab, mode) != CODE_FOR_nothing
 	  && (!targetm.vectorize.builtin_mask_for_load
 	      || targetm.vectorize.builtin_mask_for_load ()))
 	{
Index: gcc/tree-vect-generic.c
===================================================================
--- gcc/tree-vect-generic.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/tree-vect-generic.c	2010-07-03 18:32:20.000000000 +0100
@@ -368,7 +368,7 @@ type_for_widest_vector_mode (enum machin
   for (; mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode))
     if (GET_MODE_INNER (mode) == inner_mode
         && GET_MODE_NUNITS (mode) > best_nunits
-	&& optab_handler (op, mode)->insn_code != CODE_FOR_nothing)
+	&& OPTAB_HANDLER (op, mode) != CODE_FOR_nothing)
       best_mode = mode, best_nunits = GET_MODE_NUNITS (mode);
 
   if (best_mode == VOIDmode)
@@ -443,8 +443,7 @@ expand_vector_operations_1 (gimple_stmt_
 	     have a vector/vector shift */
 	  op = optab_for_tree_code (code, type, optab_scalar);
 	  if (!op
-	      || (op->handlers[(int) TYPE_MODE (type)].insn_code
-		  == CODE_FOR_nothing))
+	      || OPTAB_HANDLER (op, TYPE_MODE (type)) == CODE_FOR_nothing)
 	    op = optab_for_tree_code (code, type, optab_vector);
 	}
     }
@@ -498,7 +497,7 @@ expand_vector_operations_1 (gimple_stmt_
 	   || GET_MODE_CLASS (compute_mode) == MODE_VECTOR_ACCUM
 	   || GET_MODE_CLASS (compute_mode) == MODE_VECTOR_UACCUM)
           && op != NULL
-	  && optab_handler (op, compute_mode)->insn_code != CODE_FOR_nothing)
+	  && OPTAB_HANDLER (op, compute_mode) != CODE_FOR_nothing)
 	return;
       else
 	/* There is no operation in hardware, so fall back to scalars.  */
Index: gcc/tree-vect-loop.c
===================================================================
--- gcc/tree-vect-loop.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/tree-vect-loop.c	2010-07-03 18:32:20.000000000 +0100
@@ -132,7 +132,7 @@ Software Foundation; either version 3, o
         Since we only vectorize operations which vector form can be
    expressed using existing tree codes, to verify that an operation is
    supported, the vectorizer checks the relevant optab at the relevant
-   machine_mode (e.g, optab_handler (add_optab, V8HImode)->insn_code). If
+   machine_mode (e.g, OPTAB_HANDLER (add_optab, V8HImode)). If
    the value found is CODE_FOR_nothing, then there's no target support, and
    we can't vectorize the stmt.
 
@@ -2421,8 +2421,8 @@ vect_model_reduction_cost (stmt_vec_info
 
 	  /* We have a whole vector shift available.  */
 	  if (VECTOR_MODE_P (mode)
-	      && optab_handler (optab, mode)->insn_code != CODE_FOR_nothing
-	      && optab_handler (vec_shr_optab, mode)->insn_code != CODE_FOR_nothing)
+	      && OPTAB_HANDLER (optab, mode) != CODE_FOR_nothing
+	      && OPTAB_HANDLER (vec_shr_optab, mode) != CODE_FOR_nothing)
 	    /* Final reduction via vector shifts and the reduction operator. Also
 	       requires scalar extract.  */
 	    outer_cost += ((exact_log2(nelements) * 2) 
@@ -3264,7 +3264,7 @@ vect_create_epilog_for_reduction (VEC (t
       int vec_size_in_bits = tree_low_cst (TYPE_SIZE (vectype), 1);
       tree vec_temp;
 
-      if (optab_handler (vec_shr_optab, mode)->insn_code != CODE_FOR_nothing)
+      if (OPTAB_HANDLER (vec_shr_optab, mode) != CODE_FOR_nothing)
         shift_code = VEC_RSHIFT_EXPR;
       else
         have_whole_vector_shift = false;
@@ -3280,7 +3280,7 @@ vect_create_epilog_for_reduction (VEC (t
       else
         {
           optab optab = optab_for_tree_code (code, vectype, optab_default);
-          if (optab_handler (optab, mode)->insn_code == CODE_FOR_nothing)
+          if (OPTAB_HANDLER (optab, mode) == CODE_FOR_nothing)
             have_whole_vector_shift = false;
         }
 
@@ -3939,7 +3939,7 @@ vectorizable_reduction (gimple stmt, gim
           return false;
         }
 
-      if (optab_handler (optab, vec_mode)->insn_code == CODE_FOR_nothing)
+      if (OPTAB_HANDLER (optab, vec_mode) == CODE_FOR_nothing)
         {
           if (vect_print_dump_info (REPORT_DETAILS))
             fprintf (vect_dump, "op not supported by target.");
@@ -3987,11 +3987,12 @@ vectorizable_reduction (gimple stmt, gim
           2. The type (mode) we use to check available target support
              for the vector operation to be created in the *epilog*, is
              determined by the type of the reduction variable (in the example
-             above we'd check this: plus_optab[vect_int_mode]).
+             above we'd check this: OPTAB_HANDLER (plus_optab, vect_int_mode])).
              However the type (mode) we use to check available target support
              for the vector operation to be created *inside the loop*, is
              determined by the type of the other arguments to STMT (in the
-             example we'd check this: widen_sum_optab[vect_short_mode]).
+             example we'd check this: OPTAB_HANDLER (widen_sum_optab,
+	     vect_short_mode)).
 
           This is contrary to "regular" reductions, in which the types of all
           the arguments are the same as the type of the reduction variable.
@@ -4044,8 +4045,7 @@ vectorizable_reduction (gimple stmt, gim
         }
 
       if (reduc_optab
-          && optab_handler (reduc_optab, vec_mode)->insn_code
-              == CODE_FOR_nothing)
+          && OPTAB_HANDLER (reduc_optab, vec_mode) == CODE_FOR_nothing)
         {
           if (vect_print_dump_info (REPORT_DETAILS))
             fprintf (vect_dump, "reduc op not supported by target.");
Index: gcc/tree-vect-patterns.c
===================================================================
--- gcc/tree-vect-patterns.c	2010-07-03 18:20:10.000000000 +0100
+++ gcc/tree-vect-patterns.c	2010-07-03 18:32:20.000000000 +0100
@@ -714,8 +714,7 @@ vect_pattern_recog_1 (
       optab = optab_for_tree_code (code, type_in, optab_default);
       vec_mode = TYPE_MODE (type_in);
       if (!optab
-          || (icode = optab_handler (optab, vec_mode)->insn_code) ==
-              CODE_FOR_nothing
+          || (icode = OPTAB_HANDLER (optab, vec_mode)) == CODE_FOR_nothing
           || (insn_data[icode].operand[0].mode != TYPE_MODE (type_out)))
 	return;
     }
Index: gcc/tree-vect-slp.c
===================================================================
--- gcc/tree-vect-slp.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/tree-vect-slp.c	2010-07-03 18:32:20.000000000 +0100
@@ -421,8 +421,7 @@ vect_build_slp_tree (loop_vec_info loop_
 					   optab_vector);
 
 	      if (!optab
-		  || (optab->handlers[(int) vec_mode].insn_code
-		      == CODE_FOR_nothing))
+		  || OPTAB_HANDLER (optab, vec_mode) == CODE_FOR_nothing)
 		{
 		  /* No vector/vector shift, try for a vector/scalar shift.  */
 		  optab = optab_for_tree_code (rhs_code, vectype,
@@ -434,7 +433,7 @@ vect_build_slp_tree (loop_vec_info loop_
 			fprintf (vect_dump, "Build SLP failed: no optab.");
 		      return false;
 		    }
-		  icode = (int) optab->handlers[(int) vec_mode].insn_code;
+		  icode = (int) OPTAB_HANDLER (optab, vec_mode);
 		  if (icode == CODE_FOR_nothing)
 		    {
 		      if (vect_print_dump_info (REPORT_SLP))
Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c	2010-07-03 18:20:11.000000000 +0100
+++ gcc/tree-vect-stmts.c	2010-07-03 18:32:20.000000000 +0100
@@ -2104,8 +2104,7 @@ vectorizable_operation (gimple stmt, gim
 	{
 	  optab = optab_for_tree_code (code, vectype, optab_scalar);
 	  if (optab
-	      && (optab_handler (optab, TYPE_MODE (vectype))->insn_code
-		  != CODE_FOR_nothing))
+	      && OPTAB_HANDLER (optab, TYPE_MODE (vectype)) != CODE_FOR_nothing)
 	    {
 	      scalar_shift_arg = true;
 	      if (vect_print_dump_info (REPORT_DETAILS))
@@ -2115,7 +2114,7 @@ vectorizable_operation (gimple stmt, gim
 	    {
 	      optab = optab_for_tree_code (code, vectype, optab_vector);
 	      if (optab
-		  && (optab_handler (optab, TYPE_MODE (vectype))->insn_code
+		  && (OPTAB_HANDLER (optab, TYPE_MODE (vectype))
 		      != CODE_FOR_nothing))
 		{
 		  if (vect_print_dump_info (REPORT_DETAILS))
@@ -2149,7 +2148,7 @@ vectorizable_operation (gimple stmt, gim
       return false;
     }
   vec_mode = TYPE_MODE (vectype);
-  icode = (int) optab_handler (optab, vec_mode)->insn_code;
+  icode = (int) OPTAB_HANDLER (optab, vec_mode);
   if (icode == CODE_FOR_nothing)
     {
       if (vect_print_dump_info (REPORT_DETAILS))
@@ -3051,7 +3050,7 @@ vectorizable_store (gimple stmt, gimple_
   vec_mode = TYPE_MODE (vectype);
   /* FORNOW. In some cases can vectorize even if data-type not supported
      (e.g. - array initialization with 0).  */
-  if (optab_handler (mov_optab, (int)vec_mode)->insn_code == CODE_FOR_nothing)
+  if (OPTAB_HANDLER (mov_optab, vec_mode) == CODE_FOR_nothing)
     return false;
 
   if (!STMT_VINFO_DATA_REF (stmt_info))
@@ -3434,7 +3433,7 @@ vectorizable_load (gimple stmt, gimple_s
 
   /* FORNOW. In some cases can vectorize even if data-type not supported
     (e.g. - data copies).  */
-  if (optab_handler (mov_optab, mode)->insn_code == CODE_FOR_nothing)
+  if (OPTAB_HANDLER (mov_optab, mode) == CODE_FOR_nothing)
     {
       if (vect_print_dump_info (REPORT_DETAILS))
 	fprintf (vect_dump, "Aligned load, but unsupported type.");
@@ -4886,9 +4885,8 @@ supportable_widening_operation (enum tre
     return false;
 
   vec_mode = TYPE_MODE (vectype);
-  if ((icode1 = optab_handler (optab1, vec_mode)->insn_code) == CODE_FOR_nothing
-       || (icode2 = optab_handler (optab2, vec_mode)->insn_code)
-                                                       == CODE_FOR_nothing)
+  if ((icode1 = OPTAB_HANDLER (optab1, vec_mode)) == CODE_FOR_nothing
+       || (icode2 = OPTAB_HANDLER (optab2, vec_mode)) == CODE_FOR_nothing)
     return false;
 
   /* Check if it's a multi-step conversion that can be done using intermediate
@@ -4920,16 +4918,16 @@ supportable_widening_operation (enum tre
           optab4 = optab_for_tree_code (c2, intermediate_type, optab_default);
 
           if (!optab3 || !optab4
-              || (icode1 = optab1->handlers[(int) prev_mode].insn_code)
-                                                        == CODE_FOR_nothing
+              || ((icode1 = OPTAB_HANDLER (optab1, prev_mode))
+		  == CODE_FOR_nothing)
               || insn_data[icode1].operand[0].mode != intermediate_mode
-              || (icode2 = optab2->handlers[(int) prev_mode].insn_code)
-                                                        == CODE_FOR_nothing
+              || ((icode2 = OPTAB_HANDLER (optab2, prev_mode))
+		  == CODE_FOR_nothing)
               || insn_data[icode2].operand[0].mode != intermediate_mode
-              || (icode1 = optab3->handlers[(int) intermediate_mode].insn_code)
-                                                        == CODE_FOR_nothing
-              || (icode2 = optab4->handlers[(int) intermediate_mode].insn_code)
-                                                        == CODE_FOR_nothing)
+              || ((icode1 = OPTAB_HANDLER (optab3, intermediate_mode))
+		  == CODE_FOR_nothing)
+              || ((icode2 = OPTAB_HANDLER (optab4, intermediate_mode))
+		  == CODE_FOR_nothing))
             return false;
 
           VEC_quick_push (tree, *interm_types, intermediate_type);
@@ -5016,8 +5014,7 @@ supportable_narrowing_operation (enum tr
     return false;
 
   vec_mode = TYPE_MODE (vectype);
-  if ((icode1 = optab_handler (optab1, vec_mode)->insn_code)
-       == CODE_FOR_nothing)
+  if ((icode1 = OPTAB_HANDLER (optab1, vec_mode)) == CODE_FOR_nothing)
     return false;
 
   /* Check if it's a multi-step conversion that can be done using intermediate
@@ -5040,12 +5037,11 @@ supportable_narrowing_operation (enum tr
           interm_optab = optab_for_tree_code (c1, intermediate_type,
                                               optab_default);
           if (!interm_optab
-              || (icode1 = optab1->handlers[(int) prev_mode].insn_code)
-                                                        == CODE_FOR_nothing
+              || ((icode1 = OPTAB_HANDLER (optab1, prev_mode))
+		  == CODE_FOR_nothing)
               || insn_data[icode1].operand[0].mode != intermediate_mode
-              || (icode1
-                  = interm_optab->handlers[(int) intermediate_mode].insn_code)
-                 == CODE_FOR_nothing)
+              || ((icode1 = OPTAB_HANDLER (interm_optab, intermediate_mode))
+		  == CODE_FOR_nothing))
             return false;
 
           VEC_quick_push (tree, *interm_types, intermediate_type);
Index: gcc/config/m32c/m32c.c
===================================================================
--- gcc/config/m32c/m32c.c	2010-07-03 18:20:10.000000000 +0100
+++ gcc/config/m32c/m32c.c	2010-07-03 18:32:20.000000000 +0100
@@ -1789,9 +1789,9 @@ m32c_init_libfuncs (void)
      the right modes are found. */
   if (TARGET_A24)
     {
-      optab_handler (cstore_optab, QImode)->insn_code = CODE_FOR_cstoreqi4_24;
-      optab_handler (cstore_optab, HImode)->insn_code = CODE_FOR_cstorehi4_24;
-      optab_handler (cstore_optab, PSImode)->insn_code = CODE_FOR_cstorepsi4_24;
+      SET_OPTAB_HANDLER (cstore_optab, QImode, CODE_FOR_cstoreqi4_24);
+      SET_OPTAB_HANDLER (cstore_optab, HImode, CODE_FOR_cstorehi4_24);
+      SET_OPTAB_HANDLER (cstore_optab, PSImode, CODE_FOR_cstorepsi4_24);
     }
 }
 
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	2010-07-03 18:20:10.000000000 +0100
+++ gcc/config/rs6000/rs6000.c	2010-07-03 18:32:20.000000000 +0100
@@ -3327,8 +3327,7 @@ rs6000_builtin_support_vector_misalignme
   if (TARGET_VSX)
     {
       /* Return if movmisalign pattern is not supported for this mode.  */
-      if (optab_handler (movmisalign_optab, mode)->insn_code ==
-          CODE_FOR_nothing)
+      if (OPTAB_HANDLER (movmisalign_optab, mode) == CODE_FOR_nothing)
         return false;
 
       if (misalignment == -1)
@@ -16243,7 +16242,7 @@ rs6000_emit_vector_compare (enum rtx_cod
 	if (rev_code == UNKNOWN)
 	  return NULL_RTX;
 
-	nor_code = optab_handler (one_cmpl_optab, (int)dmode)->insn_code;
+	nor_code = OPTAB_HANDLER (one_cmpl_optab, dmode);
 	if (nor_code == CODE_FOR_nothing)
 	  return NULL_RTX;
 
@@ -16288,7 +16287,7 @@ rs6000_emit_vector_compare (enum rtx_cod
 	    gcc_unreachable ();
 	  }
 
-	ior_code = optab_handler (ior_optab, (int)dmode)->insn_code;
+	ior_code = OPTAB_HANDLER (ior_optab, dmode);
 	if (ior_code == CODE_FOR_nothing)
 	  return NULL_RTX;
 
@@ -25641,8 +25640,8 @@ rs6000_emit_madd (rtx dst, rtx m1, rtx m
     {
       /* For the simple ops, use the generator function, rather than assuming
 	 that the RTL is standard.  */
-      enum insn_code mcode = optab_handler (smul_optab, mode)->insn_code;
-      enum insn_code acode = optab_handler (add_optab, mode)->insn_code;
+      enum insn_code mcode = OPTAB_HANDLER (smul_optab, mode);
+      enum insn_code acode = OPTAB_HANDLER (add_optab, mode);
       gen_2arg_fn_t gen_mul = (gen_2arg_fn_t) GEN_FCN (mcode);
       gen_2arg_fn_t gen_add = (gen_2arg_fn_t) GEN_FCN (acode);
       rtx mreg = gen_reg_rtx (mode);
@@ -25674,8 +25673,8 @@ rs6000_emit_msub (rtx dst, rtx m1, rtx m
     {
       /* For the simple ops, use the generator function, rather than assuming
 	 that the RTL is standard.  */
-      enum insn_code mcode = optab_handler (smul_optab, mode)->insn_code;
-      enum insn_code scode = optab_handler (add_optab, mode)->insn_code;
+      enum insn_code mcode = OPTAB_HANDLER (smul_optab, mode);
+      enum insn_code scode = OPTAB_HANDLER (add_optab, mode);
       gen_2arg_fn_t gen_mul = (gen_2arg_fn_t) GEN_FCN (mcode);
       gen_2arg_fn_t gen_sub = (gen_2arg_fn_t) GEN_FCN (scode);
       rtx mreg = gen_reg_rtx (mode);
@@ -25710,8 +25709,8 @@ rs6000_emit_nmsub (rtx dst, rtx m1, rtx
     {
       /* For the simple ops, use the generator function, rather than assuming
 	 that the RTL is standard.  */
-      enum insn_code mcode = optab_handler (smul_optab, mode)->insn_code;
-      enum insn_code scode = optab_handler (sub_optab, mode)->insn_code;
+      enum insn_code mcode = OPTAB_HANDLER (smul_optab, mode);
+      enum insn_code scode = OPTAB_HANDLER (sub_optab, mode);
       gen_2arg_fn_t gen_mul = (gen_2arg_fn_t) GEN_FCN (mcode);
       gen_2arg_fn_t gen_sub = (gen_2arg_fn_t) GEN_FCN (scode);
       rtx mreg = gen_reg_rtx (mode);
@@ -25745,7 +25744,7 @@ rs6000_emit_swdiv_high_precision (rtx ds
 {
   enum machine_mode mode = GET_MODE (dst);
   rtx x0, e0, e1, y1, u0, v0;
-  enum insn_code code = optab_handler (smul_optab, mode)->insn_code;
+  enum insn_code code = OPTAB_HANDLER (smul_optab, mode);
   gen_2arg_fn_t gen_mul = (gen_2arg_fn_t) GEN_FCN (code);
   rtx one = rs6000_load_constant_and_splat (mode, dconst1);
 
@@ -25783,7 +25782,7 @@ rs6000_emit_swdiv_low_precision (rtx dst
 {
   enum machine_mode mode = GET_MODE (dst);
   rtx x0, e0, e1, e2, y1, y2, y3, u0, v0, one;
-  enum insn_code code = optab_handler (smul_optab, mode)->insn_code;
+  enum insn_code code = OPTAB_HANDLER (smul_optab, mode);
   gen_2arg_fn_t gen_mul = (gen_2arg_fn_t) GEN_FCN (code);
 
   gcc_assert (code != CODE_FOR_nothing);
@@ -25854,7 +25853,7 @@ rs6000_emit_swrsqrt (rtx dst, rtx src)
   REAL_VALUE_TYPE dconst3_2;
   int i;
   rtx halfthree;
-  enum insn_code code = optab_handler (smul_optab, mode)->insn_code;
+  enum insn_code code = OPTAB_HANDLER (smul_optab, mode);
   gen_2arg_fn_t gen_mul = (gen_2arg_fn_t) GEN_FCN (code);
 
   gcc_assert (code != CODE_FOR_nothing);
Index: gcc/config/spu/spu.c
===================================================================
--- gcc/config/spu/spu.c	2010-07-03 18:20:10.000000000 +0100
+++ gcc/config/spu/spu.c	2010-07-03 18:32:20.000000000 +0100
@@ -1139,7 +1139,7 @@ spu_emit_branch_or_set (int is_set, rtx
           if (eq_rtx == 0)
 	    abort ();
           emit_insn (eq_rtx);
-          ior_code = ior_optab->handlers[(int)comp_mode].insn_code;
+          ior_code = OPTAB_HANDLER (ior_optab, comp_mode);
           gcc_assert (ior_code != CODE_FOR_nothing);
           emit_insn (GEN_FCN (ior_code)
 		     (compare_result, compare_result, eq_result));
@@ -4588,7 +4588,8 @@ spu_expand_mov (rtx * ops, enum machine_
 
       if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (imode))
 	{
-	  enum insn_code icode = convert_optab_handler (trunc_optab, mode, imode)->insn_code;
+	  enum insn_code icode = CONVERT_OPTAB_HANDLER (trunc_optab,
+							mode, imode);
 	  emit_insn (GEN_FCN (icode) (ops[0], from));
 	}
       else
@@ -6251,7 +6252,7 @@ spu_emit_vector_compare (enum rtx_code r
           {
             enum insn_code nor_code;
             rtx eq_rtx = spu_emit_vector_compare (EQ, op0, op1, dest_mode);
-            nor_code = optab_handler (one_cmpl_optab, (int)dest_mode)->insn_code;
+            nor_code = OPTAB_HANDLER (one_cmpl_optab, dest_mode);
             gcc_assert (nor_code != CODE_FOR_nothing);
             emit_insn (GEN_FCN (nor_code) (mask, eq_rtx));
             if (dmode != dest_mode)
@@ -6286,7 +6287,7 @@ spu_emit_vector_compare (enum rtx_code r
             c_rtx = spu_emit_vector_compare (new_code, op0, op1, dest_mode);
             eq_rtx = spu_emit_vector_compare (EQ, op0, op1, dest_mode);
 
-            ior_code = optab_handler (ior_optab, (int)dest_mode)->insn_code;
+            ior_code = OPTAB_HANDLER (ior_optab, dest_mode);
             gcc_assert (ior_code != CODE_FOR_nothing);
             emit_insn (GEN_FCN (ior_code) (mask, c_rtx, eq_rtx));
             if (dmode != dest_mode)
