aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2006-05-16 04:16:00 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2006-05-16 04:16:00 +0000
commitd0b898529b9ac6e3c227567a197d12dcf71dc800 (patch)
tree1c68ea8e0d38ca424a0acc2d3a6cf4b1a617a9cd /gcc/config
parenta0cfeb0fcd3953ba10886a4a5d2b33b9d4bd1d7d (diff)
downloadgcc-d0b898529b9ac6e3c227567a197d12dcf71dc800.zip
gcc-d0b898529b9ac6e3c227567a197d12dcf71dc800.tar.gz
gcc-d0b898529b9ac6e3c227567a197d12dcf71dc800.tar.bz2
re PR target/26600 (internal compiler error: in push_reload, at reload.c:1303)
PR target/26600 * config/i386/i386.c (legitimate_constant_p) <CONST_DOUBLE>: TImode integer constants other than zero are only legitimate on TARGET_64BIT. <CONST_VECTOR> Only zero vectors are legitimate. (ix86_cannot_force_const_mem): Integral and vector constants can always be put in the constant pool. * gcc.target/i386/pr26600.c: New test case. From-SVN: r113818
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index c81dee8..3ff5abb 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -5934,6 +5934,18 @@ legitimate_constant_p (rtx x)
return false;
break;
+ case CONST_DOUBLE:
+ if (GET_MODE (x) == TImode
+ && x != CONST0_RTX (TImode)
+ && !TARGET_64BIT)
+ return false;
+ break;
+
+ case CONST_VECTOR:
+ if (x == CONST0_RTX (GET_MODE (x)))
+ return true;
+ return false;
+
default:
break;
}
@@ -5949,6 +5961,17 @@ legitimate_constant_p (rtx x)
static bool
ix86_cannot_force_const_mem (rtx x)
{
+ /* We can always put integral constants and vectors in memory. */
+ switch (GET_CODE (x))
+ {
+ case CONST_INT:
+ case CONST_DOUBLE:
+ case CONST_VECTOR:
+ return false;
+
+ default:
+ break;
+ }
return !legitimate_constant_p (x);
}