OSDN Git Service

* config/v850/v850.h (FUNCTION_VALUE): Remove.
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Sep 2009 17:19:11 +0000 (17:19 +0000)
committeraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Sep 2009 17:19:11 +0000 (17:19 +0000)
* config/v850/v850.c (v850_function_value): New function.
(TARGET_FUNCTION_VALUE): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152180 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/v850/v850.c
gcc/config/v850/v850.h

index 2864131..53a8332 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-25  Anatoly Sokolov  <aesok@post.ru>
+
+       * config/v850/v850.h (FUNCTION_VALUE): Remove.
+       * config/v850/v850.c (v850_function_value): New function.
+       (TARGET_FUNCTION_VALUE): Define.
+
 2009-09-25  Jakub Jelinek  <jakub@redhat.com>
 
        * tree-vect-stmts.c (vectorizable_call): Call
index 8e1f27b..6242ba6 100644 (file)
@@ -66,6 +66,7 @@ static section *v850_select_section (tree, int, unsigned HOST_WIDE_INT);
 static void v850_encode_data_area    (tree, rtx);
 static void v850_encode_section_info (tree, rtx, int);
 static bool v850_return_in_memory    (const_tree, const_tree);
+static rtx v850_function_value (const_tree, const_tree, bool);
 static void v850_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
                                         tree, int *, int);
 static bool v850_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
@@ -164,6 +165,9 @@ static const struct attribute_spec v850_attribute_table[] =
 #undef TARGET_RETURN_IN_MEMORY
 #define TARGET_RETURN_IN_MEMORY v850_return_in_memory
 
+#undef TARGET_FUNCTION_VALUE
+#define TARGET_FUNCTION_VALUE v850_function_value
+
 #undef TARGET_PASS_BY_REFERENCE
 #define TARGET_PASS_BY_REFERENCE v850_pass_by_reference
 
@@ -2955,6 +2959,17 @@ v850_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
   /* Return values > 8 bytes in length in memory.  */
   return int_size_in_bytes (type) > 8 || TYPE_MODE (type) == BLKmode;
 }
+
+/* Worker function for TARGET_FUNCTION_VALUE.  */
+
+rtx
+v850_function_value (const_tree valtype, 
+                    const_tree fn_decl_or_type ATTRIBUTE_UNUSED,
+                    bool outgoing ATTRIBUTE_UNUSED)
+{
+  return gen_rtx_REG (TYPE_MODE (valtype), 10);
+}
+
 \f
 /* Worker function for TARGET_SETUP_INCOMING_VARARGS.  */
 
index 1a4ca74..4a28817 100644 (file)
@@ -620,14 +620,6 @@ struct cum_arg { int nbytes; int anonymous_args; };
 
 #define FUNCTION_ARG_REGNO_P(N) (N >= 6 && N <= 9)
 
-/* Define how to find the value returned by a function.
-   VALTYPE is the data type of the value (as a tree).
-   If the precise function being called is known, FUNC is its FUNCTION_DECL;
-   otherwise, FUNC is 0.  */
-   
-#define FUNCTION_VALUE(VALTYPE, FUNC) \
-  gen_rtx_REG (TYPE_MODE (VALTYPE), 10)
-
 /* Define how to find the value returned by a library function
    assuming the value has mode MODE.  */