Subject: Re: unrecognizable insn
To: None <current-users@netbsd.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: current-users
Date: 10/09/2002 13:52:49
On Wed, Oct 09, 2002 at 07:56:37AM +0200, Christian Biere wrote:
> Patrick Welche <prlw1@newn.cam.ac.uk> wrote:
...
> > `pcn_init':/usr/src/sys/dev/pci/if_pcn.c:1767: internal
> > error--unrecognizable insn:(insn 644 643 646 (set (reg:SI 170)
>
> I'm pretty sure it's the compiler's fault. I'm using gcc 3.2 and it hangs
> at the same line of code. My system isn't overclocked. It's a plain AMD
> Duron 900 Mhz with 256 DDR-RAM. AFAIK I haven't had any problems with
> memory corruption yet. This should not be reproducible if it were a
> problem of memory corruption. The revision of if_pcn.c is 1.14 from
> 2002-10-02. This is what gcc 3.2 tells me:
...
> /sys/dev/pci/if_pcn.c:1767: unrecognizable insn:
...
> But there's a trick. I have used "export DEFCOPTS=-pipe". Normally,
> DEFCOPTS would be -O2 and if I use this the compiler won't fail. Note
> that "-O2 -pipe" works as well. I would have expected optimizing might
> lead to problems in rare cases but here *not* optimizing triggers the bug.
> I haven't submitted a bug report yet or even looked whether it's a known
> bug.
Following Julio's advice, I removed -pipe and it worked. I had
COPTS+=-pipe
in my /etc/mk.conf. I didn't try your "-O2 -pipe", maybe I should..
(And yes I agree it isn't a hardware problem...)
Cheers,
Patrick