This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix validate_replace_rtx_1 for s_cbrt.c build failure
- To: gcc-patches at gcc dot gnu dot org
- Subject: fix validate_replace_rtx_1 for s_cbrt.c build failure
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: Sat, 9 Sep 2000 11:53:49 -0700
This patch:
Fri Sep 8 14:34:56 MET DST 2000 Jan Hubicka <jh@suse.cz>
* recog.c (validate_replace_rtx_1): Fix confusion about equality
testing; simplify subregs of constants and nested subregs.
had a bug. The last parameter to operand_subword is the mode of the
first parameter, not the mode of the SUBREG; operand_subword assumes
that the mode of the SUBREG has the same size as a word and that's all
it cares about. This broke compilation of newlib/libm/s_cbrt.c on
powerpc-eabisim with -O2 -msoft-float.
Tested by bootstrap & test on powerpc-linux and checking that the file
in question now builds; I'll commit when the tests finish running.
--
- Geoffrey Keating <geoffk@cygnus.com>
===File ~/patches/cygnus/gcc-replacewithsubword.patch=======
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.7672
diff -p -u -u -p -r1.7672 ChangeLog
--- ChangeLog 2000/09/09 04:48:47 1.7672
+++ ChangeLog 2000/09/09 18:43:14
@@ -1,3 +1,8 @@
+2000-09-09 Geoff Keating <geoffk@cygnus.com>
+
+ * recog.c (validate_replace_rtx_1): Correct MODE parameter in call
+ to operand_subword.
+
2000-09-10 Michael Hayes <mhayes@cygnus.com>
* loop.c (struct movables): New.
Index: recog.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/recog.c,v
retrieving revision 1.74
diff -p -u -u -p -r1.74 recog.c
--- recog.c 2000/09/08 12:36:11 1.74
+++ recog.c 2000/09/09 18:43:21
@@ -505,7 +505,7 @@ validate_replace_rtx_1 (loc, from, to, o
&& GET_MODE_CLASS (GET_MODE (x)) == MODE_INT)
{
rtx temp = operand_subword (to, SUBREG_WORD (x),
- 0, GET_MODE (x));
+ 0, GET_MODE (from));
if (temp)
{
validate_change (object, loc, temp, 1);
============================================================