summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-24 18:50:26 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-24 18:50:26 +0000
commit05d18e8b7f19ea7f238946f768ae2e8c5c8a66b1 (patch)
treeb60ced5605459fa37b62bcb5a6c1cced24e7b3fd /gcc/stmt.c
parent0836e2c9712e7418159269b1b55130ca2739affc (diff)
downloadgcc-05d18e8b7f19ea7f238946f768ae2e8c5c8a66b1.tar.gz
* optabs.h (force_expand_binop): Declare.
* optabs.c (force_expand_binop): Export. * stmt.c (shift_return_value): Delete. (expand_return): Don't call it. * expr.h (shift_return_value): Declare. * calls.c (shift_returned_value): Delete in favor of... (shift_return_value): ...this new function. Leave the caller to check for non-BLKmode values passed in the msb of a register. Take said mode and a shift direction as argument. Operate on the hard function value, not a pseudo. (expand_call): Adjust accordingly. * function.c (expand_function_start): If a non-BLKmode return value is padded at the last significant end of the return register, use the return value's natural mode for the DECL_RESULT, not the mode of the padded register. (expand_function_end): Shift the same sort of return values left by the appropriate amount. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91187 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 3066a8b4123..e22ae5aca16 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -110,7 +110,6 @@ static bool check_operand_nalternatives (tree, tree);
static bool check_unique_operand_names (tree, tree);
static char *resolve_operand_name_1 (char *, tree, tree);
static void expand_null_return_1 (void);
-static rtx shift_return_value (rtx);
static void expand_value_return (rtx);
static void do_jump_if_equal (rtx, rtx, rtx, int);
static int estimate_case_costs (case_node_ptr);
@@ -1500,33 +1499,6 @@ expand_naked_return (void)
emit_jump (end_label);
}
-/* If the current function returns values in the most significant part
- of a register, shift return value VAL appropriately. The mode of
- the function's return type is known not to be BLKmode. */
-
-static rtx
-shift_return_value (rtx val)
-{
- tree type;
-
- type = TREE_TYPE (DECL_RESULT (current_function_decl));
- if (targetm.calls.return_in_msb (type))
- {
- rtx target;
- HOST_WIDE_INT shift;
-
- target = DECL_RTL (DECL_RESULT (current_function_decl));
- shift = (GET_MODE_BITSIZE (GET_MODE (target))
- - BITS_PER_UNIT * int_size_in_bytes (type));
- if (shift > 0)
- val = expand_shift (LSHIFT_EXPR, GET_MODE (target),
- gen_lowpart (GET_MODE (target), val),
- build_int_cst (NULL_TREE, shift), target, 1);
- }
- return val;
-}
-
-
/* Generate RTL to return from the current function, with value VAL. */
static void
@@ -1737,7 +1709,7 @@ expand_return (tree retval)
val = expand_expr (retval_rhs, val, GET_MODE (val), 0);
val = force_not_mem (val);
/* Return the calculated value. */
- expand_value_return (shift_return_value (val));
+ expand_value_return (val);
}
else
{