aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-12-09 15:54:01 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-12-09 15:54:01 -0800
commit3a04ff6433538b4cec71fe681ded309db4d91cab (patch)
tree57341f6e2c1ac600113f5797665b9c84f0d000d3 /gcc/varasm.c
parenta9a4005fca1d4a58133419bc33c89a62fe534cbb (diff)
downloadgcc-3a04ff6433538b4cec71fe681ded309db4d91cab.zip
gcc-3a04ff6433538b4cec71fe681ded309db4d91cab.tar.gz
gcc-3a04ff6433538b4cec71fe681ded309db4d91cab.tar.bz2
target.h (gcc_target): Add cannot_force_const_mem.
* target.h (gcc_target): Add cannot_force_const_mem. * target-def.h (TARGET_CANNOT_FORCE_CONST_MEM): New. (TARGET_INITIALIZER): Add it. * varasm.c (force_const_mem): Fail if cannot_force_const_mem. * expr.c (emit_move_insn): Be prepared for force_const_mem to fail. * reload1.c (reload): Likewise. * hooks.c (hook_bool_rtx_false): New. * hooks.h: Declare it. * config/i386/i386.c (ix86_cannot_force_const_mem): New. (TARGET_CANNOT_FORCE_CONST_MEM): New. (ix86_expand_move): Remove de-const-pooling hack. * gcc.dg/tls/opt-4.c: New. From-SVN: r59971
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 2ac3da5..f8b33d0 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -3209,6 +3209,10 @@ force_const_mem (mode, x)
struct pool_constant *pool;
unsigned int align;
+ /* If we're not allowed to drop X into the constant pool, don't. */
+ if ((*targetm.cannot_force_const_mem) (x))
+ return NULL_RTX;
+
/* Compute hash code of X. Search the descriptors for that hash code
to see if any of them describes X. If yes, we have an rtx to use. */
hash = const_hash_rtx (mode, x);