OSDN Git Service

PR debug/41276
[pf3gnuchains/gcc-fork.git] / gcc / explow.c
index 0a26164..3073ff0 100644 (file)
@@ -246,7 +246,7 @@ expr_size (tree exp)
     size = TREE_OPERAND (exp, 1);
   else
     {
-      size = lang_hooks.expr_size (exp);
+      size = tree_expr_size (exp);
       gcc_assert (size);
       gcc_assert (size == SUBSTITUTE_PLACEHOLDER_IN_EXPR (size, exp));
     }
@@ -266,7 +266,7 @@ int_expr_size (tree exp)
     size = TREE_OPERAND (exp, 1);
   else
     {
-      size = lang_hooks.expr_size (exp);
+      size = tree_expr_size (exp);
       gcc_assert (size);
     }
 
@@ -760,7 +760,6 @@ enum machine_mode
 promote_function_mode (const_tree type, enum machine_mode mode, int *punsignedp,
                       const_tree funtype, int for_return)
 {
-  gcc_assert (GET_MODE_CLASS (mode) != MODE_COMPLEX_INT);
   switch (TREE_CODE (type))
     {
     case INTEGER_TYPE:   case ENUMERAL_TYPE:   case BOOLEAN_TYPE:
@@ -778,7 +777,8 @@ promote_function_mode (const_tree type, enum machine_mode mode, int *punsignedp,
    to show what signedness to use on extension operations.  */
 
 enum machine_mode
-promote_mode (const_tree type, enum machine_mode mode, int *punsignedp)
+promote_mode (const_tree type ATTRIBUTE_UNUSED, enum machine_mode mode,
+             int *punsignedp ATTRIBUTE_UNUSED)
 {
   /* FIXME: this is the same logic that was there until GCC 4.4, but we
      probably want to test POINTERS_EXTEND_UNSIGNED even if PROMOTE_MODE
@@ -825,12 +825,10 @@ promote_decl_mode (const_tree decl, int *punsignedp)
   enum machine_mode mode = DECL_MODE (decl);
   enum machine_mode pmode;
 
-  if (TREE_CODE (decl) == RESULT_DECL)
+  if (TREE_CODE (decl) == RESULT_DECL
+      || TREE_CODE (decl) == PARM_DECL)
     pmode = promote_function_mode (type, mode, &unsignedp,
-                                   TREE_TYPE (current_function_decl), 1);
-  else if (TREE_CODE (decl) == PARM_DECL)
-    pmode = promote_function_mode (type, mode, &unsignedp,
-                                   TREE_TYPE (current_function_decl), 0);
+                                   TREE_TYPE (current_function_decl), 2);
   else
     pmode = promote_mode (type, mode, &unsignedp);
 
@@ -1529,9 +1527,9 @@ hard_function_value (const_tree valtype, const_tree func, const_tree fntype,
    in which a scalar value of mode MODE was returned by a library call.  */
 
 rtx
-hard_libcall_value (enum machine_mode mode)
+hard_libcall_value (enum machine_mode mode, rtx fun)
 {
-  return LIBCALL_VALUE (mode);
+  return targetm.calls.libcall_value (mode, fun);
 }
 
 /* Look up the tree code for a given rtx code