re PR target/31535 (ICE on attempt to put SPE vector variables in SDA)

gcc/
	PR 31535
	* config/rs6000/rs6000.c (small_data_operand): Vectors and floats
	are not legitimate small data references on SPE targets.

gcc/testsuite/
	PR 31535
	* gcc.target/powerpc/spe-small-data-1.c: New test.
	* gcc.target/powerpc/spe-small-data-2.c: New test.

From-SVN: r131914
This commit is contained in:
Nathan Froyd 2008-01-28 18:31:19 +00:00 committed by Nathan Froyd
parent 64a96f5bc3
commit 2aa42e6e3b
5 changed files with 45 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2008-01-28 Nathan Froyd <froydnj@codesourcery.com>
PR 31535
* config/rs6000/rs6000.c (small_data_operand): Vectors and floats
are not legitimate small data references on SPE targets.
2008-01-28 David Daney <ddaney@avtrex.com>
* doc/install.texi (mips-*-*): Recommend binutils 2.18.

View File

@ -3238,6 +3238,13 @@ small_data_operand (rtx op ATTRIBUTE_UNUSED,
if (DEFAULT_ABI != ABI_V4)
return 0;
/* Vector and float memory instructions have a limited offset on the
SPE, so using a vector or float variable directly as an operand is
not useful. */
if (TARGET_SPE
&& (SPE_VECTOR_MODE (mode) || FLOAT_MODE_P (mode)))
return 0;
if (GET_CODE (op) == SYMBOL_REF)
sym_ref = op;

View File

@ -1,3 +1,9 @@
2008-01-28 Nathan Froyd <froydnj@codesourcery.com>
PR 31535
* gcc.target/powerpc/spe-small-data-1.c: New test.
* gcc.target/powerpc/spe-small-data-2.c: New test.
2008-01-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34980

View File

@ -0,0 +1,14 @@
/* Verify that we don't ICE trying to put SPE data in .sdata2. */
/* { dg-do run { target { powerpc*-*-linux* && powerpc_spe } } } */
/* { dg-options "-msdata=eabi -mcall-eabi -G 8" } */
#include <spe.h>
__ev64_fs__ x;
int main(void)
{
x = __ev_fsabs (x);
return(0);
}

View File

@ -0,0 +1,12 @@
/* Verify that we don't ICE trying to put float data in .sdata2. */
/* { dg-do run { target { powerpc*-*-linux* && powerpc_spe } } } */
/* { dg-options "-msdata=eabi -mcall-eabi -G 8" } */
double x;
int main(void)
{
x = x * 2;
return(0);
}