Commit f231e307 by Richard Kenner

(initialize_for_inline): Handle CONCAT when setting up parmdecl_map.

(expand_inline_function): Make test for overlap of TARGET and args_vals[i]
more conservative.

From-SVN: r6207
parent 7f340546
...@@ -276,6 +276,17 @@ initialize_for_inline (fndecl, min_labelno, max_labelno, max_reg, copy) ...@@ -276,6 +276,17 @@ initialize_for_inline (fndecl, min_labelno, max_labelno, max_reg, copy)
if (GET_CODE (p) == REG) if (GET_CODE (p) == REG)
parmdecl_map[REGNO (p)] = parms; parmdecl_map[REGNO (p)] = parms;
else if (GET_CODE (p) == CONCAT)
{
rtx preal = gen_realpart (GET_MODE (XEXP (p, 0)), p);
rtx pimag = gen_imagpart (GET_MODE (preal), p);
if (GET_CODE (preal) == REG)
parmdecl_map[REGNO (preal)] = parms;
if (GET_CODE (pimag) == REG)
parmdecl_map[REGNO (pimag)] = parms;
}
/* This flag is cleared later /* This flag is cleared later
if the function ever modifies the value of the parm. */ if the function ever modifies the value of the parm. */
TREE_READONLY (parms) = 1; TREE_READONLY (parms) = 1;
...@@ -1273,9 +1284,7 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add ...@@ -1273,9 +1284,7 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
But if ARG_VALS[I] overlaps TARGET, these assumptions are But if ARG_VALS[I] overlaps TARGET, these assumptions are
wrong, so put ARG_VALS[I] into a fresh register. */ wrong, so put ARG_VALS[I] into a fresh register. */
|| (target != 0 || (target != 0
&& (GET_CODE (arg_vals[i]) == REG && ! CONSTANT_P (arg_vals[i])
|| GET_CODE (arg_vals[i]) == SUBREG
|| GET_CODE (arg_vals[i]) == MEM)
&& reg_overlap_mentioned_p (arg_vals[i], target)) && reg_overlap_mentioned_p (arg_vals[i], target))
/* ??? We must always copy a SUBREG into a REG, because it might /* ??? We must always copy a SUBREG into a REG, because it might
get substituted into an address, and not all ports correctly get substituted into an address, and not all ports correctly
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment