This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: More info on egcs alpha bug
- To: hjl at lucon dot org
- Subject: Re: More info on egcs alpha bug
- From: Richard Henderson <rth at cygnus dot com>
- Date: Wed, 10 Sep 1997 18:32:07 -0700 (PDT)
- Cc: egcs at cygnus dot com
- Reply-To: rth at cygnus dot com (Richard Henderson)
> Ah hah. bad.s isn't respecting -mbuild-constants.
The following patch fixes the problem.
r~
Wed Sep 10 18:30:02 1997 Richard Henderson <rth@cygnus.com>
* alpha.md (movdi): Handle CONST_DOUBLE for TARGET_BUILD_CONSTANTS.
Index: alpha.md
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/config/alpha/alpha.md,v
retrieving revision 1.3
diff -u -p -d -r1.3 alpha.md
--- alpha.md 1997/09/03 01:27:01 1.3
+++ alpha.md 1997/09/11 01:30:54
@@ -3830,30 +3830,41 @@
else
operands[1] = tem;
}
- else if (TARGET_BUILD_CONSTANTS
- && GET_CODE (operands[1]) == CONST_INT)
+ else if (CONSTANT_P (operands[1]))
{
+ if (TARGET_BUILD_CONSTANTS)
+ {
#if HOST_BITS_PER_WIDE_INT == 64
- tem = alpha_emit_set_long_const (operands[0], INTVAL (operands[1]));
- if (rtx_equal_p (tem, operands[0]))
- DONE;
- else
- operands[1] = tem;
+ HOST_WIDE_INT i;
+
+ if (GET_CODE (operands[1]) == CONST_INT)
+ i = INTVAL (operands[1]);
+ else if (GET_CODE (operands[1]) == CONST_DOUBLE)
+ i = CONST_DOUBLE_LOW (operands[1]);
+ else
+ abort();
+
+ tem = alpha_emit_set_long_const (operands[0], i);
+ if (rtx_equal_p (tem, operands[0]))
+ DONE;
+ else
+ operands[1] = tem;
#else
- abort();
+ abort();
#endif
- }
- else if (CONSTANT_P (operands[1]))
- {
- operands[1] = force_const_mem (DImode, operands[1]);
- if (reload_in_progress)
- {
- emit_move_insn (operands[0], XEXP (operands[1], 0));
- operands[1] = copy_rtx (operands[1]);
- XEXP (operands[1], 0) = operands[0];
}
else
- operands[1] = validize_mem (operands[1]);
+ {
+ operands[1] = force_const_mem (DImode, operands[1]);
+ if (reload_in_progress)
+ {
+ emit_move_insn (operands[0], XEXP (operands[1], 0));
+ operands[1] = copy_rtx (operands[1]);
+ XEXP (operands[1], 0) = operands[0];
+ }
+ else
+ operands[1] = validize_mem (operands[1]);
+ }
}
else
abort ();