This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
instruction not recognized (genrecog bug?)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: instruction not recognized (genrecog bug?)
- From: Ian Dall <ian at beware dot dropbear dot id dot au>
- Date: Mon, 10 Jan 2000 01:23:53 +1030 (CST)
In trying to bootstrap egcs-20000103 configured for ns32k-pc532, I find
the following error:
/usr/cygnus/TBD-TBD/share/bison.simple:692: Unrecognizable insn:
(insn 2318 2246 334 (set (reg:SI 0 r0)
(plus:SI (mult:SI (reg:SI 0 r0)
(const_int 4 [0x4]))
(mem:SI (plus:SI (reg:SI 24 fp)
(const_int -2820 [0xfffff4fc])) 0))) -1 (nil)
(nil))
/usr/cygnus/TBD-TBD/share/bison.simple:692: Internal compiler error in `extract_insn', at recog.c:2043
The interesting thing is that this seems to me like a bug in genrecog.c
There is an insn in the ns32k.md which should match as far as I can see:
(define_insn ""
[(set (match_operand:SI 0 "general_operand" "=g<")
(match_operand:QI 1 "address_operand" "p"))]
""
"*
{...})
and I have checked that the second operand
(plus:SI (mult:SI (reg:SI 0 r0)
(const_int 4 [0x4]))
(mem:SI (plus:SI (reg:SI 24 fp)
(const_int -2820 [0xfffff4fc])) 0))
really is an "address_operand" by calling it from gdb. The first
operand is clearly a general_operand so why doesn't it match? Is this
a bug in genrecog.c or do I misunderstand something? Is the QI mode on
the second match_operand correct?
Following progress through insn_recog.c, the following bit of code
stands out:
L815: ATTRIBUTE_UNUSED_LABEL
x1 = XEXP (x0, 1);
if (GET_MODE (x1) == SImode)
goto L1421;
if (address_operand (x1, QImode))
{
operands[1] = x1;
return 158;
}
x1 = XEXP (x0, 0);
goto L1095;
At this point, x1 is the second operand of the offending insn which is SImode
so the L1421 branch gets taken and the address_operand test is not performed.
I think "return 158" would be the correct behaviour.
I would appreciate any tips.
Ian