Skip to content

Commit

Permalink
2014-02-25 Andrew Pinski <apinski@cavium.com>
Browse files Browse the repository at this point in the history
	* builtins.c (expand_builtin_thread_pointer): Create a new target
	when the target is NULL.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208163 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
pinskia committed Feb 26, 2014
1 parent f1ba2cb commit 3ed779c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
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
Expand Down
5 changes: 4 additions & 1 deletion gcc/builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3ed779c

Please sign in to comment.