This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Genrecog bugfix version 2
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Genrecog bugfix version 2
- From: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Date: Sun, 25 Jul 1999 03:12:25 +0200
Hi
Here is improved version of my previous bugfix. Now genrecog attempts to
synchronize.
Sat Jul 24 20:55:54 EDT 1999 Jan Hubicka <hubicka@freesoft.cz>
* genrecog.c (not_both_true): Handle correctly cases when called for
tests with different positions in the insn.
*** config/i386/genrecog.old Fri Jul 23 15:08:04 1999
--- genrecog.c Sat Jul 24 15:38:23 1999
*************** not_both_true (d1, d2, toplevel)
*** 671,676 ****
--- 671,706 ----
int toplevel;
{
struct decision *p1, *p2;
+ int cmp = strcmp (d1->position, d2->position);
+
+ /* Don't even try to compare strings on the different positions in insn! */
+ if (cmp)
+ {
+ if (toplevel)
+ abort();
+ /* Try to find corresponding position in the second. */
+ if (cmp < 0)
+ {
+ if (d1->success.first == 0)
+ return 0;
+
+ for (p1 = d1->success.first; p1; p1 = p1->next)
+ if (! not_both_true (p1, d2, 0))
+ return 0;
+ }
+ else
+ {
+ if (d2->success.first == 0)
+ return 0;
+
+ for (p1 = d2->success.first; p1; p1 = p1->next)
+ if (! not_both_true (d1, p1, 0))
+ {
+ return 0;
+ }
+ }
+ return 1;
+ }
/* If they are both to test modes and the modes are different, they aren't
both true. Similarly for codes, integer elements, and vector lengths. */