aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2008-07-16 19:36:43 +0400
committerBob Wilson <bwilson@gcc.gnu.org>2008-07-16 15:36:43 +0000
commite2b2d01ef17560879ca8e09a9e258cc906160b51 (patch)
tree4d9a3460cac454eb339d8b440bb20f7f21419ae5
parent4db72361fe9c5fc148b529b6ba9af814150379d3 (diff)
downloadgcc-e2b2d01ef17560879ca8e09a9e258cc906160b51.zip
gcc-e2b2d01ef17560879ca8e09a9e258cc906160b51.tar.gz
gcc-e2b2d01ef17560879ca8e09a9e258cc906160b51.tar.bz2
xtensa.h (FUNCTION_OUTGOING_VALUE, [...]): Remove.
2008-07-16 Anatoly Sokolov <aesok@post.ru> * config/xtensa/xtensa.h (FUNCTION_OUTGOING_VALUE, XTENSA_FUNCTION_VALUE, XTENSA_FUNCTION_VALUE): Remove. * config/xtensa/xtensa.c (xtensa_function_value): New function. (TARGET_FUNCTION_VALUE): Define. From-SVN: r137888
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/xtensa/xtensa.c14
-rw-r--r--gcc/config/xtensa/xtensa.h16
3 files changed, 21 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7947278..f1ea47c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-16 Anatoly Sokolov <aesok@post.ru>
+
+ * config/xtensa/xtensa.h (FUNCTION_OUTGOING_VALUE,
+ XTENSA_FUNCTION_VALUE, XTENSA_FUNCTION_VALUE): Remove.
+ * config/xtensa/xtensa.c (xtensa_function_value): New function.
+ (TARGET_FUNCTION_VALUE): Define.
+
2008-07-16 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (processor_target_table): Add
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 6e26d76..38a621d 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -142,6 +142,7 @@ static section *xtensa_select_rtx_section (enum machine_mode, rtx,
static bool xtensa_rtx_costs (rtx, int, int, int *);
static tree xtensa_build_builtin_va_list (void);
static bool xtensa_return_in_memory (const_tree, const_tree);
+static rtx xtensa_function_value (const_tree, const_tree, bool);
static tree xtensa_gimplify_va_arg_expr (tree, tree, tree *, tree *);
static void xtensa_init_builtins (void);
static tree xtensa_fold_builtin (tree, tree, bool);
@@ -192,6 +193,8 @@ static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] =
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY xtensa_return_in_memory
+#undef TARGET_FUNCTION_VALUE
+#define TARGET_FUNCTION_VALUE xtensa_function_value
#undef TARGET_SPLIT_COMPLEX_ARG
#define TARGET_SPLIT_COMPLEX_ARG hook_bool_const_tree_true
#undef TARGET_MUST_PASS_IN_STACK
@@ -3163,6 +3166,17 @@ xtensa_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
> 4 * UNITS_PER_WORD);
}
+/* Worker function for TARGET_FUNCTION_VALUE. */
+
+rtx
+xtensa_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
+ bool outgoing)
+{
+ return gen_rtx_REG ((INTEGRAL_TYPE_P (valtype)
+ && TYPE_PRECISION (valtype) < BITS_PER_WORD)
+ ? SImode : TYPE_MODE (valtype),
+ outgoing ? GP_OUTGOING_RETURN : GP_RETURN);
+}
/* TRAMPOLINE_TEMPLATE: For Xtensa, the trampoline must perform an ENTRY
instruction with a minimal stack frame in order to get some free
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index eaef97e..920f9d2 100644
--- a/gcc/config/xtensa/xtensa.h
+++ b/gcc/config/xtensa/xtensa.h
@@ -608,22 +608,6 @@ extern const enum reg_class xtensa_regno_to_class[FIRST_PSEUDO_REGISTER];
#define LIBCALL_OUTGOING_VALUE(MODE) \
XTENSA_LIBCALL_VALUE ((MODE), 1)
-/* 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 XTENSA_FUNCTION_VALUE(VALTYPE, FUNC, OUTGOINGP) \
- gen_rtx_REG ((INTEGRAL_TYPE_P (VALTYPE) \
- && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \
- ? SImode: TYPE_MODE (VALTYPE), \
- OUTGOINGP ? GP_OUTGOING_RETURN : GP_RETURN)
-
-#define FUNCTION_VALUE(VALTYPE, FUNC) \
- XTENSA_FUNCTION_VALUE (VALTYPE, FUNC, 0)
-
-#define FUNCTION_OUTGOING_VALUE(VALTYPE, FUNC) \
- XTENSA_FUNCTION_VALUE (VALTYPE, FUNC, 1)
-
/* A C expression that is nonzero if REGNO is the number of a hard
register in which the values of called function may come back. A
register whose use for returning values is limited to serving as