Commit 62d75179 by H.J. Lu

re PR target/31385 (gcc fails to find spill register for decimal arithmetic)

gcc/

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.

From-SVN: r127833
parent b5deb7b6
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.
......
......@@ -20568,6 +20568,8 @@ ix86_hard_regno_mode_ok (int regno, enum machine_mode mode)
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
......
......@@ -1088,6 +1088,9 @@ do { \
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.
/* { 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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment