diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2015-02-13 13:06:54 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2015-02-13 13:06:54 +0000 |
commit | 98056c540e9cfbaf5a463b10f8d179d58b050163 (patch) | |
tree | eb2ddb9c1608ecb3b157121ca10ed8cd56e47242 | |
parent | fb0653ab96ba450a5f364cbf9463060dfe5729f5 (diff) | |
download | gcc-98056c540e9cfbaf5a463b10f8d179d58b050163.zip gcc-98056c540e9cfbaf5a463b10f8d179d58b050163.tar.gz gcc-98056c540e9cfbaf5a463b10f8d179d58b050163.tar.bz2 |
constraints.md: Change "Q" and "T" constraints to memory constraints.
* config/pa/constraints.md: Change "Q" and "T" constraints to memory
constraints.
* config/pa/pa.c (pa_cannot_force_const_mem): Don't allow constant
symbolic references to data to be forced to constant memory on the
SOM target.
From-SVN: r220680
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/pa/constraints.md | 4 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 8 |
3 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 19e729b..fa363dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-02-13 John David Anglin <danglin@gcc.gnu.org> + + * config/pa/constraints.md: Change "Q" and "T" constraints to memory + constraints. + * config/pa/pa.c (pa_cannot_force_const_mem): Don't allow constant + symbolic references to data to be forced to constant memory on the + SOM target. + 2015-02-13 Ilya Enkovich <ilya.enkovich@intel.com> PR tree-optimization/65002 diff --git a/gcc/config/pa/constraints.md b/gcc/config/pa/constraints.md index 296337c..fed0b58 100644 --- a/gcc/config/pa/constraints.md +++ b/gcc/config/pa/constraints.md @@ -106,7 +106,7 @@ (and (match_code "mem") (match_test "IS_LO_SUM_DLT_ADDR_P (XEXP (op, 0))"))) -(define_constraint "Q" +(define_memory_constraint "Q" "A memory operand that can be used as the destination operand of an integer store, or the source operand of an integer load. That is any memory operand that isn't a symbolic, indexed or lo_sum memory @@ -122,7 +122,7 @@ (and (match_code "mem") (match_test "IS_INDEX_ADDR_P (XEXP (op, 0))"))) -(define_constraint "T" +(define_memory_constraint "T" "A memory operand for floating-point loads and stores." (match_test "floating_point_store_memory_operand (op, mode)")) diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index a568b2f..13bd529 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -1569,6 +1569,14 @@ force_mode (machine_mode mode, rtx orig) static bool pa_cannot_force_const_mem (machine_mode mode ATTRIBUTE_UNUSED, rtx x) { + /* Reload sometimes tries to put const data symbolic operands in + readonly memory. The HP SOM linker doesn't allow symbolic data + in readonly memory. */ + if (TARGET_SOM + && !function_label_operand (x, VOIDmode) + && symbolic_operand (x, VOIDmode)) + return true; + return tls_referenced_p (x); } |