This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

alpha FLOAT_STORE_FLAG_VALUE



While looking for something else, I ran across this series of
discrepancies.  FLOAT_STORE_FLAG_VALUE is used half the time as
if it were a REAL_VALUE_TYPE, the other half of the time as if
it were a host computer `double'.  Depending on the host and
the target, the interpretations could be garbage with respect to
each other, and in this case for cross compilers they usually would
be garbage.

It seems the macro is defined only for the alpha target:

   alpha.h:
   #define FLOAT_STORE_FLAG_VALUE (TARGET_FLOAT_VAX ? 0.5 : 2.0)

In numerous places it is compared to zero,
   FLOAT_STORE_FLAG_VALUE < 0
but given the above definition it is never less than zero.
Does that make any sense?  Fixing these cross-compiler problems
would be straightforward, but was this code ever right
in the first instance?

-------
combine.c:#ifdef FLOAT_STORE_FLAG_VALUE
combine.c:		: immed_real_const_1 (FLOAT_STORE_FLAG_VALUE, GET_MODE (x)));

rtx
immed_real_const_1 (d, mode)
     REAL_VALUE_TYPE d;
     enum machine_mode mode;

cse.c:#ifdef FLOAT_STORE_FLAG_VALUE
cse.c:		  && FLOAT_STORE_FLAG_VALUE < 0)
cse.c:#ifdef FLOAT_STORE_FLAG_VALUE
cse.c:		       && FLOAT_STORE_FLAG_VALUE < 0)
cse.c:#ifdef FLOAT_STORE_FLAG_VALUE
cse.c:		       && FLOAT_STORE_FLAG_VALUE < 0)
cse.c:#ifdef FLOAT_STORE_FLAG_VALUE
cse.c:			&& FLOAT_STORE_FLAG_VALUE < 0)

cse.c:#ifdef FLOAT_STORE_FLAG_VALUE
cse.c:	      true = CONST_DOUBLE_FROM_REAL_VALUE (FLOAT_STORE_FLAG_VALUE,
#define CONST_DOUBLE_FROM_REAL_VALUE(r, m) immed_real_const_1 (r,  m)
extern struct rtx_def *immed_real_const_1	PROTO((REAL_VALUE_TYPE,
						       enum machine_mode));

cse.c:#ifdef FLOAT_STORE_FLAG_VALUE
cse.c:		  true = CONST_DOUBLE_FROM_REAL_VALUE (FLOAT_STORE_FLAG_VALUE,
cse.c:#ifdef FLOAT_STORE_FLAG_VALUE
cse.c:	       : CONST_DOUBLE_FROM_REAL_VALUE (FLOAT_STORE_FLAG_VALUE, mode));
integrate.c:#ifdef FLOAT_STORE_FLAG_VALUE
integrate.c:		 : CONST_DOUBLE_FROM_REAL_VALUE (FLOAT_STORE_FLAG_VALUE,

loop.c:#ifdef FLOAT_STORE_FLAG_VALUE
loop.c:			 && FLOAT_STORE_FLAG_VALUE < 0)
loop.c:#ifdef FLOAT_STORE_FLAG_VALUE
loop.c:			 && FLOAT_STORE_FLAG_VALUE < 0)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]