2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/31385
* config/i386/i386.h (VALID_DFP_MODE_P): New.
* config/i386/i386.c (ix86_hard_regno_mode_ok): Allow DFP in
GPR.
gcc/testsuite/
2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/31385
* gcc.dg/dfp/pr31385.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127833
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/31385
+ * config/i386/i386.h (VALID_DFP_MODE_P): New.
+ * config/i386/i386.c (ix86_hard_regno_mode_ok): Allow DFP in
+ GPR.
+
2007-08-27 Sandra Loosemore <sandra@codesourcery.com>
David Ung <davidu@mips.com>
- Nigel Stephens <nigel@mips.com>
+ Nigel Stephens <nigel@mips.com>
Separate target-specific initialization from general
back-end initialization.
return 1;
else if (VALID_FP_MODE_P (mode))
return 1;
+ else if (VALID_DFP_MODE_P (mode))
+ return 1;
/* Lots of MMX code casts 8 byte vector modes to DImode. If we then go
on to use that value in smaller contexts, this can easily force a
pseudo to be allocated to GENERAL_REGS. Since this is no worse than
place emms and femms instructions. */
#define UNITS_PER_SIMD_WORD (TARGET_SSE ? 16 : UNITS_PER_WORD)
+#define VALID_DFP_MODE_P(MODE) \
+ ((MODE) == SDmode || (MODE) == DDmode || (MODE) == TDmode)
+
#define VALID_FP_MODE_P(MODE) \
((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode \
|| (MODE) == SCmode || (MODE) == DCmode || (MODE) == XCmode) \
+2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/31385
+ * gcc.dg/dfp/pr31385.c: New.
+
2007-08-27 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/unsigned-long-compare.c: Remove target selector.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99 -O2" } */
+
+typedef _Decimal32 fp_t;
+
+extern fp_t g(fp_t);
+
+fp_t
+bug(fp_t x)
+{
+ fp_t result;
+ int n;
+ fp_t f, f3, y, z;
+
+ n = 0;
+ y = 1.DF;
+ f = g(x);
+
+ if (f < 0.DF)
+ f = -f;
+
+ f3 = 2.DF;
+
+ z = (y + y + f / (y * y));
+ y = (z + z) / (9.DF) + f3 / (z * z);
+
+ result = y;
+
+ return (result);
+}