Commit b8a542c6 by Andrew Pinski Committed by Andrew Pinski

builtins.c (expand_builtin_thread_pointer): Create a new target when the target is NULL.

2014-02-25  Andrew Pinski  <apinski@cavium.com>

	* builtins.c (expand_builtin_thread_pointer): Create a new target
	when the target is NULL.

From-SVN: r208163
parent fa5d9965
2014-02-25 Andrew Pinski <apinski@cavium.com>
* builtins.c (expand_builtin_thread_pointer): Create a new target
when the target is NULL.
2014-02-25 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/60317
......
......@@ -5712,7 +5712,10 @@ expand_builtin_thread_pointer (tree exp, rtx target)
if (icode != CODE_FOR_nothing)
{
struct expand_operand op;
if (!REG_P (target) || GET_MODE (target) != Pmode)
/* If the target is not sutitable then create a new target. */
if (target == NULL_RTX
|| !REG_P (target)
|| GET_MODE (target) != Pmode)
target = gen_reg_rtx (Pmode);
create_output_operand (&op, target, Pmode);
expand_insn (icode, 1, &op);
......
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