diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/rs6000/rs6000.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 01e5bbc..a85d7630 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -9759,8 +9759,11 @@ rs6000_init_stack_protect_guard (void) static bool rs6000_cannot_force_const_mem (machine_mode mode ATTRIBUTE_UNUSED, rtx x) { - if (GET_CODE (x) == HIGH - && GET_CODE (XEXP (x, 0)) == UNSPEC) + /* If GET_CODE (x) is HIGH, the 'X' represets the high part of a symbol_ref. + It can not be put into a constant pool. e.g. + (high:DI (unspec:DI [(symbol_ref/u:DI ("*.LC0")..) + (high:DI (symbol_ref:DI ("var")..)). */ + if (GET_CODE (x) == HIGH) return true; /* A TLS symbol in the TOC cannot contain a sum. */ |