From 4a7df256445299c55162638c37c33bb8e6a19103 Mon Sep 17 00:00:00 2001 From: Chung-Ju Wu Date: Mon, 4 Feb 2019 07:31:45 +0000 Subject: [PATCH] [NDS32] Restrict address mode, when symbol is TLS model. gcc/ * config/nds32/nds32.c (nds32_legitimate_address_p): Add TLS model into consideration. From-SVN: r268509 --- gcc/ChangeLog | 5 +++++ gcc/config/nds32/nds32.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1d57d7c0fbc..da8106ba36d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-02-04 Chung-Ju Wu + + * config/nds32/nds32.c (nds32_legitimate_address_p): Add TLS model + into consideration. + 2019-02-04 Chung-Ju Wu * config.gcc (with_nds32_lib, glibc): 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 -- 2.30.2