aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChung-Ju Wu <jasonwucj@gmail.com>2019-02-04 07:31:45 +0000
committerChung-Ju Wu <jasonwucj@gmail.com>2019-02-04 07:31:45 +0000
commit7210929dc69dac8b5721844bc01ef5e404d593e1 (patch)
treeeee60a966e02bbae8ef73a3e8e31270eb43c6f1c
parent2452ee027196d41f457486a373d54ea5e97c307e (diff)
[NDS32] Restrict address mode, when symbol is TLS model.
gcc/ * config/nds32/nds32.c (nds32_legitimate_address_p): Add TLS model into consideration. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@268509 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/nds32/nds32.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1d57d7c0fbc..da8106ba36d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2019-02-04 Chung-Ju Wu <jasonwucj@gmail.com>
+ * config/nds32/nds32.c (nds32_legitimate_address_p): Add TLS model
+ into consideration.
+
+2019-02-04 Chung-Ju Wu <jasonwucj@gmail.com>
+
* config.gcc (with_nds32_lib, glibc):
Remove TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0 setting.
* config/nds32/linux.h (TARGET_DEFAULT_TLSDESC_TRAMPOLINE): Delete.
diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c
index b4f4edee9d1..6702b765bec 100644
--- a/gcc/config/nds32/nds32.c
+++ b/gcc/config/nds32/nds32.c
@@ -2683,7 +2683,7 @@ nds32_legitimate_address_p (machine_mode mode, rtx x, bool strict)
/* Now we see the [ + const_addr ] pattern, but we need
some further checking. */
- if (flag_pic)
+ if (flag_pic || SYMBOL_REF_TLS_MODEL (op0))
return false;
/* If -mcmodel=large, the 'const_addr' is not a valid address