From: Joseph Myers Date: Sat, 28 Jun 2008 19:40:03 +0000 (+0100) Subject: predicates.md (easy_fp_constant): Reject TFmode constants for E500 double. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=624b157f704da414d40ed60003ecb21b5b2f380a;p=gcc.git predicates.md (easy_fp_constant): Reject TFmode constants for E500 double. * config/rs6000/predicates.md (easy_fp_constant): Reject TFmode constants for E500 double. testsuite: * gcc.c-torture/compile/20080628-1.c: New test. From-SVN: r137232 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 909e4a69338..22c364936dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-06-28 Joseph Myers + + * config/rs6000/predicates.md (easy_fp_constant): Reject TFmode + constants for E500 double. + 2008-06-28 Ulrich Weigand * doc/rtl.texi (const_vector): Document const_fixed as legitimate diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 98cbdc64f91..8e97c79acd2 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -213,6 +213,9 @@ switch (mode) { case TFmode: + if (TARGET_E500_DOUBLE) + return 0; + REAL_VALUE_FROM_CONST_DOUBLE (rv, op); REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, k); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 39d0a71a401..b56104c3238 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-06-28 Joseph Myers + + * gcc.c-torture/compile/20080628-1.c: New test. + 2008-06-28 Richard Guenther * gcc.c-torture/execute/pta-field-1.c: Add return 0. diff --git a/gcc/testsuite/gcc.c-torture/compile/20080628-1.c b/gcc/testsuite/gcc.c-torture/compile/20080628-1.c new file mode 100644 index 00000000000..aca4ff82777 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20080628-1.c @@ -0,0 +1,15 @@ +void f (long double, long double); + +struct s { + char c; + struct s *p; +} *p; + +void +g (void) +{ + long double ld; + p->p->c = 1; + ld = p->p->c; + f (ld, 1.0L); +}