diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-26 00:51:56 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-26 00:51:56 +0000 |
commit | 3ed779c3572d4afabe6189aff2e1068872cd891e (patch) | |
tree | 1eba01a5eec5c3344112839c52aa60900e983919 /gcc/builtins.c | |
parent | f1ba2cb68dcabc9d8aec6c01ae3b8b3d356342c8 (diff) |
2014-02-25 Andrew Pinski <apinski@cavium.com>
* 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
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 35969ad4184..7c6318ee4ab 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -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); |