]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[NDS32] Restrict address mode, when symbol is TLS model.
authorjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Feb 2019 07:31:45 +0000 (07:31 +0000)
committerjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Feb 2019 07:31:45 +0000 (07:31 +0000)
gcc/
* config/nds32/nds32.c (nds32_legitimate_address_p): Add TLS model
into consideration.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268509 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/nds32/nds32.c

index 1d57d7c0fbcc0ffac6b7f1f84ab850303817c858..da8106ba36d3eb42a2cf9721ba61e10a9d13b37b 100644 (file)
@@ -1,3 +1,8 @@
+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):
index b4f4edee9d1a51ef2f491174a4839f972ce79d31..6702b765becca84bdce3542de0cdd18b0b0090cd 100644 (file)
@@ -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