OSDN Git Service

* config/alpha/alpha.h (CODE_MASK, MIPS_IS_STAB, MIPS_MARK_STAB)
[pf3gnuchains/gcc-fork.git] / gcc / calls.c
index 2e79777..98f3009 100644 (file)
@@ -274,7 +274,7 @@ emit_call_1 (rtx funexp, tree fntree ATTRIBUTE_UNUSED, tree fndecl ATTRIBUTE_UNU
   if (fndecl && TREE_CODE (fndecl) == FUNCTION_DECL)
     set_mem_expr (funmem, fndecl);
   else if (fntree)
-    set_mem_expr (funmem, build_fold_indirect_ref (CALL_EXPR_FN (fntree)));
+    set_mem_expr (funmem, build_simple_mem_ref (CALL_EXPR_FN (fntree)));
 
 #if defined (HAVE_sibcall_pop) && defined (HAVE_sibcall_value_pop)
   if ((ecf_flags & ECF_SIBCALL)
@@ -690,7 +690,7 @@ precompute_register_parameters (int num_actuals, struct arg_data *args,
        /* If the value is a non-legitimate constant, force it into a
           pseudo now.  TLS symbols sometimes need a call to resolve.  */
        if (CONSTANT_P (args[i].value)
-           && !LEGITIMATE_CONSTANT_P (args[i].value))
+           && !targetm.legitimate_constant_p (args[i].mode, args[i].value))
          args[i].value = force_reg (args[i].mode, args[i].value);
 
        /* If we are to promote the function arg to a wider mode,
@@ -1668,9 +1668,7 @@ load_register_parameters (struct arg_data *args, int num_actuals,
                     call only uses SIZE bytes at the msb end, but it doesn't
                     seem worth generating rtl to say that.  */
                  reg = gen_rtx_REG (word_mode, REGNO (reg));
-                 x = expand_shift (LSHIFT_EXPR, word_mode, reg,
-                                   build_int_cst (NULL_TREE, shift),
-                                   reg, 1);
+                 x = expand_shift (LSHIFT_EXPR, word_mode, reg, shift, reg, 1);
                  if (x != reg)
                    emit_move_insn (reg, x);
                }
@@ -1714,9 +1712,7 @@ load_register_parameters (struct arg_data *args, int num_actuals,
                                                        : LSHIFT_EXPR;
 
                  emit_move_insn (x, tem);
-                 x = expand_shift (dir, word_mode, x,
-                                   build_int_cst (NULL_TREE, shift),
-                                   ri, 1);
+                 x = expand_shift (dir, word_mode, x, shift, ri, 1);
                  if (x != ri)
                    emit_move_insn (ri, x);
                }
@@ -2555,8 +2551,7 @@ expand_call (tree exp, rtx target, int ignore)
                  highest_outgoing_arg_in_use = MAX (initial_highest_arg_in_use,
                                                     needed);
 #endif
-                 if (stack_usage_map_buf)
-                   free (stack_usage_map_buf);
+                 free (stack_usage_map_buf);
                  stack_usage_map_buf = XNEWVEC (char, highest_outgoing_arg_in_use);
                  stack_usage_map = stack_usage_map_buf;
 
@@ -2661,8 +2656,7 @@ expand_call (tree exp, rtx target, int ignore)
                    = stack_arg_under_construction;
                  stack_arg_under_construction = 0;
                  /* Make a new map for the new argument list.  */
-                 if (stack_usage_map_buf)
-                   free (stack_usage_map_buf);
+                 free (stack_usage_map_buf);
                  stack_usage_map_buf = XCNEWVEC (char, highest_outgoing_arg_in_use);
                  stack_usage_map = stack_usage_map_buf;
                  highest_outgoing_arg_in_use = 0;
@@ -3152,8 +3146,7 @@ expand_call (tree exp, rtx target, int ignore)
 
       /* Free up storage we no longer need.  */
       for (i = 0; i < num_actuals; ++i)
-       if (args[i].aligned_regs)
-         free (args[i].aligned_regs);
+       free (args[i].aligned_regs);
 
       insns = get_insns ();
       end_sequence ();
@@ -3208,8 +3201,7 @@ expand_call (tree exp, rtx target, int ignore)
 
   currently_expanding_call--;
 
-  if (stack_usage_map_buf)
-    free (stack_usage_map_buf);
+  free (stack_usage_map_buf);
 
   return target;
 }
@@ -3451,7 +3443,8 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
 
       /* Make sure it is a reasonable operand for a move or push insn.  */
       if (!REG_P (addr) && !MEM_P (addr)
-         && ! (CONSTANT_P (addr) && LEGITIMATE_CONSTANT_P (addr)))
+         && !(CONSTANT_P (addr)
+              && targetm.legitimate_constant_p (Pmode, addr)))
        addr = force_operand (addr, NULL_RTX);
 
       argvec[count].value = addr;
@@ -3492,7 +3485,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
 
       /* Make sure it is a reasonable operand for a move or push insn.  */
       if (!REG_P (val) && !MEM_P (val)
-         && ! (CONSTANT_P (val) && LEGITIMATE_CONSTANT_P (val)))
+         && !(CONSTANT_P (val) && targetm.legitimate_constant_p (mode, val)))
        val = force_operand (val, NULL_RTX);
 
       if (pass_by_reference (&args_so_far, mode, NULL_TREE, 1))
@@ -3966,8 +3959,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
       stack_usage_map = initial_stack_usage_map;
     }
 
-  if (stack_usage_map_buf)
-    free (stack_usage_map_buf);
+  free (stack_usage_map_buf);
 
   return value;